AI Agent/Webex AI Agent

Understand how to access Webex Connect Builder and create a new AI Agent

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

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

Configuring 'Rules' based on AI Agent 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 AI Agent+CCSP

Communicating with BOT

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

  2. Chat engine will create a unique conversation ID of type AI Agent for a unique combination of asset ID, user identifier on the channel, the service, and the AI Agent.
    While communicating with an AI Agent, the same conversation ID must be used, unless the AI Agent 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 AI Agent 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; the AI Agent platform is expected to pass the conversation ID back to the Webex Connect to identify the activity on the same conversation ID.

  6. The AI Agent's 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 AI Agent and CCSP

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

The conversation ID with a AI Agent is the same during all interactions, unless the AI Agent 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).