Skip to main content
Gainsight Inc.

Gainsight to Salesforce Real-Time Sync

This article explains how admins can create a Real-Time data job to transfer data from Gainsight to Salesforce using the Salesforce connector.

Overview

Gainsight's integration with Salesforce in Connectors allows you to push data from Gainsight to Salesforce. You can edit Standard jobs such as Company, Company Person, and Cases to enable Gainsight to Salesforce Real-Time sync or create custom jobs. However, you can only create one job for each object. 

Business Use Case: The Gainsight to Salesforce Real-Time sync functionality ensures that when a record is updated/created in Gainsight, the updates are reflected to Salesforce in Real-Time. 

For example, if the ARR attribute for a Company is updated in Gainsight, this change will reflect in Real-Time for the Salesforce Account record.

IMPORTANT: Real-Time sync with Salesforce does not include scheduled fields. If a Salesforce connector job has both Real-Time sync fields as well as scheduled fields, only Real-Time sync fields would be updated in Real-Time as part of this feature. For more information on the Real-Time functionality, refer to the Real-Time Limitation section.

Real-Time Sync Supported Objects 

Following are the objects supported by Gainsight and Salesforce for Real-Time sync:

  • Gainsight to Salesforce Real-Time sync only supports the records from the following three objects at Gainsight:
    • Company
    • Company Person
    • Cases
  • Gainsight to Salesforce Real-Time Sync only updates records in the following object at Salesforce
    • Accounts 
    • Contacts
    • Cases

Real -Time sync RN.png

Real-Time Sync Job

When a Salesforce connection is established, by default three standard jobs are made available to enable Gainsight to Salesforce Real-Time sync such as Company, Cases and Company Person.

The Real-Time sync job allows you to synchronize the data flow between Gainsight to Salesforce, Salesforce to Gainsight, and Bi-Directional as per your requirements in Real-Time.

Edit an Existing Job

You can edit and enable the Real-Time sync for any of these standard existing jobs.

To edit a job,click the three-vertical dots menu icon of the job and select Edit.

It redirects to the Preparation page; in order to continue, click here.

Note:  Objects having the Real-Time sync option are marked with Real-Time Enabled labels. When Real-Time sync is enabled, an object can only have one job.

Connectors 2022-09-20 at 1.22.15 PM.jpg

Create a Job 

In addition to standard jobs, the jobs tab allows you to create custom Real-Time jobs that sync data from Gainsight to Salesforce.

To create a custom Real-Time sync for any job:

  1. Navigate to the Administration > Integrations > Connectors 2.0 > Jobs tab.
  2. Click Create Job. The Create Job window is displayed.
  3. In the Name of the Job field, enter a unique name for the job. 
  4. Click Next. The Preparation page is displayed.
  1. From the Data Source dropdown menu, select the Salesforce connection. All the supported Salesforce objects are displayed. Objects for which Real-Time sync is available are denoted by the Real Time Enabled label. 
    Note: If you already have a Real-Time job enabled for an object, the Real Time Enabled label will be hidden.
  2. Drag and drop the required object from the left pane to the Preparation page. The Object details page is displayed.
  3. Select the mandatory fields whose values must be synced in Gainsight or the fields you want to write in Salesforce.
  4. (Optional) In the Display Name field, modify the field name.
  5. Select the Sync in Real Time checkbox, if you want updates in Salesforce to sync in real time to Gainsight or updates in Gainsight to sync in real time to Salesforce.
  6. Click Save

To add destination, click the three-vertical dots menu icon of the object and select Add Destination.

unnamed (1).png

Preparation

You can set up a job by mapping the chosen object fields to real-time and scheduled fields, as well as by viewing the job's defined summary.

Real-Time Fields

This tab allows you to do mapping directly from the Salesforce source Real-Time field with the Gainsight field along with the respective Data Flow. If you have selected a field in the source object that has a lookup to another field, then you must map the field in the Derived Mapping section.

Note: Under scheduled fields tab, the identifier can be marked.However, they are also synced in Real-Time along with required fields. For Gainsight to Salesforce Real-Time sync, if the identifier’s field value is only updated in Gainsight, it will not update the corresponding record in Salesforce.

The Real-Time Fields has the following sub-sections:

Direct Mapping

In Direct Mapping, you can map fields from the output dataset to the target object in the field mappings.

