Overview
You may need to use an API call that can fetch a list of options for both standard and custom fields in Kayako conversations, enabling users to select them from a dropdown menu in Integrately or another 3rd-party app. When you run an API call, you receive only the field ID without the required options.
Solution
The options for custom fields can be viewed with the include=*
parameter added in the API call. We got this API endpoint by navigating to the custom field and checking the network requests using the browser's Developer Tools.
You can follow the steps below:
- Navigate to the custom field in Kayako.
- Open the browser's Developer Tools and check the network requests.
- Identify the API endpoint for the custom field.
It should look something like this:
https://your-domain.kayako.com/api/v1/cases/fields/field-id - Add the `?include=*` suffix to the endpoint.
The final API call should look like this:
https://your-domain.kayako.com/api/v1/cases/fields/field-id?include=*
Below is our example custom field for which we attached a JSON response for the GET API call https://yourdomain.kayako.com/api/v1/cases/fields/16?include=*
:
This is the same endpoint as the URL, but with the ?include=*
suffix to indicate that all values should be included in the response. In the attached JSON file, field options are included along with their locales. If you want to use Integrately, they would need to parse the responses properly. Zapier also does this and even shows the field option IDs, for example, ID 23 for 'Select one':