Introduction
In this article you will learn how you can notify another system when a CustomerGauge survey gets completed using our Outgoing Webhooks functionality.
Business use case
Send data in real-time to an external system, such as a data warehouse, marketing system, or CRM when a survey complete happens in CustomerGauge.
Preparations
Requirements
In order to set up an Outgoing Webhook to an external system, you'll need the following:
- Admin access in CustomerGauge.
- Appropriate access to the other system
Authentication
Connecting to another system will require a valid authentication. How to connect CustomerGauge with another system depends on the supported authentication methods of the external system. CustomerGauge currently supports three types of authentications:
OAuth2 - Client Credentials
- In your external system, obtain your OAuth2 Client Credentials details.
- 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 "Client Credentials".
- Access Token URL: Add the Access Token URL obtained from your external system.
- Client ID: Copy/Paste the Client ID obtained from your external system.
- Client Secret: Copy/Paste the "Secret" obtained from your external system.
- Scope: Specify the required scopes to interact with the receiving object. In some systems this step is optional.
- Press the Save button, and you should be ready to set up your Outgoing Webhook!
OAuth2 - Resource Owner Password Credentials
- In your external system, obtain your OAuth2 details.
- 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 Access Token URL obtained from your external system.
- Username: Add the Username of the user from your external system.
- Password: Add the Password of the user from your external system.
- Client ID: Copy/Paste the Client ID obtained from your external system.
- Client Secret: Copy/Paste the "Secret" obtained from your external system.
- Scope: Specify the required scopes to interact with the receiving object. In some systems this step is optional.
- Press the Save button, and you should be ready to set up your Outgoing Webhook!
Basic Authentication
- Based on your external system, you may need different credentials - in this example, we'll use the Email Address of the user in the external system, and an API Token. Please note that the actual credentials vary from system to system.
- Base64 Encode the value
<email_address>/token:<api_token>
, replacing <email_address> with the email address of the external system user of the integration, and <api_token> with the API Token obtained from the external system.- Example: using the Email Address "j.doe@example.com" and API Token "ABC" this would look like "j.doe@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!
Send Response Data
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.
- If you're using OAuth2 to authenticate, select your Authentication from the drop-down in the Authentication step.
- 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.
- Method: POST
- API URL: Add the Marketo API endpoint that you'd like to call.
- Custom Headers: If you're calling a JSON-based API, 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're likely to have two Custom Headers.
- Request Body: The Request Body is used to send your Survey Response data to your external system. This is your mapping between CustomerGauge and that system. See the list of Available Data Fields to find out what data is available from CustomerGauge to be sent over. Check out the API documentation of your external system to find out their capabilities.
- 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.