Bot/Bot Builder

Understand how to access Webex Connect Builder and create a new bot

The Bot integration allows you to trigger a flow or a rule at the occurrence of various events (such as Handover, Milestone reached, etc.) within Bot .

  1. Log in to Webex Connect with your credentials.
  2. On the left navigation bar, click ASSETS > INTEGRATIONS.
  3. Click ADD INTEGRATION > Bot (or Webex Connect Bot) to add a new bot integration.
  4. Enter the bot details (available within Bot interface)
    • Name: Name of the bot
    • URL: Bot URL to access the Bot (E.g http://imibot.ai/send)
    • ACCESS TOKEN: Token to invoke a live bot configured within Bot.
  5. Click Save to complete the Bot integration.
1054

Configuring 'Rules' based on Bot or Channel events

You can create rules based on Both events. For more information, refer Create and Configure Rules

Trigger EventsActions on triggered events
Custom Event
Handover
Milestone Reached
Notify
Unhandled Message
Select one of the actions from the available list based on your requirements.
Events based on the channel selection e.g. an incoming message on one of the digital channelsInvoke a Flow
Forward to Bot
Foward to BOT+CCSP

Communicating with BOT

  1. After the rule with a BOT, action is configured in the service, a new message from the customer on the configured rule trigger channel will be sent to the BOT on the configured Webhook, via chat engine.

  2. Chat engine will create a unique conversation ID of type BOT for a unique combination of asset ID, user identifier on the channel, the service, and the BOT.
    While communicating with a BOT, the same conversation ID must be used, unless the BOT chooses to close the conversation.

  3. If the Webhook does not respond within five seconds or in case of an error, a maximum of four attempts are made over the next one hour.

  4. In the case of five consecutive failed attempts, the Webhook is made temporarily inactive. To reactivate the BOT integration must be edited and Webhook must be re-verified.

  5. With each event, a unique conversation ID parameter is also passed. This conversation ID is used to identify a unique customer conversation; BOT platform is expected to pass the conversation ID back to the Webex Connect to identify the activity on the same conversation ID.

  6. The BOTs response is received on the Webhook URL that was generated for the added integration.

{
Conversationid : "", // auto-generated by IMI
ConversationType : "BOT" // if the conversation is of type BOT then only the BOT is expected to send a response
Message : "",
MessageType : "",
Messageid :"",
Media:"",
Channel : "",
Event : "Incoming message",
Timestamp : "YYYY-MM-DD hh:mm:ss.SS", //S in GMT
}
{
Conversationid : "",
ConversationType : "BOT"
PostbackPayload : “PAYLOAD VALUE”,
Channel : "FB",
Event : "FB POSTBACK",
Timestamp: "YYYY-MM-DD hh:mm:ss.SS",//in GMT
}
{
Conversationid : "",
ConversationType : "BOT"
Messageid :"",
Channel : "",
Event : "Message Delivery",
DeliveryStatus :”Delivered/Failed/Read”,
Description :”Error description”, //only in case of failures
Timestamp: "YYYY-MM-DD hh:mm:ss.SS",//in GMT
}
{
eventid : "1001",
conversation_id : "",
message : ""
Messagetype: "",
Timestamp: "", //YYYY-MM-DD hh:mm:ss.SSS in GMT
customparam1 :"",
.
.
.
customparamN: ""
}
{ 
eventid : "1002",//can be event type as the key name and predefined text as value well which ever suits the dev. 
conversation_id : "", 
Timestamp: "", //YYYY-MM-DD hh:mm:ss.SSS in GMT customparam1 :"", 
… 
customparamN: "" 
}

Conversation Between BOT and CCSP

When a rule is configured for BOT and CCSP, the first message of the conversation is always received by the BOT. Only when the handover event is received from BOT, the subsequent messages from the customer is sent to the CCSP.

The conversation ID with a BOT is the same during all interactions, unless the BOT closes the conversation, whereas, every conversation with the CCSP agent has a new conversation ID, which is closed on chat engine (when an agent closes the conversation).