Event Target for Zendesk
This event Target receives CloudEvents and uses the Zendesk API to either create a new ticket or tag an existing one.
Prerequisite(s)
- Zendesk API token
Zendesk API Token
You can find the steps to obtain an API token in the Zendesk API Docs.
Consult the Secrets guide for more information about how to add the Zendesk API token as a secret.
Deploying an Instance of the Target
Open the Bridge creation screen and add a Target of type Zendesk
.
In the Target creation form, provide a name to the event Target, and add the following information:
- Default Ticket Subject: An optional ticket subject fallback if one is not provided in an incoming event.
- Zendesk Subdomain: Name of the Zendesk Subdomain, without the
zendesk.com
domain orhttps://
scheme. - Zendesk Email: Email address associated with the Zendesk account.
- Zendesk API Token: Reference to a TriggerMesh secret containing a token to communicate with the Zendesk API, as discussed in the prerequisites.
After clicking the Save
button, the console will self-navigate to the Bridge editor. Proceed by adding the remaining components to the Bridge.
After submitting the Bridge, and allowing for some configuration time, a green check mark on the main Bridges page indicates that the Bridge with a Zendesk event Target was successfully created.
For more information about using Zendesk, please refer to the Zendesk documentation.
Event Types
A Zendesk event Target accepts the following CloudEvent types:
com.zendesk.ticket.create
Events of this type intend to create a new Zendesk ticket.
This type expects a JSON payload with the following properties:
Name | Type | Comment |
---|---|---|
subject | string | The value of the subject field for this ticket |
body | string | The value of the body field for this ticket |
An example response from the Zendesk Target after consuming an event of this type:
{
"id":165,
"url":"https://triggermesh.zendesk.com/api/v2/tickets/165.json",
"subject":"Hello",
"raw_subject":"Hello",
"description":"World",
"status":"open",
"requester_id":412584624334,
"submitter_id":412584624334,
"assignee_id":412584624334,
"group_id":360010761434,
"due_at":"0001-01-01T00:00:00Z",
"via":
{
"channel":"api",
"source":{"from":{},"to":{},"rel":""},
"satisfaction_rating":{"id":0,"score":"","comment":""},
"brand_id":360004879834,
"allow_attachments":true,
"is_public":true,
"created_at":"2020-08-05T20:00:11Z",
"updated_at":"2020-08-05T20:00:11Z",
"collaborators":{},
"comment":{"created_at":"0001-01-01T00:00:00Z"}
}
}
com.zendesk.ticket.tag.add
Events of this type intend to assign a tag to a pre-existing Zendesk ticket.
This type expects a JSON payload with the following properties:
Name | Type | Comment |
---|---|---|
id | int64 | The value of the id field for the ticket to be updated |
tag | string | The value of the tag to assign to this ticket |