Skip to main content

Zendesk Component

Manage Tickets and users in Zendesk

Component key: zendesk

Description

Zendesk is a public company headquartered in San Francisco, California. It provides software-as-a-service products related to customer support, sales, and other customer communications. The Zendesk component allows you to manage Users and Tickets inside your Zendesk domain.

Zendesk webhooks

The Zendesk API supports two types of webhooks - one for when something has changed for a user or an organization, and one when something has changed on a support ticket.

Zendesk user and support webhooks

If you would like to be alerted when a change to a user or organization has occurred, create a new webhook using the Create Webhook action. Select the events that will cause a the webhook to fire. For example, selecting the zen:event-type:user.deleted event will cause the webhook to fire whenever a user is deleted. A full list of webhook event types are available in the Zendesk developer docs.

Zendesk ticket webhooks

If you would like to be alerted when a ticket has changed, first create a webhook using the Create Webhook action. When selecting webhook events, choose conditional_ticket_events (and only that value). This will create a webhook, pointed at a Prismatic instance flow, that can be triggered conditionally.

Next, you need to create a trigger that will send data via the webhook you created. Fetch your webhook's id from the step where you created the webhook, and feed it into a Create Trigger action. The default conditional and webhook body values will cause the webhook to be triggered whenever a ticket is changed, and will send all data related to the ticket to the webhook. We recommend keeping the default values. You can change the conditions under which the trigger fires - see the Zendesk conditions reference for details.

Connections

Zendesk Connection

The Zendesk component authenticates requests with OAuth 2.0. To configure an application inside zendesk follow the directions in this guide Now, you will have to create a new Zendesk connection in Prismatic.

  • For Client ID enter in the unique identifier of your app inside the Zendesk admin dashboard. For Client Secret enter the generated client secret you received from the Zendesk admin dashboard.
  • For Scopes refer to the guide that was linked above. There is detailed information on picking the correct scope.

You can find your subdomain inside of your Zendesk URL: https://{YOUR SUBDOMAIN HERE}.zendesk.com/

Triggers

Webhook

Receive and validate webhook requests from Zendesk for webhooks you configure. | key: webhook


Actions

Create Ticket

Create a new ticket | key: createTicket


Create User

Create a new user | key: createUser


Create Webhook

Create a webhook in Zendesk to notify you of changes to your users, organization, or tickets | key: createWebhook

Output Example Payload

{
"data": {
"webhook": {
"id": "01GK8E6BKWMJZD2T8Y5AXJQMG5",
"name": "Test from Prismatic",
"status": "active",
"subscriptions": [
"conditional_ticket_events"
],
"created_at": "2022-12-02T03:31:00Z",
"created_by": "7272236579355",
"endpoint": "https://hooks.prismatic.io/trigger/EXAMPLE",
"http_method": "POST",
"request_format": "json"
}
}
}

Create Webhook Trigger

Create a trigger to cause a webhook to fire | key: createWebhookTrigger

Output Example Payload

{
"data": {
"trigger": {
"url": "https://example.zendesk.com/api/v2/triggers/10849292971419.json",
"id": 10849292971419,
"title": "Trigger for 01GK8E6BKWMJZD2TEXAMPLE",
"active": true,
"updated_at": "2022-12-02T03:36:44Z",
"created_at": "2022-12-02T03:36:44Z",
"default": false,
"actions": [
{
"field": "notification_webhook",
"value": [
"01GK8E6BKWMJZD2TEXAMPLE",
"{\"current_user\": \"{{current_user.details}}\"}"
]
}
],
"conditions": {
"all": [],
"any": [
{
"field": "status",
"operator": "changed",
"value": null
},
{
"field": "status",
"operator": "not_changed",
"value": null
}
]
},
"description": null,
"position": 10,
"raw_title": "01GK8E6BKWMJZD2TEXAMPLE",
"category_id": "4558610559259"
}
}
}

Delete Instance Webhooks

Delete all webhooks pointed at this instance | key: deleteInstanceWebhooks


Delete Ticket

Delete the information and metadata of a ticket by Id | key: deleteTicket


Delete User

Delete the information and metadata of a user by Id | key: deleteUser


Delete Webhook

Delete a webhook by ID | key: deleteWebhook


Get Ticket By External ID

Get a ticket by external ID | key: getByExternalId


List Tickets

List all Tickets | key: listTickets

Output Example Payload

