Question
Why are hidden conversation fields ignored in messaging metadata for branching AI agent responses?
Answer
AI agent can't reference a conversation field if the ticket field isn't included in the logic flow or isn't visible to the user.
Use the Sunshine Conversations API to retrieve the metadata set on a conversation after calling the API end-point called Set Conversation Fields upon widget load.
To retrieve the metadata:
- Select the Make API call option
- Configure the API call to get conversation API
- Use Sunshine Conversations variables to set the
app_idandconversation_idin the API URL - Set up the API call authentication with a conversation key
- Store the conversation key as a connection
- Make a test API call to save the conversation field in the "Metadata" JSON attribute as a variable, formatted as
zenticket_field{ticket_id} - Use this variable for branching conditions