Good to Know Before Starting
- Data Limit: A single pull will result in up to 5,000 records.
- Pull Timing: Enabled Integrations pull every day at the time you've chosen when setting up the integration.
- Setup Requirements:
- You will need to set up three integrations between your Dynamics system and CustomerGauge in order to Trigger Survey Invites.
- The syncs to setup are as follows:
- Account sync
- Contact sync
- Survey Record Invite Trigger sync
- You can use the same authentication for all the Sync integrations.
- The steps below can be followed for each of the required sync.
How to set up the sync between Dynamics and CustomerGauge?
You will need to set up three integrations between your Dynamics system and CustomerGauge in order to Trigger Survey Invites.
The syncs to setup are as follows:
- Account sync
- Contact sync
- Survey Record Invite Trigger sync
You can repeat the below steps for each of the sync setup.
- Click the Microsoft Dynamics Section (Step 1) and then select "New Integration" button (Step 2) at the top-right corner of the Integrations page.
- Select "Microsoft Dynamics" when prompted to choose a system.
- Select Accounts, Contacts or Surveys when prompted for which kind of data you'd like to Integrate
- In the Integration Details step, give a descriptive name for your integration so that you and your co-workers can easily recognize the integration in the future. You can also add the email addresses of users so that they can receive a failure alert email in case a pull fails. We recommend to have at least one Failure Alert Recipient set up.
You are able to setup different timing per integration type - one for Account/Contacts/Activities type of integrations and one for Surveys. For example:- You could have your Account and Contact Sync setup at at 7am and the Surveys one at 8am.
- The Account and Contact Sync can be on the same time because the Account does not need to exist for the Contact sync to work. If we have the Account in CG we will link it to the Contact and if the Account does not exist we will create it when we create the contact.
- In the Authentication step, select a pre-existing Authentication, or create a new Authentication.
- In the Authentication step, select a pre-existing Authentication, or create a new Authentication.
- In the Pull Configuration step, you'll be able to specify your fetchXML query, and map the fields to their CustomerGauge equivalents.
- Endpoint: Fill in the endpoint of the Web API. The endpoint holds the API version number, as well as the main entity to pull data from. The endpoint is structured like so:
/api/data/{api_version}/{entity}
For Accounts this would be:/api/data/v9.0/accounts
For Contacts this would be:/api/data/v9.0/contacts
For Surveys (opportunities) this would be:/api/data/v9.0/opportunities
- Pull Query: Fill in the fetchXML query containing the data, linked entities, and filters you require for your business use case. We found the FetchXML Builder very helpful to construct the queries. After writing your query, or making a change, press the Evaluate Query button. This will run your query for a single record, and will help with some suggestions in the mapping. Below are a few example query for guidance. Kindly do not copy paste or use as is. You will need to write the query that is relevant for your system.
Example fetchXML query for Accounts:<fetch> <entity name="account" > <attribute name="parentaccountidname" /> <attribute name="name" /> <attribute name="industrycodename" /> <link-entity name="systemuser" from="systemuserid" to="owninguser" > <attribute name="fullname" /> </link-entity> </entity> </fetch>
Example fetchXML query for Contacts:<fetch version="1.0" output-format="xml-platform" mapping="logical" > <entity name="contact" > <attribute name="fullname" /> <attribute name="emailaddress1" /> <attribute name="parentcustomerid" /> <attribute name="telephone1" /> <attribute name="statecode" /> <attribute name="contactid" /> <filter> <condition attribute="modifiedon" operator="gt" value="2021-01-01 00:00:00" /> </filter> <link-entity name="account" from="accountid" to="parentcustomerid" > <attribute name="name" /> <attribute name="industrycodename" /> <filter> <condition attribute="industrycodename" operator="eq" value="Technology" /> </filter> </link-entity> </entity> </fetch>
Example fetchXML query for Surveys (Relationship)
<fetch version="1.0" output-format="xml-platform" mapping="logical"> <entity name="contact"> <attribute name="contactid" /> <attribute name="accountid" /> <attribute name="firstname" /> <attribute name="lastname" /> <attribute name="emailaddress1" /> <attribute name="touchpoint_cg" /> <filter type="and"> <condition attribute="survey_due_date_cg" operator="on" value="@today" /> </filter> </entity> </fetch>
Example fetchXML query for Surveys (Transaction - Opportunities):<fetch version="1.0" output-format="xml-platform" mapping="logical" > <entity name="opportunity" > <attribute name="actualvalue" /> <attribute name="decisionmaker" /> <link-entity name="account" from="accountid" to="accountid" intersect="true" visible="true" > <attribute name="name" /> <attribute name="industrycodename" /> <filter> <condition attribute="name" operator="eq" value="Coho Winery (sample)" /> </filter> </link-entity> <link-entity name="contact" from="contactid" to="parentcontactid" > <attribute name="fullname" /> <attribute name="emailaddress1" /> </link-entity> </entity> </fetch>
- Fields from Microsoft Dynamics: Here you can map all the CustomerGauge fields with the fields from Microsoft Dynamics. The Source Field column's drop-downs will automatically be populated with the fields from your query. Do note that Microsoft only returns fields if it contains data. You can also type the field name if the result from Evaluate Query doesn't return a wanted field.
Make sure each field is mapped, or remove the field, in order to proceed.
- Endpoint: Fill in the endpoint of the Web API. The endpoint holds the API version number, as well as the main entity to pull data from. The endpoint is structured like so:
- In the Overview step you get to review your whole set-up. You can either click the Trigger Now button to do a pull immediately. Alternatively you can "Enable this Integration" - this will then cause the Integration to be triggered to pull data on a daily basis.