LiquidPlanner is an online project management tool and claims to be the first Software as a Service (SaaS) project management solution with integrated features for Scheduling, Collaboration, Time Tracking, Analysis and Reporting. LiquidPlanner’s online project workspaces provide a flexible structure for project/portfolio grouping, drag-and-drop reorganization, custom project and task fields, filtering, project access controls and change history, and unlimited clients, projects, tasks, and events in each workspace.
Project managers can drag and drop projects or tasks into priority order (generating schedules automatically based on resource assignments, task owners, and estimates), create dependencies, estimate using best case/worst case effort estimates, set deadlines, create project pipelines, and delay, pause, or assign a maximum effort value to any item in their project plans.
Project teams collaborate using comment streams and email notifications, document upload, rich-text descriptions and links, secure project portals for client/stakeholder sharing, Google and Outlook calendar integration, documents attached directly from Box.
In this LiquidPlanner – Salesforce Integration blog we are going to elaborate the integration of Salesforce (Campaign object – Standard Object) with the Liquid Planner -An online project Management tool (Project Object – Standard Object).
The field mappings between the Salesforce -Campaign Object and the LiquidPlanner- Project Object are as follows:
Working of the LiquidPlanner – Salesforce Integration
- Whenever a record gets created in salesforce- campaign object corresponding project gets created in the Liquid Planner.
- If there are any modifications/updates in the campaign object of salesforce, the fields which are mapped get automatically updated to the corresponding LP Project Record i.e. from SFDC to LP.
- If there are any updates on LP –Project side, it should be updated in the corresponding record at Salesforce Campaign Object i.e. from LP to SFDC.
Technical Approach taken for Integration
- Pre-requisite to start the Salesforce-LP Integration
- Trial Workspace in LiquidPlanner
- Salesforce Developer Edition Account
- Configure https://app.liquidplanner.com as a Remote Site in Salesforce.
- Liquid Planner API (http://www.liquidplanner.com/api-guide/)
- Open standards JSON and REST (HTTP RESTful Service) are used to transmit the Data.
- Integration Coding has done at the Salesforce side using Apex language.
The details of the developed Apex components with their functionality are as follows:
Class – LiquidPlannerInt
- Contains the logic to access the external URLs of LP (means invoke the liquid planner API and setup the connection with LP).
- Implements the Callout using asynchronous method i.e CalloutMethod.
- This CalloutMethod of LiquidPlannerInt Class is invoked by the Trigger i.e LPTrigger.
- This class actually does the work for getting the Project object information from LP and also putting the data from Salesforce – Campaign Object to LiquidPlanner – Project Object.
Class – CampaignController
It contains the logic to get a record from LP corresponding to the Salesforce Campaign Record Name, and updates the Salesforce Campaign Record. It contains a method called “execute” which is invoked by “Refresh from LP Button” – VF Page.
Class – ProcessorControl
It is used to control the LPTrigger.
Batch – CampaignProjectLPBatch
It contains execute method which gets the updated records of the fields –Status, Owner, Notes from LP and updates it into Salesforce Campaign Object.
Batch Schedule Class – SchedulableCampaignProjectLPBatch
For Scheduling the Batch every day at Night.
Trigger – LPTrigger
This trigger is fired on after Insert and Update Event in the Campaign object of Salesforce. It will immediately update the data in the LP- Project. We used this trigger on Campaign Object, invoke the asynchronous callout method with @future annotation of LiquidPlannerInt Apex Class.
Custom Setting Used – CampaignMap
Used for ID Mapping between the LP-Project and Salesforce Campaign.
Visualforce Page – Refresh from Liquid Planner
To get the updates on particular record from LP to Salesforce.
Important to Note
- Apex triggers are not permitted to make synchronous Web service calls. This restriction ensures a long running Web service which does not hold a lock on a record within your Force.com app.
- We have created an Apex class i.e. LiquidPlannerInt with an asynchronous method that uses the @future annotation, and then build a trigger to call the method as necessary. When the trigger calls the asynchronous method, Force.com queues the call, execution of the trigger completes, and Force.com releases any record locks. Eventually, when the asynchronous call reaches the top of the queue, Force.com executes the call and posts the Campaign Object Data to the Project Object of LP. In real time it seems as “Synchronous Communication”.
Snapshots of Implementation
Campaign Object in Salesforce
Campaign Object Detail Page for “Test-Campaign-1” Record in Salesforce
Project Object at LiquidPlanner Side
Changes reflected in Salesforce Campaign Object