Product details
Description
Using this interface template user can remotely create, read, update or delete contacts from his account at popular CRM - SalesForce.com. The input data for this interface is the XML file of specific format, described below. This format can be changed to meet end-user requirements. The type of the operation(s), authentication credentials and input information are defined in this input XML.
Input XML file format
The root element of input XML file is <Request>.
-
Required section in the input XML file is <Login>.
An example of this section is shown below.
<Login> <username>mail@gmail.com</username> <password>password</password> <securityToken>security_token</securityToken> </Login>
-
To create a new Contact need use section <create>.
This section should contain element <data>
which should contain <Contact>
elements. <Contact> element must
contain all the elements necessary to create - such as LastName,
FirstName, Title etc.. The exhaustive list of possible contact element
you can find in section ‘List of the contact fields’.
<create> <data> <Contact> <LastName>James</LastName> <FirstName>Bond</FirstName> <Salutation>Mr.</Salutation> …
- To read the data on Contacts from SalesForce.com need use section <getContacts />
-
To update the Contact data one needs to use the section <update>.
This section should contain element <data>
which should contain <Contact>
elements. <Contact> element must
contain the <Id> element (unique
identifier of the contact) and the elements to update - such as
LastName, FirstName, Title etc. The exhaustive list of possible
contact element you can find in section ‘List of the contact fields’.
<update> <data> <Contact> <Id>007</Id> <LastName>James</LastName> <FirstName>Bond</FirstName> <Salutation>Mr.</Salutation> …
-
To delete the Contact need use section <delete>.
This section should contain element <data>
which should contain elements <Contact>.
<Contact> element must contain the <Id>
element, which represents ID of the actual contact record on the
SalesForce..
<delete> <data> <Contact> <Id>007</Id> </Contact> </data> </delete>
Example of the input XML file is available in the folder date->samples.
List of the contact fields
As you may have noticed, typical update and create XML messages contain contact fields. The exhaustive list of the possible contact fields (XML element names) you can find below:
- LastName
- FirstName
- Salutation
- Title
- Department
- AssistantName
- LeadSource
- Birthdate
- Description
- Phone
- Fax
- MobilePhone
- HomePhone
- AssistantPhone
- OtherPhone
- OtherStreet
- OtherCity
- OtherState
- OtherPostalCode
- OtherCountry
- MailingStreet
- MailingCity
- MailingState
- MailingPostalCode
- MailingCountry
Using interface template
Even though this is a template, it is fully functional interface. To run a sample transaction you need to do the following steps:- Specify the input, output and processed directories in the environment settings of the interface. You can access environment settings either from the XCS eiConsole menu (Route -> Environment Properties) or by simply editing the ‘environment-settings.conf’ file, located in the root of the interface folder.
- Define the input XML. This XML should contain proper credentials and necessary input data. See ‘Input XML file format’ section for details.
- Put the input XML file to the input directory.
- Run the interface (test run can be performed using the EIP Emulator of the XCS eiConsole).
- Find the result file(s) in the output directory.
Implementation notes
This interface template consists of 8 routes:
- SF_1_Login – performs the login to the SalesForce.com and creates a session.
- SF_2_SetSession – receives a reply after login and stores ‘sessionID’ and ‘connectionURL’ in transaction context.
- SF_3_ActionProcess – main route which create request action to the SalesForce.com service according to the data from input XML file.
- SF_getContactsResponse – receives a replay after getContacts request and stores it in to output directory.
- SF_CreateResponse – receives a replay after Create request and stores it in to output directory.
- SF_UpdateResponse – receives a replay after Update request and stores it in to output directory.
- SF_DeleteResponse – receives a replay after Delete request and stores it in to output directory.
- Error Handling Route - Error Handling is performed using transaction monitoring functionality of the XCS eiConsole. Special error-handling route 'SF_Error' catches all of the execution errors of the interface and put report about detected error to the specified output directory, to the file with name 'error.xml'.