IMPORTANT NOTE: Gainsight is upgrading Connectors 2.0 with Horizon Experience. This article applies to tenants which have been upgraded to the Horizon Experience for Connectors 2.0. If you are using Connectors 2.0 with the previous version, you can find the documentation here.
This article explains how to create a connection from Gainsight to Dynamics, create a data job, and configure Job or Job chains in Gainsight. Most importantly, learn about Out of the Box (OOB) Jobs and Job Chain provided by Gainsight in the Dynamics Integration. Sync data from any Dynamics object to Gainsight standard or custom objects. For more information about Gainsight objects, refer to the Gainsight Data Management in the Additional Resources section at the end of this article.
Note: This document provides general guidance on creating a Connection, configuration of OOB jobs, and setting up custom Jobs because the use case of each job is different and needs unique configuration. For detailed information on creating any Job, refer to the Configuration of Connectors in the Additional Resources section at the end of this article.
Microsoft Dynamics 365 is a cloud-based business applications platform that combines components of Customer Relationship Management (CRM) and Enterprise Resource Planning (ERP), along with productivity applications and artificial intelligence tools.
Gainsight integration with Dynamics allows you to sync data from Dynamics CRM to Gainsight. The following table lists the equivalent Gainsight Objects to which data can be synced from Dynamics.
|Dynamics Object||Gainsight Object|
|Contact||Person and Company Person|
|Any Dynamics Object||Custom Object|
- Gainsight’s integration with Microsoft allows users to have a complete 360-degree view into their customer health right on the account form.
- With the Gainsight widget on the account forms, you will be able to push Dynamics entities into Gainsight objects to match your current activities.
- Gainsight allows Dynamics users to seamlessly integrate their customer data to drive actions, engagements, automate CTAs, and create standardized playbooks to use at any stage of the customer journey.
- Users can sync critical customer data between Microsoft Dynamics 365 and Gainsight, as well as from other disparate sources.
- Ability to see customer data in real time within your Dynamics instance.
To configure the Dynamics connection, you must execute the following three tasks:
- Create and Authorize Connection: To sync data from your Dynamics org, create a connection and authorize the connection to establish a link between Gainsight and Dynamic. For more information, refer to the Create a Connection section.
- (Optional) Modify OOB jobs: Edit the out of the box Job’s configurations as per your requirement. For more information, refer to the Out of the Box Jobs section.
- Create Data sync jobs: Create new data sync jobs per requirement. For more information, refer to the Create a Custom Job section.
A connection is a link between a Gainsight org and a specific Dynamics org. Dynamics Connection allows you to create a connection to Dynamics org which is configured to a custom domain. After you establish a connection to your Dynamics org, authorize the connection and sync data from Dynamics to Gainsight through either OOB jobs or custom jobs.
OAuth users should have API access in Dynamics 365.
To provide custom access (other than global admin access) to Gainsight, refer to the Dynamics 365 Connection Authorization article under Additional Resources section at the end of this article.
Create a Connection
IMPORTANT: You can create only a single connection in Dynamics Connector. A connection can be associated to only a single Dynamics org. If your data resides in multiple Dynamics orgs, you must first delete an existing connection (after you sync the data) and then create a new connection.
To create a connection with Dynamics:
- Navigate to Administration > Connectors 2.0 > Connections.
- Click Create Connection. Create Connection dialog appears.
- In the Connectors dropdown list, select Dynamics.
- In the Name of the Connection, enter a name for the connection.
- In the Organization URL, enter the URL of your Dynamics CRM.
Note: You cannot change the URL after the connection is established.
- Click Authorize to validate the connection. The Microsoft Authorization window appears.
Complete authorization by entering the required Dynamics org credentials and click Accept in the confirmation dialog.
Note: If you have already stored your Dynamics credentials in your browser, you are directly prompted to select the stored username.
Context Menu Options
Once you authorize the connection, configure your connection with one of the following context menu options, as required:
- Edit Connection: Modify the Dynamics connection details.
- Re-Authorize/Authorize Connection: Re-validate the HubSpot connection by a new set of credentials, if you have changed the password of your HubSpot org.
- Revoke Connection:
- Revoke existing Gainsight connection to your HubSpot instance to remove permission to access your HubSpot instance.
Note: If you revoke a Gainsight connection to a HubSpot instance, then the existing HubSpot jobs will not work.
- Configure Company Resolution: By default, this option maps Account ID field with Dynamics to Dynamics Account ID field in Gainsight. You can modify the mapping, if required. Widgets use this mapping to map Dynamics Account with Gainsight Company.
- Delete Connection: Deletes the Dynamics connection permanently, if the associated Job Chains and data jobs are deleted.
Out of the Box Jobs
After the Dynamics connection and authorization successfully completed, Gainsight provides OOB jobs in the Jobs page to sync important data such as Account, User and Contacts, which are required for the assessment of data in Gainsight. Following are the three OOB jobs and their mapping details:
- User Sync: Syncs Dynamics Users with Gainsight.
- Company Sync: Syncs Dynamics Accounts with Gainsight Companies.
- Company Person Sync: Syncs Dynamics Contacts with Gainsight Person and Company Person objects.
This job syncs data from the Dynamics User object and inserts it into the Gainsight User object. User sync is primarily required to grant Dynamics users access to Gainsight NXT in the widget in Dynamics 365. This job is named as User Sync_ Connection name. (here User Sync_Dynamics Connection). In the User Sync OOB job, the following configurations are provided out of the box:
- Dynamics User object is selected as the source object in the dataset preparation and the following source fields are selected.
- Filters are added to sync users from Dynamics with Gainsight based on the Status of the user being Active.
- Gainsight User is selected as target object and the Dynamics source fields are mapped with the Gainsight target fields through the Add Destination configuration.
Following are the fields and their Direct Mapping in the Add to Destination:
|Dynamics User Fields||Target Fields in Gainsight (User)|
|First Name||First Name|
|Last Name||Last Name|
Note: Include in Identifiers check box is selected
|User||Avatar_Dynamicccc :: Dynamics User Id|
|Status||Avatar_Dynamicccc :: Active|
- There is an out of the box mapping provided in the User Sync data job, to identify a specific Dynamics user internally in the Gainsight system. You cannot edit or delete this mapping from the configuration.
- In User Sync jobs, only the fields from User Object are selected as Identifiers. Fields from Avatar objects cannot be selected as Identifiers.
Upsert key is used to resolve incoming Dynamics users with the existing Gainsight users. Based on the Upsert key selection, either new Gainsight users are created from the incoming Dynamics users, or associated with the existing users.
This configuration is useful if new users that you are trying to sync through the Dynamics connector may have already been added to Gainsight either through Slack or User Management. If a matching record already exists in Gainsight, the incoming Dynamics user will automatically be associated with that user.
If there are multiple matching records found for the Upsert Key criteria, you can navigate to User Management > Avatars > Dynamics Avatar Type to manually associate to one user record. After user records are synced, if multiple records are found matching the upsert key criteria, an error file is generated that directs you to the User Management page to manually resolve to one record.
Following are few use cases to apply configuration for Upsert Key, but you can always configure Upsert Keys as required:
- If a user is already added through Slack to Gainsight, you can sync Dynamics Users through Dynamics Connector with Email as an Upsert key.
- If a user is already added through the User Management page (Manual or CSV), you can sync Dynamics Users through Dynamics Connector with Name or Email as Upsert key.
The following table shows configurations for OOB derived mappings for the Manager field:
|Target Field: Manager (GSID)|
|Select Source||User Name|
|Source Target Field||Manager|
|MATCH BY SOURCE||User Name|
|MATCH BY TARGET||Username|
|When Multiple Matches Occur||Use any one match|
|When No Matches Are Found||Insert Null Value(s)|
This job imports data from the Dynamics Account object and inserts it into the Gainsight Company object. By default, this job has a dependency on the User Sync job. This job is named Company Sync_ Connection name. (here Company Sync_Dynamics Connection). In the Company Sync OOB job, the following configuration are provided out of the box:
- The Dynamics Account object is selected as the source object in the dataset preparation and the following source fields are selected.
- Gainsight Company is selected as target object and the Dynamics source fields are mapped with the Gainsight target fields through the Add Destination configuration.
Following are the fields and their Direct Mappings in the Add to Destination:
|Dynamics Account Fields||Target Fields in Gainsight (Company)|
|Account||External Account ID_gainsight123
Note: Include in identifiers check box is enabled.
|Number of Employees||Employees|
Note: Select any other mapping as the Upsert key or even have multiple mappings as Upsert keys, if required. It is mandatory to configure at least one mapping as an Upsert key.
Company Person Sync
This job imports data from the Dynamics Contact object and inserts it into the Gainsight Person and Company Person objects. By default, this job has a dependency on the Company Sync job. This job is named Company Person Sync_ Connection name. (here Company Person Sync_Dynamics Connection). In the Company Person Sync OOB job, the following configurations are provided out of the box:
- Dynamics Contact object is selected as the source object in the dataset preparation and the following source fields are selected.
- Default Filter based on Email is selected.
- Gainsight Person and Company Person are selected as target objects and the Dynamics source fields are mapped with the Gainsight target fields through the Add Destination configuration.
Following are the fields and their mapping in the Add to Destination:
|Dynamics Contact Fields||Target Fields in Gainsight (Person)|
|First Name||Person :: First Name|
|Last Name||Person :: Last Name|
|Person :: Email
Note: Include in identifiers check box is enabled.
|Contact ID||External Contact ID_gainsight123|
|Company Name||External Account ID_gainsight123|
Upsert keys for the mapping between the Dynamics Contact object and the Gainsight Person object are determined by the Person Resolution Key configuration. Fields selected in the Person Resolution Key configuration must be selected as Upsert Keys in the Company Person Sync Job > Field Mappings section.
There can be one or multiple upsert keys used for the identification of people in Gainsight and you cannot edit them. For more information on the Person Resolution Key configuration, refer to the People Management in the Additional Resources section at the end of this article.
The following table shows configurations for OOB derived mappings for the Company ID field:
|Target Field: Company ID (GSID)|
|Select Source||Company Name|
|Select Target field||Company ID|
|MATCH BY SOURCE||Company Name|
|MATCH BY TARGET||ExternalAccount ID_gainsight123.crm.dynamics.com|
|When Multiple Matches Occur||Mark record with an error|
|When No Matches Are found||Reject Record|
Create a Custom Job
From the Jobs page, create jobs to sync data from any Dynamics source object with Gainsight. You can create one dataset from one source object to create a Job. For more information, refer to the Preparation of Connector Jobs in the Additional Resources section at the end of this article.
- (Optional) Create multiple data jobs as required. If the data jobs in the connection are dependent on each other, create a Job chain in a sequence and configure the schedule for the Job Chain. For more information, refer to the Job Chain Page in the Additional Resources section at the end of this article.
Filter on lookup fields is not supported for Dynamics connector.
Gainsight does not support Merging two datasets together to create an output dataset.
Add a destination to the output dataset to sync data from the source to the target Gainsight object. For more information on Add Destination, refer to the Preparation of Connector Jobs in the Additional Resources section at the end of this article.
In the Direct Mapping, map the fields from the output dataset to the target Gainsight object in the field mappings. Data sync happens from the fields of the source system to the target fields of Gainsight, based on the configured field mappings. For more information on Direct Mapping, refer to the Preparation of Connector Jobs in the Additional Resources section at the end of this article.
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.
In this stage, create Lookup mapping in a data sync job. Create a lookup to the same object or another standard object and match up to six columns. Once the required matching is performed, you can fetch Gainsight IDs (GSIDs) from the lookup object into GSID data type fields. For more information on the derived mappings, refer to the , refer to the Preparation of Connector Jobs in the Additional Resources section at the end of this article.
IMPORTANT: To use Derived Mappings, your Target Object must have at least one field of data type GSID.
Configure the schedule of a data job or Job chain as required. For more information, refer to the Configure Job or Job Chain Schedule in the Additional Resources section at the end of this article.
If you create a Job Chain by adding multiple Jobs in a sequence and add a schedule to the Job Chain, the schedule of the individual jobs is not honored.
Configure Job Chains
Gainsight offers an OOB Job Chain Dynamics_Company Person Sync for the OOB jobs. This job chain has the OOB jobs in the following sequence:
- User Sync
- Company Sync
- Company Person Sync
This Job Chain is provided as Company Sync job has dependency on User Sync job and Company Person Sync job on Company Sync job. You can configure the schedule of this Job chain as required.
Create a custom Job Chain on the OOB or custom jobs and schedule as required. For more information, refer to the Job Chain Page and Configure Job or Job Chain Schedule in the Additional Resources section at the end of this article.
View the Execution and Update Activities of all the data jobs in the Activity page. You can also download the error logs of the jobs from this page. For more information, refer to the Activity Page in the Additional Resources section at the end of this article.
For more information about Connectors, refer to the following articles: