Agent Bots



AgentBot is a web service connected to a OneChat inbox and can act as a bot handling customer queries. OneChat allows you to easily connect your custom bot logic into conversation handling via AgentBot APIs.

Once you connect agent bot to an inbox, all the new conversations created in your inbox will initially be assigned 'bot' status. OneChat will send each conversation events to your bot URL as webhook events. To which your AgentBot can react through the OneChat APIs.

Workflow
The connected agent bot receives events like widget_triggered, message_created, message_updated etc based on customer action
The agent bot can process the information received and come up with a response.
The agent bot can also rely on external system APIs to fetch additional user information like order status, booking trigger, etc
The agent bot can also rely on services like rasa, dialogflow, lex etc to do intent detection
The agent bot can post the generated response back into the widget by calling OneChat APIs like message_create
The agent bot can toggle a conversation status to open to hand off the conversation to a human agent
The agent bot can continue to listen to open conversations and see if it can provide contextual information to the support agent.

Use Cases
Businesses with high volume customer support queries can use a bot to further authenticate and filter queries before passing to agents.
Ecom websites can hook up the bot to their existing database and provide order/shipping status.
News/Content websites can leverage card messages to send recommendations via bot.
Hotel/Movie booking websites can handle the booking via bot.

Look into interesting ways to leverage bot-message types on OneChat.

Adding Agent Bots to OneChat
There are two types of agent bots in OneChat.

Global Bots: Global Bots have a permission scope for all the accounts in a OneChat installation. They can interact with bot accessible endpoints in respect to any account in that installation.
Account Bots: Account Bots have a permission scope that is limited to the account for which the bot was cteated.

You can provision Agent Bots in OneChat either through our API or using Rails Console.

Creating agent bots via API
Global Bots can be created by interacting the agent bot APIs.
Account Bots can be created by interacting with the account bot APIs.

Creating agent bots via Rails console
Go to your OneChat directory and ensure your local server is running. Start a rails console in your directory.



Inside the rails console, type the following commands to create an agent bot and get its access token. Save the retrieved token as you would need to use in when calling the OneChat APIs.



Connect Agent Bot to your inbox by running the following command



FAQ

Human Agent Handoff ?
When an agent bot is connected to an inbox, conversations are created with pending status instead of open. This lets the initial triaging to happen via the bot before the conversation is passed on to an agent. When the bot decides that its best for the conversation to be handled by a human agent, it can call the conversation update API and toggle the conversation status to open.

Sometimes the agents would want to push back a conversation which was handed off, back again into the bot queue. They can do this by changing the conversation status back to pending again so that the bot can start responding to that conversation again.
Was this article helpful?
Cancel
Thank you!