Recent searches
No recent searches
Cannot use API to set values for ticket fields if it is drop down menu
Posted Jun 09, 2022
When we use API to update the ticket fields, we cannot update the fields when the fields are dropdown menu (selected from a list of pre-defined values)
If the field is free text, then we can use the API to update the value.
May I check if this is intended? is it possible to update the ticket fields using API if they are dropdown menu?
0
15
15 comments
Holger Hansson
I have the same issue I believe.
--> should update the field as far as I understand. But it does not.
The ticket field json has this metadata (names replaced):
0
Erica Girges
When trying to update a custom dropdown ticket field value, your request body should look similar to this:
Hope this helps!
Erica
0
Frank Burke
Hello,
I don't agree with your point that doesn't use API to set values for ticket fields if it is a drop-down menu. can you please explain to me why we don't use API????
0
Christopher Kennedy
Erica's comment breaks down the API endpoint you'd need to use to update an individual ticket's custom field value. Are you running into an issue?
0
Cheryl Hoskins
I am having a similar problem using `/api/v2/tickets/create_many` endpoint. I tried using the format Erica suggests above and it still didn't work. I found that if I use the associated tag rather than the custom field, it creates the ticket as expected. Should I expect to have to use the tag rather than the custom field when using `/api/v2/tickets/create_many` endpoint?
0
Tipene Hughes
Hi Cheryl,
Yes, you'll want to be using the tag as the value, in place of the dropdown display text. Here's an article which goes in to a bit more detail:
Setting custom field values
I hope this helps! Let me know if you have any questions.
Tipene
0
Be Clean Nj
Yes, this behavior is intended. When using the API to update Zendesk ticket fields, you cannot directly update fields that are dropdown menus with pre-defined values. These fields typically have limited options, and Zendesk doesn't allow API updates for such fields.
However, if the ticket field is a free-text field, you can use the API to update its value, as there are no predefined options restricting the input.
In summary, it is not possible to update ticket fields using the API if they are dropdown menus with pre-defined values. Only free-text fields can be updated via the API.
0
Maura frankline
This could be due to the way drop-down menus are structured in the system, which may not allow direct API input.
In this case, you might need to explore alternative methods for updating drop-down menu fields, such as using the provided UI or finding workarounds within the system's settings. Additionally, consulting the API documentation or reaching out to the platform's support team could provide further insights or potential solutions.
-1
Albin Nilsson af Sillén
Hi all
Are you able to bulk_import fields from type: tagger and multiselect?
Am using the ticket import endpoint ticket/import/create_many
Have successfull done bulk_import on text fields, however the values for the tagger is not being added?
My tagger field that I want to uopdate looks like this after JSON.stringify;
{"id":<IDOFTHEFIELD>,"value":["changing_distribution_"]}
Meanwhile, the trigger documentation states this;
"Single-select dropdown menu. It contains one or more tag values belonging to the field's options. Example: ( {"id": 21938362, "value": ["hd_3000", "hd_5555"]})"
0
Gouthami Munugoti
Hi Ahmed Zaid,
It is not working for us when trying to update a custom dropdown ticket field value.
0
Gouthami Munugoti
Hi Ahmed Zaid,
This is the endpoint we are using /api/v2/tickets/{ticket_id}
Am trying set the dropdown field value based the text field value on the organization.
We are not getting any error.
JSON Body:
0
Gouthami Munugoti
Hi Ahmed Zaid,
By using JSON we are trying to update the value.
organization field value is Direct and ticket field drop down tag is saves_direct.
We are having Direct field value for other field so we have added tag as saves_direct.
After your response we have also tried setting the organization field value as saves_direct and tested but it didn't work.
I need help with JSON to set the field value dynamically based on text field value.
0
Be Clean Nj
Yes, it's intended. API updates to dropdown menu fields require using specific pre-defined values. Ensure you're using the exact values as defined in the dropdown. It's possible to update these fields through the API by matching these exact values.
0
Darren Silcock
Hi folks, did anyone manage to achieve this. Having the same problem. Updating with either the exact pre-defined value or exact tag still fails. All other custom fields update correctly, only the the drop-down ones do not. It's also worth noting that the response returns 200 OK with no errors
0
Christopher Kennedy
Can you check the ticket events to make sure the changes are not being overwritten by trigger updates?
0