Recent searches
No recent searches

Enmanuel Payano
Joined Apr 16, 2021
·
Last activity Oct 27, 2021
Following
0
Followers
0
Total activity
2
Votes
0
Subscription
1
ACTIVITY OVERVIEW
BADGES
ARTICLES
POSTS
COMMUNITY COMMENTS
ARTICLE COMMENTS
ACTIVITY OVERVIEW
Latest activity by Enmanuel Payano
Enmanuel Payano commented,
Community comment Developer - Zendesk APIs
Apologies if this is a late answer, but this method works for me:
client.get('ticketFields').then(function(data) {
// Get all fields to query against
var fields = data["ticketFields"];
var CustomFieldName;
// Iterate through each field
for (var field in fields) {
// Find the one that match
if (fields[field].label == "Your Custom Field Name") {
// console.log(fields[field].label);
// console.log(fields[field].name);
// Grab your custom field ID
CustomFieldName = fields[field].name;
}
}
// Do some custom field magic for your Zendesk
client.set('ticket.customField:' + CustomFieldName, DataForYourField).then(function(data) {
// https://SomeDomain.zendesk.com/api/v2/ticket_fields
console.log(data); // { 'ticket.subject': 'Printer Overheating Incident' }
});
});
Happy Coding!!
View comment · Posted Jun 13, 2018 · Enmanuel Payano
0
Followers
0
Votes
0
Comments