Recent searches


No recent searches

Adding Flags to Metadata using Zendesk API



Posted Oct 28, 2021

Hi there. So I'm creating Zendesk tickets using the API in PHP, and I want to add flags:[3] to the metadata so that it shows that the ticket requester was not signed in when the ticket was created. However, I have yet to find a way to edit the metadata in this way; all of the ways that I've found to edit the metadata when creating a ticket have just added it to the 'custom' field, as opposed to actually adding this flag. Was wondering how I would go about doing this? Thanks!


0

6

6 comments

image avatar

Erica Girges

Zendesk Developer Advocacy

Hi Tommy,
 
First and foremost, welcome to the community! Thank you for posting your question. Are you using just the Zendesk API client or the Laravel Wrapper?
 
Erica - Dev Support

0


Hi Erica,

Thanks! I am using the Zendesk API client

-Tommy

0


image avatar

Erica Girges

Zendesk Developer Advocacy

Hi Tommy,
 
Perfect! To understand a little more of where you're at, in your ticket audits are you able to actually see the metadata upon the ticket creation event?
 
Erica - Dev Support

0


Hi Erica,

I can see the metadata when I go to the /api/v2/ticketnum/audits.json (or something close to that, going off of memory), and it looks all good, but any edits I make to the metadata, it just goes to the 'custom' key, whereas I'd like to manually edit the 'flags' and 'flags_options' keys. So instead of 'custom' : {'flags' : [3]}, I'd like it to not be in the custom and instead just have 'flags': [3] within the metadata. Thanks!

Best,

Tommmy

0


image avatar

Erica Girges

Zendesk Developer Advocacy

Hi Tommy!
 
Thanks for clarifying. Unfortunately, changing that 'custom' key isn't supported. It's just part of the metadata workflow. However, if you wanted I can pull our conversation into a ticket where you could provide more context around the functionality you're trying to achieve or code share. Maybe we can figure out a workaround together. 
 
Looking forward to your response!
 
Erica - Dev Support

0


image avatar

Erica Girges

Zendesk Developer Advocacy

Request #9709039 "[Community Post] About flagged t..." was closed and merged into this request. Last comment in request #9709039:

Hi Jennifer,

Is there any way to add this flag from the Zendesk API? Currently when I try to do it, it adds the flag to the 'custom' section of the metadata, as opposed to actually editing the 'flags' section of the metdata? Thanks!

0


Please sign in to leave a comment.

Didn't find what you're looking for?

New post