Bots - Early Access

If you have own automated conversations solution to replace part of conversation to live agents with conversation to Bots, external bots API is available.

Bots are acting similar to agent role in comunication with customers, sending and receivning messages trough API endpoint. 

Beside name for bot, destination and webhookUrl are required for bot to operate. Destination is telephone number or Facebook messengerId where customers are sending messages to bots. WebhookUrl is used to deliver inbound message to external bot location.

The following methods for bot managements are available:

Disabling and enabling Bots:
To disable or enable Bot UPDATE endpoint can be used with the "enabled" flag set as needed.

Once the Bot is disabled, it will stop receiving any further inbound messages as well as it will not be able to send any outbound messages. All open conversations will get rerouted on the next inbound message. 

Sending Messages:
To send messages from a bot use our standard Conversation Messaging API.

Please note that Bot cannot start a conversation. Conversations can be initiated by the end customer only.

Sending messages as a bot, identifier x-agent-id must be used in header. This parameter's value is bot id and is used as bots identity.

Example request

POST /ccaas/1/conversations/9F1F21C198025CC026956A7E2E9C560F/messages HTTP/1.1
Host: {base_url}
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
Accept: application/json
x-agent-id: 09BB921757DEAC9BE79EC6259B31C8A
        "text":"Dear customer, thank's for everything."


Receiving Messages:

Unless there is an open conversation assigned to an agent, all inbound messages matching destination/channel combination assigned to an active bot will automatically be forwarded to its webhook URL via the POST Http method. If no open conversation is found, a new one will be created and automatically assigned to the Bot.

Transfering Conversation from Bot to Agent:

  • Conversation can be transferred to an agent by invoking the route endpoint.

It will remove Bot as assignee from the conversation, execute routing logic and find appropriate queue if any. If auto-assignment is configured, the conversation will be assigned to the first available agent.

The bot will stop receiving any further inbound messages for this conversation and it won't be able to send any outbound message.

  • Conversation can be also transferred to the agent by invoking update conversation endpoint, just changing parameter "agentId" to agents agentId.

This way routing is avoided and direct assigning is committed.

It is possible to set customer intent by adding a tag to conversation that can later be used in routing.

Documentation for adding tags to a conversation can be found here.

Conversation Metadata:
It is possible to store and manage additional information as conversation metadata that can later be used and shown to the agent managing the conversation.

Documentation for conversation metadata can be found here.