You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Unable to pass custom fields using Chat REST Api

Accepted answer
61
Views
5
Comments
edited Jun 8, 2022 12:09PM in General Technical Discussions 5 comments

Summary

Receiving Empty values when passing Custom Fields using Chat REST API

Content

I am having trouble passing the custom field values using the establishSession  api call. Here is the sessionInformation that I am passing.

{
    "sessionInformation": "{\"emailAddress\":\"test.contact@invalid.invalid\", \"firstName\":\"John\", \"lastName\":\"Doe\", \"question\":\"Test Chat\", \"customFields\":[{\"name\":\"movie_title\",\"type\":\"string\",\"value\":\"Avengers\"}], \"auxiliaryData\": {\"BROWSER\":\"Firefox\", \"OPERATING_SYSTEM\":\"iPhone OS\", \"USER_AGENT\":\"Mozilla/5.0 (iPhone; CPU iPhone OS 11_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.0 Mobile/15E148 Safari/604.1\"}}"
}

Per the documentation, I see that I need to pass name and value for text customfields and name and id's for custom field menus. Please let me know if I am doing anything wrong.

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!