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, you can learn about Out of the Box (OOB) Jobs and Job Chain provided by Gainsight in the Dynamics Integration. You can sync data from any Dynamics object to Gainsight standard or custom objects. To learn more 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 four tasks. These tasks are shown below:
- Create and Authorize Connection: Create Connection establishes a connection between Gainsight and Dynamics. Authorizing Connection task authorizes Gainsight to access data from your Dynamics org. To learn more about this process, refer to the Create a Connection section.
- (Optional) Modify OOB jobs: This task allows admins to modify the out of the box configurations for OOB jobs. To learn more about this process, refer to the Out of the Box Jobs section.
- Create Data sync jobs: This task allows admins to create new data sync jobs per requirement. To learn more about this process, 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, you can authorize the connection and start syncing data from Dynamics to Gainsight through either OOB jobs or custom jobs.
OAuth user should have API access in Dynamics 365. If you do not wish to provide global admin access to Gainsight, refer to the Dynamics 365 Connection Authorization article under Additional Resources section to learn about an alternative solution.
Create a Connection
To create a connection with Dynamics:
- Navigate to Administration > Connectors 2.0 > Connections.
- Click Create Connection. Create Connection dialog appears.
- Select Dynamics in the Connector dropdown list.
- Enter the following details:
- Enter a Name for the connection.
- Enter the URL of your Dynamics CRM. You cannot edit this field, once the connection is created.
- 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.
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.
Context Menu Options
Once you authorize the connection, configure your connection with one of the following context menu options, as required:
- Edit Connection: You can use this option to modify the Dynamics connection details.
- Re-Authorize/Authorize Connection: You can use this option to re-validate the Dynamics connection. If you have changed the password of your Dynamics org or the existing connection is revoked, you can use this option to provide the new set of credentials.
- Revoke Connection: You can use this option to revoke existing connection to your Dynamics instance. When you revoke your connection, Gainsight will not have permissions to access your Dynamics instance and hence data sync jobs cannot be executed.
- 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: You can use this option to delete the Dynamics connection, 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: This job syncs Dynamics Users with Gainsight.
- Company Sync: This job syncs Dynamics Accounts with Gainsight Companies.
- Company Person Sync: This job 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|
Note: 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.
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. You can modify the dependent job, if required. 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: You can 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 Resource 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, you can 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 Resource section at the end of this article.
Note: (Optional) You can 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 Resource section at the end of this article.
Limitation: Gainsight does not support Merging two datasets together to create an output dataset.
You can 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 Resource section at the end of this article.
In the Direct Mapping, you should map 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 Resource 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, you can create Lookup mapping in a data sync job. You can have 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 Resource 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.
You can 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 Resource 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.
You can 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 Resource section at the end of this article.
You can 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 Resource section at the end of this article.
For more information about Connectors, refer to the following articles: