Recent searches
No recent searches
Multi-select field via API
Posted Nov 09, 2021
Hi,
I'm trying to create a ticket via /api/v2/requests, using a specific form which has a multi-select dropdown field.
So far I've not been able to figure out how I can insert values into this field.
I've tried with (following the docs):
"custom_field_options": [
{"name": "Displayname of field", "value": "tag value"},
{"name": "Displayname of field", "value": "tag value2"}
]
"ticket_field": {
"custom_field_options": [
{"name": "Displayname of field", "value": "tag value"},
{"name": "Displayname of field", "value": "tag value2"}
]
}
Any ideas?
0
3
3 comments
Stephen Belleau
Olve Auråker what docs were you looking at? I thought it was supposed to be this:
https://developer.zendesk.com/documentation/ticketing/managing-tickets/creating-and-updating-tickets/#setting-custom-field-values
2
Olve Auråker
The only place I have seen multiselect referenced is here: Ticket Fields | Zendesk Developer Docs
BUT you seem to be completely right, it does work using custom_fields, I was just not able to figure out how to get multiple values parsed correctly using PowerShell.
I was trying to construct the array as a string and input that, instead of inputting the array object directly. Well, actually I had tried that earlier, but forgot to match the values to the field tag values instead of the display value which had a capital letter.
So adding a ".ToLower()" at the end of the array variable was all it took.
Thanks for getting me back on track!
0
Stephen Belleau
Oh interesting. I think the doc you were looking at is for creating a brand new ticket field via API. I guess that's mostly for a Zendesk migration or sandbox->prod deploy.
Glad you were able to get back on track 😄
0