This function utilizes Zendesk's Tickets API to create a new ticket with an internal note for your Support team to action on each time a user submits an application for review where Segment's Track method is called.
- In the Settings Builder, make sure you add the relevant Settings as listed below, making sure the naming matches what's in the code on lines 2 and 26. You can find the Settings Builder under App Info > Settings (left hand nav).
- Copy and paste the Zendesk function template code in the
index.js
file directly into the editor. - Add your relevant Zendesk Subdomain and credentials so you can send a test event.
- You can send the following test event to validate the existing template works as expected and see the feedback populate in your table:
{
"event": "Application Submitted",
"originalTimestamp": "2019-07-19T18:49:41.814249419Z",
"properties": {
"app_name": "apps/195",
"component_type": "subscription",
"display_name": "Customer X's Application"
},
"receivedAt": "2019-07-19T18:49:46.214Z",
"sentAt": "2019-07-19T18:49:46.205Z",
"timestamp": "2019-07-19T18:49:41.823Z",
"type": "track",
"userId": "userId123"
}
- You're done! Feel free to modify the template to suit your organization's specific needs.
subdomain
(string)credentials
(string)