How to create a hybrid human + AI conversational experience with Dialogflow

Josh Barkin
Being Janis
Published in
8 min readJan 26, 2017

--

We’re far from being able to put 100% faith in technology to communicate with customers. After all, technology can’t empathize like humans and understanding human intent through a conversational software interface is no easy task. AI will continue to improve but consumers don’t have the patience for AI to learn. Your goal is to train AI to learn from your conversations so you can pursue a path to automation, while delighting and retaining your users in that process.

I’m going to show you how to setup and manage a human + AI conversational experience you can manage entirely from Slack.

Here is what you’ll need to get started:

  1. A free Dialogflow AI agent
  2. A free Slack workspace
  3. Janis added to Slack

When you add Janis to Slack, Janis will guide you through the setup. Janis integrates with a number of popular bot making tools and frameworks, but watch this video on how to deploy your Dialogflow agent to Facebook Messenger in 1-click and use Janis as a message delivery service for Dialogflow.

How to work with Janis

You can have a DM with Janis, but Slack includes channels where other humans and bots on your team can all work together. A channel is kind of like a work room in the workspace. Slack includes a #general channel by default, but you can create your own channels too and invite others. To invite Janis into a channel, simply say /invite @janis in the channel where you want to collaborate with others on your team on a bot project.

In addition to shared channels, Janis creates customer communication channels on an as-needed basis. These channels include a “j” (so they are grouped together). To help make channel management easier too (less noisy), Janis only opens customer communication channels when needed and will automatically archive customer communication channels after 24 hours of inactivity.

When a customer needs live assistance in the future, Janis will automatically unarchive a customer channel for you, and then archive the channel again 24 hours later. If you’re a small team, managing both your team and customer communication channels from one space can work well. This is how the Janis team works.

You might think that managing internal and external communications in one space can get difficult, but consider this scenario. You may need someone with specialized knowledge on your team to assist a customer. Just mention someone on your team while chatting in a customer channel and include your message. Your messages are NOT sent to your customer, so you can have side conversations with team members in Slack and tag team to solve customer problems.

If you want someone else on your team to take over, they just type freely in the channel without mentioning someone else on the team, and their messages are sent directly to your users.

Separating your communication channels by using separate workspaces

If you want to keep your external customer communication channels and your internal communication channels completely separate, then you could set up two separate workspaces. With one workspace for your team communications and the other for your customer communications, you can easily toggle between workspaces either using your mouse, or using keyboard shortcuts.

The yellow icon represents the active workspace, while you can toggle quickly to other workspaces

In this scenario, you would only need to add Janis to the workspace you have designated for the bot project. While separate workspaces might be one way to separate customer and team collaboration, keep in mind that a Janis pro account is tied to a workspace, and if you have multiple workspaces for multiple project, you would be billed for a Janis Pro account for each workspace.

Co-managing projects with other workspaces

If you manage multiple bot projects for clients, but want to share a complete bot project with other Slack workspaces, Janis supports a “Mother Ship” configuration. You can connect any number of bots and manage them from a single workspace, and then selectively share bot projects with clients or partners who are working from their own workspace.

There are a few benefits to this special configuration offered by Janis:

✅You can centrally manage all of your projects from one workspace, while your clients and partners can share responsibilities for just their bots and working from their own workspace.

✅You may be responsible for managing the automated experience for your client, but if you’re not going to be responsible for pausing the bot and taking over live to serve and retain their users, your client can do from their own workspace, using human agents working on their team, while still being able to communicate with you working from your workspace.

✅ With this configuration, your clients don’t pay Janis for services, but you can bill your clients directly and charge whatever you want. You might charge them for setup and training their own people as well as a monthly service fee. Shared projects that are linked to existing workspaces are billed to a single Janis Pro account. To share projects with your clients you would just need to subscribe to Janis pro, and then email us to let us know which bot we should link to which workspace.You might even have a single bot linked to multiple workspaces and you can collaborate across workspaces.

How to take over live and retain your users

Once you’ve configured Janis for your workflow, connected Dialogflow to Janis, and deployed Janis to Facebook, you’ll want to put Janis to work for you.

Alerts are key

Janis assumes that your bot will be the front line of communications, so Janis will monitor your automated conversations and send alerts to Slack that include emoji so you can act immediately.

🙊 Your bot had no response: You’ll get these alerts when your users hit your Default Fallback Message.

😱 Your user is angry, or frustrated: Janis can detect negative sentiment in your conversations and alert you immediately in Slack.

💁 Keyword triggers: Janis listens for words including help, human, agent, start chat, operator, and assistance, and alerts you in Slack.

🔔 Custom Alerts: You can add create alerts for any Dialogflow intent, and Janis will alert you when a user messages you and it matches an intent you want to track and act on.

Sample custom alert triggered from a Dialgflow intent

Send your bot a message

When you get an alert in Slack, click the link contained in the alert and Janis will open your customer communication channel with your conversation fully transcribed and include Facebook username and avatar so you’ll know who you’re chatting with.

Pause Dialogflow responses

Just start chatting from Slack in the customer channel. Janis will automatically pause your Dialogflow AI responses as soon as you send a message and other people on your team can see who responded.

Your message is delivered immediately to Facebook and added to the chat transcript:

Example: A human added the last message from Slack, and it’s sent to Messenger

Resume Dialogflow responses

If you want to resume your Dialogflow AI responses, simply type /resume in the Slack channel and Janis will resume your Dialogflow responses. Of course, you’re probably busy and you might forget to resume your AI when you’re done chatting, so Janis will alert you if you stop chatting and then automatically resume your AI after 10 minutes of live chat inactivity. You can extend that time too if you type /pause X, where X is the number of minutes you want to keep a live chat session open.

Janis maintains a full transcript of your conversation, combining Dialogflow and human messages.

Using Dialogflow to boost live chat productivity

While Dialogflow can be trained to understand human intent and automatically respond, you can also use the technology to assist human agents and make your live chat time more productive.

Let’s say for example that you get an alert from Janis that your attention is needed and you want to take over live. You click the link in the alert, Janis opens a customer channel and you start typing. Janis will pause your Dialogflow responses when you send your message.

For every user message you receive from your users, you can click to view Janis’ reply. If the message you receive from your user matches an intent, you’ll see suggested responses on the right side of your screen. Just click the green Send To User button for a response and Janis will push your Dialogflow response to your user.

Eliminating the need to type out a response to a frequently asked question can be a huge time saver. While you’re chatting live, you will likely still get FAQs, and Janis lets you reply with answers you’ve already saved in Dialogflow. If you don’t have a response saved in Dialogflow, just type out your response and click the checkbox. Janis will send your response to your user AND save your response in Dialogflow.

Ready to try it out?

Before you go…

  1. Like this article? Subscribe to our blog
  2. Applaud, recommend, and share this article with other bot makers if you found it useful.

--

--

Josh Barkin
Being Janis

Building conversational AI platforms since 2016