To add direct mapping between the fields:

  1. From the Gainsight Object field, select the object supporting Real-Time sync in Gainsight.
  2. In the Direct Mapping section, From the Data Flow dropdown, select any of the following options

Screenshot 2022-09-20 at 5.35.48 PM.png

  • Salesforce To Gainsight: Data gets inserted from SFDC to GS.
  • Gainsight To Salesforce: Data gets inserted from GS to SFDC.
  • Bi-Directional: Data flows in both ways GS to SFDC and SFDC to GS.
  1. From the Gainsight Field, select equivalent Gainsight fields to Salesforce fields.

Derived Mapping

This is optional and you must configure the Derived Mappings only if you want to populate values into the target fields of data type GSID. GSID values are populated from the same or another object through lookup.

  1.  Click Derived Mapping to expand. 
    1. Click the Configured Derived Mapping button.
    2. Click the Add Mapping button to add a Derived Mapping field.
    3. From the Salesforce Field dropdown menu, select the source.
    4. From the Data Flow dropdown menu, select the direction in which the data should be fetched.
    5. From the Gainsight Field dropdown menu, select the value.

Note: Only fields with GSID data type are displayed in the Gainsight Field dropdown. Define Lookup gets enabled with a cross icon(which states Configuration Pending).

  1. Click the Define Lookup button. The Define Lookup slide-out panel appears.
  2. From the Select the intermediate object dropdown, select an intermediate object for the lookup.
  3. From the Field in Intermediate Object dropdown menu, select the object to be mapped.
  4. (Optional) Click the Add icon to add another matching criteria.
  5. Click Done. The Define Lookup appears with a green tick icon(which states Configuration Completed).

Note: When the Data flow is selected as Gainsight to Salesforce, by default the following options are selected:

  • When multiple matches occur, a mark record with an error is selected.
  • When no matches are found, the reject record is selected and is read-only. 
  • This is not applicable to Bi-Directional or Salesforce to Gainsight data flow; you can select other available options but those will be applicable only to Salesforce to Gainsight data flow.
  1. (Optional) Click the Add Mapping button to add more Derived Mapping fields.

Listening to Events

In this section, you can choose the change events to capture from Gainsight and the subsequent action to be made in Salesforce. For example, if you want to sync any updates in Gainsight Company record to update the corresponding record in the Salesforce Account. By default, we will list both Create and Update events from Gainsight to create or update records in Salesforce. The defaults can be modified to suit your use case.

  1. Click Listening To Events to expand.
    1. Click Advanced Settings to view or change the default settings.

In the For all records “Created” in Gainsight in Salesforce field, you can perform the following actions:

  • Create: Create new records in Salesforce without updating existing records
  • Create and Update: Create new records if a matching record does not exist in Salesforce, else update the existing record
  • Do Nothing: Indicates Salesforce to ignore this event

Note: Create and Update are selected by default for the Salesforce fields.

  1. In the For all records “Updated” in Gainsight  in Salesforce field, select any of the following:

  • Update: Updates the matching record in Salesforce. Will not create a record if a matching record is not found.
  • Do Nothing: Salesforce will ignore this event.

Note: Update is selected by default in the Salesforce field.

  1. Click Save. The Preparation page appears.
  2. Click Save. The job is successfully saved.
Status  Notification 

 

 

 

In-progress Job setup

Job list in progress.jpg

 

 

 

Successful setup

Screenshot 2022-09-15 at 2.30.31 PM.png

 

 

 

Failed setup

RT failed.jpg

Scheduled Fields

This tab contains the job identifier and the fields which will sync data when the job is scheduled.The Direct Mapping section helps you map source fields with the target fields in Gainsight and include Identifiers.In the Derived Mapping section, select the target fields to populate values in them through lookup into other fields of GSID data type using the field in Intermediate Object.

Screenshot 2022-09-13 at 1.46.41 PM (1).png

 For more information on Direct Mapping and Derived Mapping, refer to the Scheduled Fields section in the Preparation of Connector Jobs article from the Additional resources section of this article.

Summary

The Summary tab helps you view a brief summary of defined Real-Time Direct Mapping, Scheduled Direct, and Derived Mappings.

Real time summary.jpg

You can create a custom Job Chain on the standard or custom jobs and schedule as required. For more information on Job Chain, refer to the Job Chain Page and Configure Job or Job Chain Schedule articles from the Additional resources section of this article.

