If you don’t already have a Zendesk account, sign up here. To create tickets via the Zendesk API, you need:
- An Agent role or higher
- Password Access enabled under Settings – Channels – API:
- Your Zendesk subdomain. This can be found in the URL when you open Zendesk. In our example, in our URL,
https://customeriohelp.zendesk.com/agent/admin/overview, the subdomain is
Create your campaign
Inside your Customer.io account, create a new campaign— it can be event triggered or segment triggered depending on what should trigger the Zendesk ticket creation.
In our example we’ll use the event account_cancelled with an event attribute filter “feedback exists” as a trigger for our campaign:
Add a webhook
Add a webhook action to your workflow, and give it a name.
We’ll call our webhook “Account cancellation: Feedback provided”
After adding the webhook, click Add Request.
Compose your webhook’s headers
In the composer, next to
POST, you’ll add a URL that consists of your Zendesk login email and password followed by the ticket endpoint:
Ours looks like this:
With that done, your composer should now look something like this:
Compose your webhook’s body
For our new ticket we’ll use this content:
Adapt it to your needs; only the comment is mandatory, the other fields are at your discretion. You can find more information here on what fields are available.
When you’re ready to test, you can click “Send Request”. Customer.io will show you the response from the Zendesk API.
If you’re successful you’ll see a 201 Created Response.
In Zendesk you will see a ticket created.
We’re excited to hear how you end up using Zendesk with Customer.io’s Webhook Action. If you have any trouble, let us know! We’re happy to help.