Follow

Salesforce API Integration with LiquidPlanner

You can invoke the LiquidPlanner API from Apex using what Salesforce terms “callouts”:

http://wiki.developerforce.com/page/Apex_Web_Services_and_Callouts

The steps you will take are:

1. Create a trial workspace in LiquidPlanner
2. Create a Salesforce Developer Edition account
3. Configure https://app.liquidplanner.com as a Remote Site in Salesforce
4. Create one or more Apex classes that invoke the LiquidPlanner API

Create Accounts

For development and testing, we recommend you create a new trial workspace in LiquidPlanner and use the Developer Edition sandbox in Salesforce. This allows you to experiment without paying subscription fees and without any risk of affecting your production data. Once you’re happy with your integration, you can move the code to your production environment.

LiquidPlanner Trial Workspace 

If you already have a LiquidPlanner account, then sign to LiquidPlanner > click the user menu (profile picture) > select Workspace Directory > click the “Start New Trial” button at the bottom of the page to create a new workspace.

If you don’t already have a LiquidPlanner account (or you want to use a separate account for development) then sign up HERE.

Completing the signup process will automatically create a new trial workspace.

Salesforce Developer Edition

If you don’t yet have a Developer Edition account, then sign up for one here: http://www.developerforce.com/events/regular/registration.php

Add LiquidPlanner as a Remote Site

Follow these instructions: https://login.salesforce.com/help/doc/en/configuring_remoteproxy.htm to register this URL:
https://app.liquidplanner.com as a Remote Site in Salesforce.

Create Apex Classes

The following is a “Hello, World!” example in Apex that fetches your account details from LiquidPlanner. We’ve favored simplicity and concision over robustness; there is little or no error handling, and credentials are hardcoded. You should follow best practices (catching and handling exceptions, abstracting out configuration, etc.) when building your production system.

Once you have created these classes, you should be able to run code like:

new LiquidPlannerHelloWorld().getAccount()

and see results like this (pictured in the Force.com IDE):

SFintegration1.png

LiquidPlannerAccount Class


This is simply a data record to store results fetched from LiquidPlanner.

SFintegration2.png

LiquidPlannerHelloWorld Class

This class actually does the work of requesting your account information from LiquidPlanner.

SFintegration3.png

References

LiquidPlanner API

LiquidPlanner uses a RESTful web service API. You can download the API Guide (PDF) for offline reference. Most actions that you can perform within the application can be automated using the API -- for example, you can create a task, comment on the task, track time against it, and then mark it done.

Check the API Types page for a real-time listing of available API fields.

Apex

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_intro_what_is_apex.htm

Apex is a strongly typed, object-oriented programming language that allows developers to execute flow and transaction control statements on the Force.com platform server in conjunction with calls to the Force.com API.

Apex Callouts


http://wiki.developerforce.com/page/Apex_Web_Services_and_Callouts

With 'Callouts', where Apex invokes an external web service, Apex provides integration with Web services that  utilize SOAP and WSDL, or HTTP services (RESTful services) … Additionally, Apex supports HTTP services to use HTTP Request and Response objects to invoke the external web service.


Parse JSON by one line of code using Winter’12 JSON API !


http://www.tgerm.com/2011/10/winter12-jsonparser-serialize.html

Salesforce Winter’12 release came with a great new API addition to Apex stack i.e. JSONParser. This parser solves all the classic problems using open source Apex based JSONObject.cls, to know more about these problems read my previous post.

This post is an attempt to discuss how one can simplify both JSON operations like JSON serialization and
deserialization(parsing) using the new System.JSON API. 

Need help?

Post your question to the LiquidPlanner Developer Forum.


© 2012 LiquidPlanner, Inc. All rights reserved.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request
Powered by Zendesk