Using Exalate you can sync any entity from Salesforce. This article describes examples of how to sync various objects.
Scripts below use objects and field names from the Salesforce database. You can find out the field and object names of any entity in Salesforce.
On the outgoing sync, you define which objects you want to send. Use the variable entity.entityType to define the entity you are executing the script for. With this script, you can sync fields from the Case and Task entities.
This script shows how to sync the following fields from the Case object:
This script shows how to sync the following fields from the Task object:
A variable used to know what object to sync. Assign the name of the Salesforce object name to this variable. This example shows how to sync data from two objects:
task. You can sync any entity within the
For example, with the
replica.key = entity.Idline, you will sync the
keyfield from the
caseobject. You can add more fields, like
This script shows how to set up incoming sync for Salesforce entities. This example script shows how to sync issues between Salesforce and Jira.
On the first synchronization, it's important to define what Salesforce entities you want to create after receiving data from Jira. This is done with the
if(firstSync) variable. In this example, Case is used as the default entity, where all data is synced. The fields from the Task object are synced in the Task entity.
- A condition where that defines the objects used to store incoming data in Salesforce. With this script, you can store data in the
A variable used to know what object you can sync. Assign the name of the Salesforce object to this variable. In this example, you can sync data into two objects:
Task. You can sync any entity within the
For example, with the
entity.Subject = replica.summaryline, you will sync the
summaryfield from Jira issues into the
Caseobject. You can add other fields, like
- Sets mapping for statuses according to the following template
[remote issue status: local case status]. If you set the mapping from the example in Salesforce, the
Newstatus in Salesforce will be displayed as
Creating a Trigger
If you want an entity to be synced automatically when it matches a Salesforce query, you need to create a trigger for it in the Triggers tab.
To create a trigger for any entity (object) on your Salesforce ticket, start typing the object name on the entity select field:
Note: If there is only one entity type available, the select dropdown menu is disabled.