Recent searches


No recent searches

[Solved] What is the API's expected behavior of "position" as a Ticket Field Option?



Posted Apr 18, 2023

Looking at https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_fields/, there are a couple references to the `position` attribute but I can't find anything that elaborates on its behavior.

I had thought that doing a POST to /api/v2/ticket_fields/{ticket_field_id}/options with different `position` values would change the sorted order of the options within the field, but it seems to have no impact.

My question:

  • Should sending the `position` attribute to /api/v2/ticket_fields/{ticket_field_id}/options change the sorting order?
  • Is the expectation that `position` is sequential starting from zero, or does Zendesk just do a lazy sort and any number is acceptable?
  • Does the functionality to change the position of an existing option not exist, and I should expect to recreate ALL the options each time a sort needs to be adjusted?

0

2

2 comments

image avatar

Sabra

Zendesk Customer Care

Hey Eric! The position attribute for the Ticket Fields endpoint affects the position of ticket fields when an account does not have multiple ticket form functionality. If your account does have multiple ticket forms, then the position of ticket fields is controlled by the order in which the fields are listed in the ticket_field_ids parameter of the Ticket Forms API. 
That being said, in order to prevent any potential issues, we recommend starting with position 1 and increasing sequentially by 1.
If you want to change the position of an existing option in a dropdown field, you will either need to click and drag the option to the appropriate spot in the UI or list the options in the order you want with the custom_field_options parameter in the Ticket Fields API. 
 

0


Thank you, Sabra. Based on your response, you can consider this resolved.

If you have a chance to connect with the documentation team, I think it would be helpful if https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_fields/ was updated with your information (foremost that reposting the entire `custom_field_options` array is the way to change the drop down order within the API).

0


Please sign in to leave a comment.

Didn't find what you're looking for?

New post