Analyze conversation
Call this API to trigger GenerativeAgent to analyze and respond to a conversation.
This API should be called after a customer sends a message while not speaking with a live agent. The Bot replies will not be returned on this request; they will be delivered asynchronously via the webhook callback.
This API also adds an optional message field to create a message for a given conversation before triggering the bot replies. The message object is the exact same message used in the conversations API /message endpoint
Body
The parameters for triggering the analysis and response to a conversation
Internal conversation identifier from ASAPP
"01BX5ZZKBKACTAV9WEVGEMMVS0"
The id associated with the connection where the responses should be sent to.
"97555020-0276-435f-8104-c378221ba292"
Name of the task to be used in the analysis
"UpgradePlan"
Input variables to be used as context in the analysis.
{
"call_context": "Customer called to upgrade their current plan to GOLD",
"customer_info": {
"current_plan": "SILVER",
"customer_since": "2020-01-01"
}
}
Represents a single message within a conversation.
{
"text": "Hello, I would like to upgrade my internet plan to GOLD.",
"sender": { "role": "agent", "externalId": 123 },
"timestamp": "2021-11-23T12:13:14.555Z"
}
Channel type used by the current request (digital or voice)
digital
, voice
"digital"
Response
Conversation identifier and message identifier if passed in the request
Internal conversation identifier from ASAPP
"01BX5ZZKBKACTAV9WEVGEMMVS0"
Internal message identifier from ASAPP
"01BX5ZZKBKACTAV9WEVGEMMVS1"
Was this page helpful?