Skip to main content

Virtual Agent API

Inbox 2.0 virtual agents allow enterprises to add bots to the platform as if they were real agents. They can respond to incoming messages, resolve conversations, apply topics, and set contact attributes. Instead of limiting the bot platforms that can be integrated, we provide a generic API that you can use to integrate with any platform.

To integrate your favorite bot platform with Inbox 2.0, you will need to provide an HTTPS endpoint. Inbox 2.0 calls this endpoint every time a conversation is assigned to your virtual agent and whenever the contact sends a new message. If you're using a synchronous bot platform, you can immediately answer this request with the response. If you're using an asynchronous bot platform, you can also send a POST request to Inbox 2.0 to send a reply to a conversation.

Two types of virtual agents​

Inception​

An inception virtual agent automatically picks up private conversations that start in the channels it has access to. If an inception virtual agent needs a human agent, it will place the conversation in the New queue so that any agent can respond. The inception virtual agent can also resolve a conversation if no human assistance is required.

Because an inception virtual agent automatically picks up conversations in the channel it has access to, you cannot create multiple inception virtual agents that have access to the same channel.

Delegation​

A delegation virtual agent will not automatically pick up conversations. Instead, a human agent can give a conversation to a delegation virtual agent at any point in the conversation. The delegation virtual agent will take over at this point. The handoff rule determines what should happen if a delegation virtual agent needs a human agent. If "New queue" is selected, the conversation moves to the New queue to be picked up by any agent. If "previous agent" is selected, the delegation virtual agent assigns the conversation back to the previous human agent.

Multiple delegation virtual agents can have access to the same channel. A human agent must specifically select the virtual agent to take over the conversation.

Add a virtual agent​

To add a virtual agent:

  1. Go to Admin settings, expand Virtual agents, select Custom virtual agents, and then select Add custom virtual agent.
  2. Enter a name for the virtual agent. This name will appear in Inbox 2.0 as "{Name} VA".
  3. Specify whether you want your virtual agent to be activated as an Inception agent or a Delegation agent.
  4. The Webhook URL must be provided to properly send conversation information to your virtual agent (see the Webhooks section for more information).
  5. Fill out the remaining fields as you like, including any handoff rules you want to add.
  6. Select Save.
  7. Scroll down to the Channel access section, and use the toggles to select a channel or channels where this virtual agent can be accessed.

Timeout virtual agent​

You can configure two types of contact rules for virtual agents:

  • Timeout virtual agent - Determines when a handoff (to the New or Resolved queue) will occur if the auto responder stops responding for any reason. The maximum you can set is 1 hour.
  • Timeout contact - Determines when a handoff will occur if the contact stops responding. The maximum you can set is 23 hours.

Error handling​

If the virtual agent connection times out, an error occurs, or if the contact times out, you can do the following:

  • Mark the conversation as New or Resolved
  • Automatically apply a topic
  • If the conversation is marked as Resolved, automatically send a standard reply to the customer

Edit or delete a virtual agent​

To edit a virtual agent, on the Custom virtual agents page, select the Edit icon. To delete a virtual agent, select the Trash icon.

View the secret for a virtual agent​

On the Custom virtual agents page, select the Edit icon next to the virtual agent. You can view or copy the shared secret generated for this virtual agent on the Edit custom virtual agent page. See the Securing webhooks section for more information.

Webhooks and REST API​