Start a Session

To start a session with the bot, the request body from the external channel BotSendMessageRequest must have the type TextMessage. Here the customer sends a “Hello” message to the bot. The requestId is an optional UUID that you can provide to help track the requests.

Then retrieve the ExternalSessionId from the external channel, for example, a Slack or Twitter thread ID. We’re using a random UUID for the external session ID in the sample code.

Start the session using the startChatSession() method.

Retrieve the bot’s session ID from the BotResponse object. Use this session ID to continue and end the session.