Hi Team,
I've created an app in Zendesk and cant seem to update several custom ticket fields on a specific ticket.
Using ZAfclient - I can easily add a new comment but if I try to update a custom ticket field, the request is sent with a response but no change applied.
let responseDetails: any;
const dataToLoad = {
"ticket": {
"comment": {
"body": `Worker: ${callRecordingInfo.callSID}
Recording SID: ${callRecordingInfo.recordingID}
Recording URL: ${callRecordingInfo.recordingLink}`,
"public": false
},
"custom_fields": [
{ "id": 9856193510799, "value": callRecordingInfo.callSID},
{ "id": 9882996513935, "value": callRecordingInfo.recordingID},
{ "id": 9864797906191, "value": callRecordingInfo.recordingLink}
],
}
}
const settings = {
url: `/api/v2/tickets/${ticketId}`,
type: 'PUT',
data: dataToLoad,
dataType: 'json',
};
await client.request(settings).then(
(data: any) => responseDetails = data
).catch((error: any) => responseDetails = error)
;
return responseDetails
Please help.
Gary