The Future of Business is a Digital Spokesperson — Let’s Build a Preview Using Microsoft’s Bot Framework

Chatbots have been all the rage for the past couple of years — and the technology is quickly catching up to the hype.

As our trust in artificial intelligence grows, so too does our faith in letting it do more and more important work for us.

And what’s more important than interacting with your customers?

Well, A.I. is ideally suited for providing your customers with the personalized interactions they want — without you needing to hire a small army to man a call center.

Rise of the Conversational U.I.

The conversational user interface is about self-service — a major trend going back to ATMs. Self-service allows customers to solve problems on their own terms — while simultaneously reducing your costs.

The conversational U.I. is also a richer interaction — compared to websites. Providing your customers with a more natural and comfortable experience, while giving your business a deeper understanding of that customer’s emotions and urgency during the interaction.

Era of the Digital Spokesperson

If you project this trend out, it leads us to a point where A.I. could become the entire front end for your business. And in-fact, the consulting firm, Accenture, is already predicting exactly that.

Install the Bot Framework emulator.

The emulator is a desktop application that allows you to test and debug bots on your local machine (or via tunnel). It runs on Windows, Mac, and Linux. Just follow the provided directions to install — it’s super easy to use.

Step 1: Create the Repository

Next, go to the GitHub home page and register for a new account if you don’t already have one.

Once you’re signed in, click on the plus sign and “New repository.”

Enter a name for your new repo and hit “Create repository.”

Next, we’ll spin up the app…

Step 2: Create the Application

We need an Azure’s Web App instance to power the bot in the cloud, so go to your Azure Dashboard and sign in with your Azure account.

Click on the “+ New” button.

Then select the “Web + Mobile” and “Web App“ options.

On the Web App Create page, enter an “App name” — select a “Subscription,” — then create or select a “Resource group.” And the system should automatically create/choose an “App Service plan/Location“ for you.

Once everything is filled out, hit “Create.”

And after a few minutes, the new subscription will show up on your dashboard. Go ahead and click it (the App Service).

Replace PROFILE and REPO_NAME with the respective profile/organization and repository name you created in step #1.

Note: if you chose a branch other than master while configuring the “Deployment options” in step 2, then replace master above with the appropriate branch.

Set the environment variables.

To keep things secure, you’ll need to add your App ID and password to the Web App settings, so they don’t have to be configured in the app.js file (and publicly available on github.com).

Jump back to your Azure Web App dashboard from step #2 and click on the “Application settings” tab, then scroll down to the “App settings” section.

We need to add two environment variables: For the first one, enter “MICROSOFT_APP_ID” for Key and your App ID from step #3 in the Value field. And for the second one, enter “MICROSOFT_APP_PASSWORD” for Key and your respective app password for Value.

Then hit the “Save” button.

Verify deployment.

Once Azure finishes reconfiguring itself, you should be able to see your bot on the My Bots Dashboard.

Click on it.

Then click on “Test” and enter something in the message box.

You should see a response similar to what you got in the emulator above.

Good stuff!

Step 7: Connect the Bot to Other Channels

One of the biggest advantages of using the Bot Framework is the ease at which you can make your bot available on nearly all of the major chat platforms — so take advantage!

Simply click on whichever channel you want to add and follow the prompts.

That’s it!

Troubleshooting

If you’re having any problems with the application, be sure to check out the logs.

Emulator logs.

The emulator makes it pretty easy to track what’s happening.

Take a look in the “Log” section of your emulator for specifics.

Azure logs.

Within Azure, jump back to your dashboard and click on the “Diagnose and solve problems” tab.

From this tab you have access to a number of different tools that can help track down any issues.

Take it to the Next Level

Congratulations! You’ve successfully created a bot that can communicate across a wide range of channels.

But this demo is just a starting point — the real fun begins when you start adding more and more channels and capabilities to your bot. Building it up to a Digital Spokesperson.