There are two types of endpoints depending on who provides them: third parties or Certainly. In this article, we'll explore each of these:
Third-party system endpoints
Third-party-provided endpoints are used to notify the claim of an agent and post messages for the third-party system to keep track of the conversation. The clients who want to integrate their systems with Certainly to automate conversations will need to create two Webhooks:
- A Webhook in which Certainly can notify the third-party system that a user is claiming to talk with a human agent. This Webhook needs to accept a POST message with a JSON Body.
- A Webhook in which Certainly can send messages from the conversation between the user and the bot. This Webhook is also needed when the human agent takes over the conversation in order to receive messages from the user.
Certainly endpoints
Now, we'll cover the Certainly-provided endpoints for handover, takeover, and keeping track of the conversation. The placeholder {botdep_id} refers to the Bot Deployment ID.
- Get chat configuration: styles, persistent menu, etc: It is working right now without access_token.
GET /webbot/api/webchat/{botdep_id}/config/
- Conversational endpoint using Websockets: It is working right now without access_token.
It is the actual conversational endpoint. This endpoint is used when the user is talking with the bot or when the human agent has taken over the conversation. The flow of messages goes through the WebSocket connection.
GET /webbot/api/webchat/{botdep_id}/
- Handover Request to tell the bot to be set to listen mode as the external agent takes control of the conversation between the bot and the user.
GET /webbot/api/webchat/{botdep_id}/handover/{user_id}/
- Endpoint for the external agent to send messages to the user directly while the bot is in listen mode.
POST /webbot/api/webchat/{botdep_id}/handover/{user_id}/
- Endpoint to takeover request to tell the bot to resume control of the conversation in case it is needed.
GET /webbot/api/webchat/{botdep_id}/takeover/{user_id}/
- Endpoint to set up a Webhook to notify the Certainly Platform that human/external intervention is required.
https://app.certainly.io/bot/transfer/human/
-
Endpoint to allow an external agent to send messages of the desired Module to the user and drive the conversation to that Module.
POST /webbot/api/webchat/trigger-response/