Real-Time Limitations

  • The Update event  is only supported for Company Person for Beta. A new contact record will not be created at Salesforce, but any update in an existing record at Gainsight will update the corresponding record at Salesforce.
  • In Gainsight to Salesforce Real-Time Sync of a Company Person record, SFDC contact ID must be mapped in the schedule section of the job to identify a contact at Salesforce.
  • For Gainsight to Salesforce Real-Time Sync, only 20 fields from each object ( Company, Company Person and Case), are supported.
  • Only Gainsight Currency ISO code and currency conversion rate at Gainsight are accepted in fields that support multiple currencies.
  • Formula fields/Calculated fields and Rich Text area fields do not support Real-time sync, as Salesforce does not produce events for these fields.
  • Ensure you map all the Salesforce mandatory fields either in the Real-Time section or as an identifier of the job. 
  • Identifiers are present under the Scheduled Fields tab and any change on identifiers alone will not be supported to sync data in Real-Time to Salesforce.
  • Writeback for read-only fields at Salesforce is not supported.
  • Data type validations : record will be marked as failed with appropriate error message when data type validation fails.
  • Cyclic records will be marked as ignored i.e, when a field is marked as Bi-Directional, any change in Gainsight will update the record at salesforce and vise-versa. This will again trigger an event to write back from Salesforce to Gainsight for the same record, and will be marked as ignored.
  • The system will not handle a request if the number of records exceeds the maximum of 50K for events.

Configure Job

You can configure the schedule for the fields mapped under the scheduled field section and also configure notification for the scheduled sync job.

For more information, refer to the Configuration Job or Job Chain Schedule article in the Additional Resources section of this article.

Real-Time Execution Activities

A Real-Time activity is created when a Real-Time enabled job within Salesforce Connector is executed. When you select the Real Time Execution Activities in the Activities tab, the following job details are displayed:

  • Date: Start date and time of the Real-Time job.
  • Job Name: Name of the Real-Time job.
  • Event: Type of event.
  • Destination: Name of the target object in which the data is updated in Gainsight.
  • Data Source: Name of the source object in Salesforce.
  • Status: Status of the Real-Time job.
  • Comments: Number of successful, failed, and ignored records.

Real - time execution activities.jpg

Filters

 The Real Time Execution Activities can be filtered using the three types of filters as shown below:

  • Activity Date: the list view by the Job creation date and time, such as: Custom, Last 24 hours, Last 3 days,  or last 7 days.
  • Connection: the list view by the Job connection name.
  • Execution Status: the list view by Job Execution status, such as: In Progress, Partial Success, Success, Failed, or Ignored.

Additional Options

 Admins can perform the following operations by clicking the three-vertical dots menu icon for each Real-Time activity:

  • View Job Activity: View all fields updated as part of the Real-Time job run. To view all the fields updated as part of the job run, Click View Logs in the Job Activity page.
  • Edit Job: Update the Real-Time job.
  • Download Logs: Download the log file (JSON format). The last line of the JSON files displays the technical error message.

RTSActivity.png

Real-Time Sync Job Common Errors 

The following are some of the common errors you might run into while using Real-Time sync jobs:

  • Gainsight allows for a maximum of three Real-Time sync jobs, one for each supported source object (Account, Contact, and Cases).
  • Deleted events are not synced into Gainsight by Real-Time sync, but are captured under Real Time Sync Activities. For example, if you delete a record from an external system, it is not automatically deleted in Gainsight. However, you can view the details of the deleted event in the Activity tab.
  • When the data type for a source field is changed, the change is not reflected in Gainsight but the event is captured under Real Time Sync Activities.
  • If the Authorization for the source Salesforce connection expires, the Real-Time sync jobs will be deactivated. To activate them, you must re-authorize the connection from the Connections tab.

RT Authorisation.jpg

  • Due to a technical limitation, specific fields cannot be used as Identifiers in the Real-Time sync job. If such fields are used as Identifiers in the job, the Real-Time sync will be deactivated until the fields have been unchecked as Identifiers. In the Jobs list page, an information icon is displayed for such Real-Time sync jobs. For example, Last Activity, Last Viewed Date from Accounts.

connectoridentified2.png

  • For Real-Time sync jobs, a maximum of 10 Identifiers or Required fields, or a combination of them, can be utilized.

connector-identifier-not-supported.png

  • Was this article helpful?