How to determine if a field is standard or custom field via Zendesk Fields API
Posted Oct 11, 2023
We are using Zendesk Forms/Fields API to show forms to the end user in our own chatbot which is used to create a Zendesk ticket.
Currently, we are determining if a field is a standard or custom field based on the creator_user_id property that is present in the Fields API(/api/v2/ticket_fields.json?creator=true) response using the below logic
- If creator_user_id = -1 then its a Standard Field else its a custom field
While this logic has worked till now, we recently encountered an issue for one customer where a Dropdown field has creator_user_id as -1 but is a custom field which caused the field value to not be passed in the correct format during ticket creation.
I am looking for a clarification if the logic we are using is correct or should we fall back to having all the Standard fields listed and match them by name and treat everything else as custom fields
1
1 comment
Tipene Hughes
Hey Dharanidhar!
I'm following up with the product team who looks after this endpoint for more insight in to the expected behavior. That said, the logic you currently have implemented is correct and shouldn't be returning creator_user_id as -1. I'll have more information for you soon to confirm.
On a side note, where did you find this functionality documented? I'm not seeing it listed in the parameters for the Ticket Fields endpoint in the API reference docs. (I'm also working with the team to have this updated).
Thanks!
Tipene
0
Sign in to leave a comment.