This is the description of my requirement:
- When this happens (in Salesforce) - Trigger: New Account
- Do this (in Freshdesk) - Action: Add a new dropdown choice on the custom field on every Ticket with the Account Name created from Salesforce.
Here is the JSON body:
Here is the error I get:
Is it possible to add a new dropdown value from API call or you need to select manually from Admin/Ticket Fields/ dropdown choices?
Thx in advance!
Best answer by Keer
I hope you are doing well today. I see you are trying to add a value to the dropdown field test here. You can do that with ticket field udpate API call. The value and the poisition of the field has to be passed in the payload for the choice to be added.
For instance, the following API call would add email4 as an option to the dropdown field 82000275316 in position 4.
To get the ticket ID to be used in the PUT call, you can use list All ticket fields API. All the fields would be returned from which you can get the ID associated with the dropdown field you are trying to modify.
Once the choices are added, you can pass them in the create ticket API. 400 error would not be thrown then as the choices exists already.
I hope this helps! If you have further queries, please post them here.