Create or Update a User Field Option with API
Hi! I want to create a new option for a drop-down user field and assign it to particular users inmmediately. I tried with this Post Request : POST /api/v2/user_fields/{user_field_id}/options. It seems that I created the option but I was not able to reassign that value to the user. I had to manually click save in the User Field page in my Admin Center and after that the new option appear. Can I avoid this part of manually clicking save to add the new option?
This is the output that i get. The first line validates that I created the option, but the second one, which is when i try to reassign it, says that it is not a valid option for the user field
-
Hi Juan! That API is only intended to create the options for users, not assign a value to a particular user. If the issue here is that you're updating it via the API but not seeing it in the agent interface, you will first need to refresh the page for the option to appear. User and ticket options will not automatically be added to the UI on create or update, however the values that you pass in to update the user or ticket will be updated without requiring a page refresh.
Please sign in to leave a comment.
1 Comments