/streams
:
streamingUrl
to use to create the SSE stream. Additionally it returns a streamId
. Save this Id and use it to reconnect SSE in-case the stream disconnects.
streamId
returned in the original request.
streamId
to use in your /analyze
requests. This will send all the GenerativeAgent messages for that analyze request, to this SSE stream.
type
.
For a given analyze request on a conversation, you may receive any of the following event types:
processingStart
: The bot started processing. This can be used to trigger user feedback such as showing a “typing” indicator.authenticationRequired
: Some API Connections require additional User authentication. Refer to User authentication required for more information.reply
: The bot has a reply for the conversation. We will automatically create a message for the bot, but you will need to send back the response to your user. This can be text directly when on a text based system, or your TTS for voice channels.processingEnd
: The bot finished processing. This indicates there will be no further events until analyze is called again.transferToAgent
: The bot could not handle the request and the conversation should be transferred to an agent.transferToSystem
: The bot is transferring control to an external system. This is a system transfer function.authenticationRequested
event. Work with your ASAPP team to determine those authentication needs and what needs to passed back to ASAPP.
Based on the specifics of your API, you will need to gather the end user authentication information and call /authenticate
on the conversation:
Field Name | Type | Description |
---|---|---|
generativeAgentMessageId | string | A unique identifier for this webhook request. |
conversationId | string | The internal identifier for the conversation from the ASAPP system. |
externalConversationId | string | The external identifier for the conversation from your external system. |
type | string, enum | The type of bot response. It can be one of the following:
|
reply.* | object | If the type is reply then the bot’s reply is contained in this object. |
reply.messageId | string | The identifier of the message sent in the reply |
reply.text | string | The message text of the reply |
transferToSystem.* | object | If the type is transferToSystem then the variables to be transferred to the external system are contained in this object. |
transferToSystem.referenceVariables | object | A Hash map of reference variables to be transferred to the external system. |
transferToSystem.transferVariables | object | A Hash map of transfer variables to be transferred to the external system. |
transferToSystem.currentTaskName | string | The name of the current task that is being transferred to the external system. |