Table of Contents

Update a Ticket in Zendesk

Update a Ticket in Zendesk with Ticket ID

If you've created a Zendesk ticket in the flow, and you would like to update it, we can do that with the ticket ID

Alternatively, if the ticket was created outside of the flow, you can scroll down and see how to update the ticket via Email

  1. The first thing we'll need to do is save the ticket ID, from the 'Create Ticket' webhook

To do that, we'll press 'Test the webhook', then select 'ticket.id' from the purple drop down

Here we've saved it as @ticketid

  1. The next step, and most simple way to continue would be to copy the 'Create a ticket' webhook in order to avoid entering the information again

  1. From here we will change the url endpoint to the following PUT:

https://yourdomain.zendesk.com/api/v2/tickets/@{ticketid}

  1. The final step is to change the body of the request, this can be with text, or with any variable

To test this you will need to temporarily use an existing ticket id in the url, then change it back to the variable to use it in the flow

This is what the updated ticket will look like on Zendesks end:

Update a Ticket in Zendesk with Email

We will see how to find a ticket created by a user through their email, we can update it and give information about its status. In this case, the user wants to enter his phone number to be contacted.

  1. Update a Ticket in Zendesk
    We will see how to find a ticket created by a user through their email, we can update it and give information about it and add the new webhook that will be used to update the contact with the phone value
  2. The first thing we need to set up in the Webhook block will be the Method, in this case, will be a GET
  1. And after, we will add the URL required for this action:

You can copy from here:

https://YOURDOMAIN.zendesk.com/api/v2/search

The Search API is a unified search API that returns tickets, users, and organizations. You can define filters to narrow your search results according to resource type, dates, and object properties, such as ticket requester or tag.

  1. Now we will add the params settings:
  1. In the Key will be "query," you specify search queries in a URL parameter named query:

The Zendesk search guide can be found in the following article: Zendesk Support search reference

We will search by email with the following string:

requester:@email

So we will pass the variable email.

  1. Now we must configure our Authorization, we have this documented in the following link:

https://help.landbot.io/article/ooy87lq27b-create-a-ticket-in-zendesk#authorization

It will look something like this:

  1. Now we set the test variable that will be the user's mail:

Press test the request to check the response, that's it!

How did we do?

Create a Ticket in Zendesk

Contact