How to update ticket fields using API or app from Zendesk | Community
Skip to main content

How to update ticket fields using API or app from Zendesk

  • June 20, 2020
  • 5 replies
  • 0 views

Venkat13

Hi Team,

I have a requirement to update certain fields on the form form an external system. The calls needs to be initiated from Zendesk. These updates can be made at the time of ticket at any time of the ticket life cycle. Example: Requester country, which I would like to pull from the different system and update on the ticket.

I already have a custom app to get this specific information and I am able to see it on the app. But how I can update this data on Zendesk form fields.

I understand, we can use Zendesk APIs from the external system, but since we already have the data through my app, is there a way I can update it on the form. Or is there any other way I can pull the data from the external system and update on Zendesk.

What kind of configuration or customization is possible in Zendesk to achieve this simple requirement to pull the data from external system and update, call is initiated from Zendesk.

I am new to this community, I tried to search on the support portal, but I am not able to find the required information, appreciate your help.

Thanks and Regards,

5 replies

  • June 22, 2020

Welcome to the community Venkata 👋

There are a few options to achieve this.

  1. Via the Zendesk REST API
  2. Via a listener in your app and using ZAF (Zendesk Apps Framework)

1. Zendesk REST API (fires server-side)

You would want to create a HTTP target (under extensions) in Zendesk. This is kind of like a webhook. Then create a trigger which has this target as an action. It should hit your server with the ticket ID for instance, you do your magic on your own server, and then update the ticket in Zendesk.

2. Event listener in ZAF (fires client-side, i.e. when an agent views a ticket)

Since you've said you already have an app, you should be on the lookout for these framework events. Which allow you to listen to ticket opens or field changes. With ZAF you can then update the ticket fields accordingly.

Enjoy :)


Venkat13
  • Author
  • June 22, 2020

Hi Kay,

This is great!

Good to know the second option using event listener. 

I think, got the concept, but I am sorry, I still didn't understand how I can update the ticket fields.  Where we can add the code to push the data.  Is this within my app on the external system?  

May I request for an example or links for more details, please.

Thanks and Regards,

Venkat Ganesh Medisetti


  • July 1, 2020

Hello Venkata,

judging from your needs, you have the data on an external system, where you can retrieve it at needs. You need then to pass the data to a custom field in Zendesk.

Where we can add the code to push the data ?

To answer this question: might be on both sides.

  • On the external system, you need a way to serve this data, to put it simple, to store it somewhere, like a variable or an array.
  • Once you have the data stored, you can then get that data from an app.

Here is a tutorial to build an app the gets data from an external application: https://develop.zendesk.com/hc/en-us/articles/360001069187-Zendesk-Apps-tutorial-Getting-data-from-an-external-application

Hope this helps!


Venkat13
  • Author
  • July 1, 2020

Hi Matteo,

 

Thanks for your response.  We already built the app and we are able to see the data through the app, when we open the ticket.  But my end goal is to update the data from the app to the ticket fields.  How I can achieve it.

Thanks and regards,

Venkata Ganesh Medisetti


Laura28
  • February 5, 2021

Hi @Venkata Ganesh Medisetti

I don't know if you are still looking for a solution to update ticket fields with external data, but you might want to check out the app Elements Connect. The app works by querying your data source to create a data set that you can then use to populate ticket fields.

Let me know what you think!