ConcourseSuite Support

Support
Corporate
PUBLIC PROFILE

New API Helpers in CRM 7.0

Posted by Matt Rajkowski on March 18, 2014 2:00 PM EDT
Default user photo

If you are importing data into the CRM, whether it's your first time using ConcourseSuite or it's an ongoing effort, the CRM API has several improvements to make it easier.

On the server-side, the CRM has a client access manager which an administrator must grant API access to. Once that's setup through the web UI, the import process can take place. Actually, the API allows for reading, writing, updating and deleting of CRM data, so there's much more you can do with it.

The example script I'll use for reference is a Java Beanshell (BSH) script. It is run from the command line and doesn't require compiling before executing. This makes the script file very easy to make changes to and test. The script must define the CRM libraries (.jar files) to use so that the client libraries can be used.

New in CRM 7 are several client-side API helpers including:

com.concursive.crm.api.client.helper.AccountHelper;
com.concursive.crm.api.client.helper.ContactHelper;

The AccountHelper has several methods which help to save Accounts, find relational values, create relational values and also setup and save custom fields:

class AccountHelper
retrieveOrgIdFromAccountNumber, deleteAccount, saveAccount,
retrieveAccountTypeIdFromValue, addTypeIdToAccount,
retrieveSegmentIdFromValue, saveSegment, 
retrieveStageIdFromValue, saveStage, 
retrieveRatingIdFromValue, saveRating, saveCustomFolderData,
retrieveAddressTypeIdFromValue,
retrieveEmailTypeIdFromValue, retrievePhoneTypeIdFromValue

These example screenshots show Mapping CSV columns to CRM fields, retrieving relational data from the CRM, saving CRM accounts and custom fields.

Mapping CSV to CRM

A function creates a map of the CSV column names to the CRM account, contact and custom fields.

Using Lookup Data from CRM

For values in the CRM which use a lookup table, the related integer Ids are discovered using the new helper methods. The helper will let you know if the value was found and there are methods to add new types to the CRM. In this example the rows of the CSV file are read in and mapped to a hashmap. The hashmap will be sent to the helper so that the proper client-to-server transactions can be made.

Saving the CSV data to CRM

In this example, the AccountHelper is used for saving the Account. Once the record id is obtained for the Account, some additional work can be done. Here custom fields and account types are added to the account. The contact data is also processed and saved to the CRM.

Summary

The Helper Classes make routine imports much easier to work with. No longer is there tedious XML to deal with.

You can find additional helpers in the com.concursive.crm.api.client.helper package. As of today there are AccountHelper, ContactHelper, OrderHelper, and ProductCatalogHelper.

There are no comments

Sign in to add your comment.

Recent Posts

ConcourseSuite CRM 7.0 (20160229) Update Available
This update is recommended for all installations of ConcourseSuite, adding features and fixes....
read more
ConcourseSuite CRM 7.0 (20141231) Update Available
This update is recommended for all installations of ConcourseSuite, adding features and fixes....
read more
ConcourseSuite CRM 7.0 (20140721) Update Available
This update is recommended for all installations of ConcourseSuite, adding features and fixes....
read more
ConcourseSuite CRM 7.0 (20140707) Update Available
This update is recommended for all installations of ConcourseSuite, adding features and fixes....
read more
ConcourseSuite CRM 7.0 (20140617) Update Available
This update is recommended for all installations of ConcourseSuite, adding features and fixes....
read more
What is different about Commercial ConcourseSuite CRM and the Open Source edition?
From time-to-time I'm asked what the differences are between the Open Source Community Edition and...
read more
ConcourseSuite CRM 7.0 (20140513) Update Available
This update is recommended for all installations of ConcourseSuite, adding features and fixes....
read more
New API Helpers in CRM 7.0
If you are importing data into the CRM, whether it's your first time using ConcourseSuite or it's an...
read more
ConcourseSuite CRM 6.2 (20121012) Update Available
This update is recommended for all installations of ConcourseSuite, adding features and fixes....
read more
ConcourseSuite CRM 6.2 (20120806) Update Available
This update is recommended for all installations and improves the performance, security and...
read more

Go to blog