Business use case
Creating a Support Ticket in Zendesk whenever a CustomerGauge survey gets completed greatly helps if you're Closing the Loop using Zendesk.
In order to set up an Outgoing Webhook to Zendesk, you'll need the following:
- Admin access in CustomerGauge;
- Admin access in Zendesk;
- A Zendesk user that will be used for the integration;
- A high enough Rate Limit in your Zendesk package to cope with your survey volume.
Each of the recipes for Zendesk will require a valid authentication. Zendesk supports different ways of Authentication; OAuth2 - Resource Owner Password Credentials, or Basic Authentication using API Token. It's generally preferred to authenticate by OAuth2, with the API Token used if you can't authenticate through OAuth2 for any reason. Whichever method you choose, you should follow the appropriate steps as described below for each of your Outgoing Webhooks to Zendesk.
OAuth2 - Resource Owner Password Credentials
- In Zendesk, head over to the OAuth Clients tab in Admin → Channels → API.
- Create a new OAuth Client:
- Client Name: Give a name to your OAuth client that you'll recognize in the future.
- Description: You could expand here what the purpose of this OAuth client is for. Filling in this field is optional.
- Company: You can leave this to its default value, it won't be relevant for the Outgoing Webhook.
- Logo: You can skip this field, it won't be relevant for the Outgoing Webhook.
- Unique Identifier: This field is important - this will be the Client ID you'll use to set up the Authentication in CustomerGauge. A suggestion is made based on the Client Name.
- Redirect URLs: You can skip this field, it won't be relevant for the Outgoing Webhook.
- Secret: Upon saving the OAuth Client a secret will be displayed - store this in a save place, you can not obtain it again. If you happen to lose the secret, you can Regenerate it, but that breaks any connection using this OAuth Client.
- In CustomerGauge, head to Data → Integrations → Webhooks → Authentications.
- Create a New Authentication:
- System: Select "Other".
- Name: Give your Authentication a name that you'll recognize in the future.
- Grant Type: Select "Resource Owner Password Credentials".
- Access Token URL: Add the following URL, replacing <domain>with your Zendesk domain:
- Username: Add the username of the Zendesk user you'd like to use for the integration.
- Password: Add the password of the Zendesk user you'd like to use for the integration.
- Client ID: Copy/Paste the value from the "Unique Identifier" of the OAuth Client you created in Zendesk.
- Client Secret: Copy/Paste the "Secret" of the OAuth Client you created in Zendesk.
- Scope: You can ignore this option for Zendesk.
- Press the Save button, and you should be ready to set up your Outgoing Webhook!
Basic Authentication with API Key
- In Zendesk, head over to the Settings tab in Admin → Channels → API.
- On this screen, ensure that "Token access" is turned on, and press the Add API Token button.
- Description: You could expand here what the purpose of this API Token is for. Filling in this field is optional.
- API Token: An API Token will be displayed - store this in a save place, you can not obtain it again. If you happen to lose the secret, you will need to create a new API Token.
- Base64 Encode the value
<email_address>/token:<api_token>, replacing <email_address> with the email address of the Zendesk user of the integration, and <api_token> with the API Token obtained from Zendesk.
- Example: using the Email Address "firstname.lastname@example.org" and API Token "ABC" this would look like "email@example.com/token:ABC" before Base64 Encoding, and would be "ai5kb2VAZXhhbXBsZS5jb20vdG9rZW46QUJD" after Base64 Encoding.
- In CustomerGauge, when setting up your Webhooks add the following Custom Header in the Custom Headers section:
Header Value Authorization Basic <base64-encoded api_token>
Your Custom Header should look like this after adding.
- Your authentication should be all set up!
Create a Support Ticket 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, if you are authenticating through OAuth2, select your Authentication from the drop-down. If you're authenticating using API Token, you can simply press Next.
- 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 Support Ticket in Zendesk.
- Method: POST
- API URL:
- Custom Headers:Add the following header to the Custom Header section:
Header Value Content-Type application/json
If you're authenticating using Basic Authentication, an additional Custom Header is needed, as described above in the Basic Authentication with API Key section.
If using Basic Authentication, you'd have two Custom Headers.
- Request Body: The Request Body is used to send your Survey Response data to Zendesk. This is your mapping between CustomerGauge and Zendesk. 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. Zendesk's capabilities are described in their API documentation.
Example Request Body:
"body": "The smoke is very colorful."
"subject": "My webhook is on fire!"
- 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.