Getting in Touch Using a Bot

In this walk-through we are going to take a look at how to use a brilliant feature called Agent. This feature is bridging the gap between bots and agents (advisers) as it allows users to speak with a person via the chat channel. Flow XO aims to provide services and features that are as simple and easy to use as they are useful.

You can install the flows that we have built for this walk-through using the below links.

Flow 1 — Connect to an agent and send message

Flow 2 — Disconnect conversation to agent

What is a Bot?

Bots are a new technology that has begun to thrive and they are used to provide automation via chat apps. There’s a wide range of uses cases for bots and they are proving to a valuable asset to most businesses.

How does it all work?

It’s simple to build a bot and you have a functional bot within minutes. You simply need a bot and a flow. The flow will contain the logic that is to be followed.

The bot that we will be looking at in this walk-through is quick and easy to build but it provides a sophisticated solution for contacting businesses. The bot will allow the user to contact the business via the chat app. On the back end, the messages are sent to the agent as an email. The agent can reply to the email, which will then be sent as a message to the user via the chat app.

What’s so great about it?

You’re probably wondering why use the bot to send an email when you can just send an email anyway. Emails are not as efficient as chat messages and they have to be dressed up with footers and logos if you want to look professional. Then you have all kinds of hurdles to get over just to get an email in someone’s inbox.

It’s just plain, simple messages without the need for all the niceties sent direct to the user, providing a hassle free way to communicate.

Why email instead of Live Chat, though? If you have agents that can be available to talk immediately then great! If an agent replies straight away it will feel the same as chatting live to someone for the user and you won’t have the added cost of a live chat service, which are often charged per agent.

But what about when you don’t have an agent free? Customers don’t want to sit watching a chat window, waiting to be connected to an available agent. It’s far more convenient to be able to send your message and not worry about watching the chat window. The customer gets a reply when someone is available to answer and the customer can reply back when it’s convenient for them. Everyone’s a winner.

Getting Started

Firstly, we’ve created a flow that is triggered by the Bot — New Message allowing the conversation to be started using keywords or phrases.

Tip: You could use the Flow — New Keyword trigger to start the flow instead. Using this trigger gives us the flexibility to start the flow from any other flow.
So if you have a bot that allows customers to ask for certain information such as the status of an order, tracking or account information you could then offer them the opportunity to contact someone if they need further assistance.
The complete flow

Getting the Message

The next step is to get the message from the user that they wish to send to an agent. This is done using a Bot — Ask a Question task because we need to collect information from the user. This simply needs to ask the customer what they would like help with.

Asking the user for the message details

Connecting to an Agent

Once you’ve collected the message from the user, you need to connect to an agent. Connecting to an agent allows two-way communication between the agent and the user.

Connecting to an Agent
Note: Any messages that are not recognised as keywords/commands that are sent while there is a connection will be sent to the agent. The conversation needs to be ended and you should let the user know how to end the conversation.

You can use the Metadata to pass additional information along with the message. If you were allowing users to contact you after requesting order information, you may want to use the metadata to pass the order number along with the message.

Tip: Using the auto-reply option allows you to manage the customer’s expectations by letting them know how long it typically takes to receive a reply.

Disconnecting from an Agent

When the conversation has ended, the connection to the agent needs to be stopped so that the bot is no longer forwarding messages to the agent.

This is done by setting up a new flow that uses the Bot — New Message to trigger it and it contains two tasks. One is the Agent — Disconnect action and the other is a Bot — Send Message action.

The send message task is used to provide the user with feedback so that they know the conversation with the agent has been ended.

Flow used to end the conversation

The keyword that I have used for the trigger of this flow is ‘/finished’. You might be wondering why the forward slash. Well, it’s because I’ve taken advantage of Telegram’s commands and Messengers persistent menu and we’ve also ensured that no message content is picked up as a keyword during the conversation with the agent.

If you edit your Messenger bot (Go to the Bot page within your Flow XO account) you’ll be able to add persistent menu items.

Messenger Persistent Menu

Telegrams equivalent to this are commands. You’ll need to go to BotFather on Telegram to add commands to your bot. The commands menu is accessed by either pressing the slash button or by typing a slash.

Telegram Command

Telegram’s commands always start with a forward slash. Our Persistent Menu option allows you to add a key and value for each menu item. The key being what the user sees on the menu and the value is what will actually get sent to the bot. By changing the value of my persistent menu item to ‘/finished’ I can use the same keyword to trigger the flow for either a Messenger or Telegram bot.

The Finished Bot

Both flows take less than 5 minutes to build and what you end up with is a super easy, cost-effective and convenient way for customers to contact you. You don’t have any of the hassles that comes with sending emails to customers, the cost or commitments required to have agents available for live chat.

And you also benefit from being able to respond immediately to make communication appear as quick as live chat but without the added cost of a chat service and a convenient fall back should there not be someone available immediately.