{
"data": [
{
"assignee_id": 235323,
"collaborator_ids": [
35334,
234
],
"created_at": "2009-07-20T22:55:29Z",
"custom_fields": [
{
"id": 27642,
"value": "745"
},
{
"id": 27648,
"value": "yes"
}
],
"custom_status_id": 123,
"description": "The fire is very colorful.",
"due_at": null,
"external_id": "ahg35h3jh",
"follower_ids": [
35334,
234
],
"from_messaging_channel": false,
"group_id": 98738,
"has_incidents": false,
"id": 35436,
"organization_id": 509974,
"priority": "high",
"problem_id": 9873764,
"raw_subject": "{{dc.printer_on_fire}}",
"recipient": "support@company.com",
"requester_id": 20978392,
"satisfaction_rating": {
"comment": "Great support!",
"id": 1234,
"score": "good"
},
"sharing_agreement_ids": [
84432
],
"status": "open",
"subject": "Help, my printer is on fire!",
"submitter_id": 76872,
"tags": [
"enterprise",
"other_tag"
],
"type": "incident",
"updated_at": "2011-05-05T10:38:52Z",
"url": "https://company.zendesk.com/api/v2/tickets/35436.json",
"via": {
"channel": "web"
}
}
]
}

List Tickets Assigned To User

List all of the tickets that have been assigned to a particular user | key: listTicketsToUser

Output Example Payload

{
"data": [
{
"assignee_id": 235323,
"collaborator_ids": [
35334,
234
],
"created_at": "2009-07-20T22:55:29Z",
"custom_fields": [
{
"id": 27642,
"value": "745"
},
{
"id": 27648,
"value": "yes"
}
],
"custom_status_id": 123,
"description": "The fire is very colorful.",
"due_at": null,
"external_id": "ahg35h3jh",
"follower_ids": [
35334,
234
],
"from_messaging_channel": false,
"group_id": 98738,
"has_incidents": false,
"id": 35436,
"organization_id": 509974,
"priority": "high",
"problem_id": 9873764,
"raw_subject": "{{dc.printer_on_fire}}",
"recipient": "support@company.com",
"requester_id": 20978392,
"satisfaction_rating": {
"comment": "Great support!",
"id": 1234,
"score": "good"
},
"sharing_agreement_ids": [
84432
],
"status": "open",
"subject": "Help, my printer is on fire!",
"submitter_id": 76872,
"tags": [
"enterprise",
"other_tag"
],
"type": "incident",
"updated_at": "2011-05-05T10:38:52Z",
"url": "https://company.zendesk.com/api/v2/tickets/35436.json",
"via": {
"channel": "web"
}
}
]
}

List Tickets Requested By User

List all of the tickets that a particular user has requested | key: listTicketsByUser

Output Example Payload

{
"data": [
{
"assignee_id": 235323,
"collaborator_ids": [
35334,
234
],
"created_at": "2009-07-20T22:55:29Z",
"custom_fields": [
{
"id": 27642,
"value": "745"
},
{
"id": 27648,
"value": "yes"
}
],
"custom_status_id": 123,
"description": "The fire is very colorful.",
"due_at": null,
"external_id": "ahg35h3jh",
"follower_ids": [
35334,
234
],
"from_messaging_channel": false,
"group_id": 98738,
"has_incidents": false,
"id": 35436,
"organization_id": 509974,
"priority": "high",
"problem_id": 9873764,
"raw_subject": "{{dc.printer_on_fire}}",
"recipient": "support@company.com",
"requester_id": 20978392,
"satisfaction_rating": {
"comment": "Great support!",
"id": 1234,
"score": "good"
},
"sharing_agreement_ids": [
84432
],
"status": "open",
"subject": "Help, my printer is on fire!",
"submitter_id": 76872,
"tags": [
"enterprise",
"other_tag"
],
"type": "incident",
"updated_at": "2011-05-05T10:38:52Z",
"url": "https://company.zendesk.com/api/v2/tickets/35436.json",
"via": {
"channel": "web"
}
}
]
}

List Triggers

List workflow triggers | key: listTriggers


List Users

List all Users | key: listUsers

Output Example Payload

{
"data": [
{
"id": 223443,
"name": "Johnny Agent"
},
{
"id": 8678530,
"name": "James A. Rosen"
}
]
}

List Webhooks

List webhooks configured in Zendesk | key: listWebhooks


Raw Request

Send raw HTTP request to Zendesk | key: rawRequest

The Raw Request action allows you to interact with API endpoints that are not covered by other actions. For example, if you want to list groups, which as an endpoint of /api/v2/groups, you can enter /groups as the endpoint and select the GET verb.


Search Users

Returns an array of users who meet the search criteria. | key: searchUsers

Output Example Payload

{
"data": {
"users": [
{
"id": 35436,
"name": "Robert Jones",
"notes": "sigil issue"
},
{
"id": 9873843,
"name": "Terry Gilliam"
}
]
}
}

Show Ticket

Get the information and metadata of a ticket by Id | key: showTicket


Show User

Get the information and metadata of a user by Id | key: showUser


Update Ticket

Update the information and metadata of a ticket by Id | key: updateTicket


Update User

Update the information and metadata of a user by Id | key: updateUser

Updating a user's 'User Role' from a end-user to administrator may cause a failed execution. For more information refer to the user permissions guide in the Zendesk docs.