Introduction
In this article you will learn how you can create a Case in SugarCRM when a CustomerGauge survey gets completed using our Outgoing Webhooks Functionality. This helps if your organization is Closing the Loop using SugarCRM.
In order to leverage this Outgoing Webhooks you do need to be a customer of both SugarCRM and CustomerGauge.
Business use case
Creating a Case in SugarCRM whenever a CustomerGauge survey gets completed greatly helps if you're Closing the Loop using SugarCRM.Cases can be created in SugarCRM when a survey gets completed.
Preparations
Requirements
In order to set up an Outgoing Webhook to SugarCRM, you'll need the following:
- Admin access in CustomerGauge;
- Admin access in SugarCRM.
Authentication
Each of the recipes for SugarCRM will require a valid authentication. You should follow the steps as described below for each of your Outgoing Webhooks to SugarCRM. If you have already set up an Authentication that you'd like to use, you can skip this section.
- In SugarCRM, head over to Admin → User Management and Create New User. This user will be used to connect CustomerGauge to SugarCRM.
- Fill in the required details:
- User Name: Give the user a username that you'll recognize in the future, such as "customergauge-integration".
- Last Name: Give the user a last name that you'll recognize in the future, such as "Integration".
- Status: Ensure the Status is Active.
- License Type: Select "Sugar Enterprise".
- Email Address: Give the user an email address. Make sure you have access to this email address' Inbox - temporary credentials will be sent to it.
- Save: Save your user to continue. An email with temporary credentials will be sent to the email address. Log into Sugar using those credentials and change the password to something secure.
- User Name: Give the user a username that you'll recognize in the future, such as "customergauge-integration".
- In CustomerGauge, head over to Data → Integrations → Webhooks → Authenticationsand create a New Authentication.
- System: Select "SugarCRM".
- Name: Give a name to your Authentication that you'll recognize in the future.
- Site Domain: Add the domain of your SugarCRM system. You can obtain this when in your SugarCRM environment, and copying this from the URL in your browser.
Copy the selected part of the browser URL when in your SugarCRM environment.
- Username: Add the Username of the SugarCRM user you created earlier.
- Password: Add the Password of the SugarCRM user you created earlier.
- Client ID: Add the value "sugar", unless you've set up a OAuth Key in SugarCRM, in which case it's the value of your Consumer Key.
- Client Secret: You can leave this blank, unless you've set up a OAuth Key in SugarCRM, in which case it's the value of your Consumer Secret.
- Press the Save button, and you should be ready to set up your Webhook!
- System: Select "SugarCRM".
Create a Case when a Survey gets completed
How to set-up
- In CustomerGauge, in the Outgoing Webhooks page, click the New Webhook button, followed by the Outgoing option.
- In the Filters step you can add a combination of fields and their value that a survey response needs to match in order to trigger the Webhook.
Survey Responses that have Touchpoint "Support", and Area being either "British Isles" or "Benelux" qualify to trigger this Webhook.
- In the Authentication step, select your Authentication from the drop-down.
- In the API Setup step you'll need to set up your API request. We'll walk you through each of the fields that you'd need to fill in to create a Task in SugarCRM.
- Method: POST
- API URL:
https://<subdomain>.sugarcrm.eu/rest/v11/Cases
- Custom Headers: Add the following header to the Custom Headers section:
Header Value Content-Type application/json Content-Type will ensure your Request Body is understood by SugarCRM.
- Request Body: The Request Body is used to send your Survey Response data to SugarCRM. Think of this as the mapping between CustomerGauge and SugarCRM. We'll provide an example, but you may want to make changes to add data important to you. See the list of Available Data Fields to find out what data is available from CustomerGauge to be sent over. The fields of the Cases module in SugarCRM can be explored by navigating to Admin → Developer Tools → Studio, and then selecting the Cases module → Fields.
Example Request Body:{ "name":"New Survey Response for CG-ID {{ event.number_customergauge_display }}", "account_name": "{{ event.account_display }}", "description": "NPS Score: {{ event.nps_display }}", Touchpoint: {{ event.touchpoint_display }}" }
- In the Details step, the last step, give a name to your Webhook, and decide to Activate the Webhook immediately or not. Once you've done that, click the Save button, and you're all done! You can see whether your Webhook being (de-)activated in the Status column in the overview of Webhooks. If you'd like to activate or deactivate your Webhook at a later time you can always Edit your Webhook and navigate to the Details step to activate or deactivate it.