Changing an additional fields
Use method for changing already existing fields in the request window.usedeskMessenger.setAdditionalFields"
Use this method when you pass values into an existing query. The values you pass will be updated in the current ticket.
There is a limit for the query — no more than 3 requests per minute. If the limit is exceeded, additional fields will not be updated.
Request example
window.usedeskMessenger.setAdditionalFields( [ { id: 3840, value: "Text" }, { id: 4704, value: "Checkbox" }, [ { id: 4011,value: "Nested list" } ] ] )
How to work with custom fields
Getting the ID of an additional field
You can get ID of additional field in two ways:
1) Open Usedesk and go to Settings → Additional fields. The ID will be shown next to the field name
2) Using API, method "Get a list of additional fields".
How to get values of fields with "List" and "Nested list" type
Possible values of such fields can be obtained using API, method "Get a list of additional fields".
Passing values of different types of optional fields
The value of the field is passed in the value parameter.
- For text fields the value must not exceed 255 characters
- For checkbox fields — true/false
- For list fields — id of the variant