ConcourseSuite Support

Support
Corporate
PUBLIC PROFILE

Tools Package

ConcourseSuite CRM Tools is a small java library (.jar) which encapsulates the HTTP and XML code so that it's easier to write applications that talk with Concursive's products. For example, you can capture leads or tickets from your existing web site and send them straight into ConcourseSuite CRM by using the library's DataRecord and "save" action method.

You can also read data from the CRM by using the "load" method. The following actions are supported:

  • DataRecord.INSERT
  • DataRecord.SELECT
  • DataRecord.UPDATE
  • DataRecord.DELETE
  • DataRecord.GET_DATETIME

Requirements

The crm_tools.jar can be used with any Java 1.5 or newer application. You will need to have the Apache Commons Codec-API in your classpath.

A "client" will need to be configured under ConcourseSuite's Admin module to provide remote access to CRM data.

The client records are located in the database and can be modified manually:

  • In the \ table, an arbitrary client should be inserted with a plain-text password in the \ field. This will be used in the client authentication code.

Typical Usage

import com.concursive.crm.api.client.CRMConnection;
import com.concursive.crm.api.client.DataRecord;

// Client ID must already exist in target CRM system and is created
// under Admin -> Configure System -> HTTP-XML API Client Manager
int clientId = 1;

// Establish connectivity information
CRMConnection crm = new CRMConnection();
crm.setUrl("http://www.example.com/crm");
crm.setId("www.example.com");
crm.setCode("password");
crm.setClientId(clientId);

// Start a new transaction
crm.setAutoCommit(false);

DataRecord contact = new DataRecord();
contact.setName("contact");
contact.setAction(DataRecord.INSERT);
contact.setShareKey(true);
contact.addField("nameFirst", bean.getNameFirst());
contact.addField("nameLast", bean.getNameLast());
contact.addField("company", bean.getCompanyName());
contact.addField("title", bean.getTitle());
contact.addField("source", bean.getSourceId());
contact.addField("isLead", "true");
contact.addField("accessType", 2);
contact.addField("leadStatus", 1);
contact.addField("enteredBy", 0);
contact.addField("modifiedBy", 0);
crm.save(contact);

// Transform the email
DataRecord email = new DataRecord();
email.setName("contactEmailAddress");
email.setAction(DataRecord.INSERT);
email.addField("email", bean.getEmail());
email.addField("contactId", "$C{contact.id}");
email.addField("type", 1);
email.addField("enteredBy", 0);
email.addField("modifiedBy", 0);
crm.save(email);

// Transform the phone
DataRecord phone = new DataRecord();
phone.setName("contactPhoneNumber");
phone.setAction(DataRecord.INSERT);
phone.addField("number", bean.getPhone());
phone.addField("contactId", "$C{contact.id}");
phone.addField("type", 1);
phone.addField("enteredBy", 0);
phone.addField("modifiedBy", 0);
crm.save(phone);

boolean result = crm.commit();

System.out.println(crm.getLastResponse());

Sign in to add your comment.