Reputation: 1
Can someday jump on this and help me to update the ticket field (ticket is already submitted), the targeted field is a custom-field which I need to update it using the Zendesk API,
Can this is possible using Zendesk API?
Thank You
Upvotes: 0
Views: 3784
Reputation: 1
Just a bit more help. You can get a list of all custom field ids as follows:
const testFields = await client.get("ticketFields")
console.log(testFields)
I'm using zafCLient to update custom ticket fields straight away but that's not working for me. - client.request
The request goes trough as a PUT request. If I add a comment the same way it works fine but not updating a ticket field
Upvotes: 0
Reputation: 304
Zendesk Api Update Ticket is what you need to hit with the payload as described here:
{
ticket: {
custom_fields: [{ "id": 25356371, "value": "something"}]
}
}
If you're trying this from Sidebar app and utilizing zafClient
then its pretty straightforward. Example here and below
client.set('ticket.customField:fieldName', value)
If you're trying this with Zendesk rest api then you can utilize this Update Ticket endpoint to update the value of any Custom-Field present in that ticket.
Steps to update:
{
ticket: {
custom_fields: [{id: <custom_field_id>, value: 'hurray!'}]
},
}
Upvotes: 3