Blog

Rapid AI Bot development using Zwerm

Connecting your AI bot to 1000’s of applications using Zwerm, Zapier and Dialogflow.

Out of everything available in the market, these are three powerhouses of flexibility and strength. So what can you do with just these three tools and no coding? More than you think! Literally 1000’s of things. As our first example, we’re going to give users a special discount code when they provide us with their email address. So let’s create a small bot that will collect some data and send that to an email address and store the data it in a Google sheet. From there your imagination can go wild!

So what do you need?

  • First, you need an account with Zwerm, Zapier and Dialogflow.
  • Setup an agent in Dialogflow.
  • Add a bot in Zwerm and Connect Dialogflow
  • Start creating a conversation.
  • Make intents in Dialogflow and create all the questions you want the user to answer.
  • Add one extra intent which we are going to name “Get a special deal”.
  • Use as the utterances “Get me the deal”.
  • Create two parameters @name and @email and make them mandatory.
  • Also ask @approval, “Are you okay with receiving marketing messages from us?”
  • Create the prompts for when these parameters are missing.
  • Now add a text response to indicate to the user that we have all the data and he/she is done.
  • You can now execute the response.
  • Add a custom payload response.

Add a Custom payload response. Put the following code in.

{
   "#StaMP": true,
   "from:": "server",
   "type": "event",
   "event": "your.event.name",
   "payload": {
      "name": "$name",
      "email": "$email",
      "approval": "$approval"
   }
}

(See https://github.com/zwerm/StaMP for a description of all message types.)

You can use $parameter to use any values referenced in the Action and parameters section.

Now it is time to go back to ZwermIAM and add a Zapier webhook to your bot.

In order to use any data from the payload, you need to complete the “Pull in Samples” step for the “Catch Hook” trigger.

  • Create a Zap and choose webhooks
  • Click “Catch Hook”
  • Take the webhook URL and post it into the integrations section of Zwerm IAM
  • Click Test
  • In Zapier confirm “Okay I did this” – Zapier is now waiting for your event
  • Open your bot in the Zwerm App and message it to trigger the intent
  • Zapier will pick-up the incoming event and say “Test successful”
  • Click “Continue”
  • Congratulations, you can now use the payload data in your actions
  • Repeat this, any time the structure of the payload changes.
  • Configure the filter to only listen to your.event.name (you can change this to have multiple events dealt with differently in Zapier)
  • Go back to Zwerm and enter “Get me the deal”
  • Complete the answers to the prompts and,
  • In Zapier go back to “test this step” and retest until you get the payload with the correct information
  • In Zapier add a new step
  • Click Email
  • Add a “Send Outbound Email” action
  • Select correct information for each field (“To” field uses $email etc.)
  • Add a second trigger which will store everything in a Google sheet.
  • Create a new row
  • Connect your account
  • Select spreadsheet and worksheet
  • Indicate which parameter goes into which column
  • Finish and name your Zap
  • You can now go in to Zwerm IAM and test
  • Try saying “Get me a deal”
  • Answer all the bots questions and check your Google Sheets to see if all the data has inputted correctly
  • Now play around in Zapier with different actions and try to get the bot to do something different.

Useful Guides to expand on this are:

Building a Zap:  https://zapier.com/learn/getting-started-guide/build-zap-workflow/
Configuring your bot in ZwermIAM: https://prefer.atlassian.net/wiki/spaces/ZWER/pages/178782257/Configuring+bots 
Adding intents to Dialogflow: https://dialogflow.com/docs/intents

Now send us your solutions! We’re keen to hear what you made.

Using Webhooks with Zwerm: a step by step guide

You’ve got your bots working on Zwerm, and all is going well. But now you want to send an email with Dialogflow, and you’re finding yourself stuck. Worry no more – here we have a quick and easy step by step guide to walk you through it.

Step 1: Create a new intent

Create a new intent in Dialogflow (you should be familiar with this now, if not see our Switching Bots with Zwerm guide).

Step 2: Add a payload response

Add a custom payload response:


and then add the following code

{ 
"#StaMP": true,
"from:": "server",
"type": "event",
"event": "your.event.name",
"payload": {
   "name": "Christina",
   "email": "$email"
   }
}

(For a description of all different message types, go to https://github.com/zwerm/STaMP)

Step 3: Add a Webhook

Add a Zapier Webhook to your bot. To do this, you will need to complete the ‘Pull in Samples’ step for the ‘Catch Hook’ trigger, and to be able to use the payload data

  1. In Zapier click ‘Make a Zap’
  2. Choose Webhooks
  3. Choose ‘Catch hook’
  4. Click ‘Pull In Samples’
  5. Go down to ‘Test this step’
  6. Copy the URL
  7. In Zwerm create your bot
  8. Select its settings
  9. Choose ‘Integrations’
  10. Post the copied URL into the field titled ‘Webhook URL’
  11. Click Add, and then Test
  12. It should say ‘ 
  13. Now go into Zapier, still in ‘Test this step section’
  14. Click “Okay I did this”
  15. Zapier is now waiting for your event and will show one hook with event ‘zwerm.test’
  16. Open your bot through Zwerm and message it with the trigger phrase (ie: Send an email to name@email.com) to trigger the event
  17. If this doesn’t work ensure you have your phrases and actions set appropriately in Dialogflow
  18. Zapier will pick-up the incoming event and will now show multiple hooks
  19. Select the most recent one (usually Hook A) and check to see if it contains your payload name and email (payload.name, payload.email)
  20. Click ‘Continue’

Step 4: Configure the filter

Configure the filter to only listen to your.event.name

Step 5: Add an action

Add a ‘Send Outbound Email’ action into Zapier

  1. Click new action
  2. Choose Email
  3. Choose outbound email
  4. Select information based on payload
  5. Once this is done activate your Zap

And then… You’re good to go! Enjoy your emails…

Transfer your customer between two different chatbots

Two simple chatbots. Let’s call them ‘Red’ and ‘Blue’. What’s special about them is they allow the user to talk to either of them and swap between them.

You may be thinking, why have two? When one seems so much simpler? Well, by creating two separate bots on two different services that can interact with each other, the user gets the best possible experience by being able to maximize the quality of the information they receive. It creates flexibility for the customer as well as moving away from outdated linear ideas, and instead creating a network.

This article will take you through 5 easy-to-follow steps to create your own two bots in Zwerm.

Objective

Your objective is to create two separate bots, each using a different language processor, that can interact with each other. The ‘Blue’ bot will talk about all things blue, while the ‘Red’ bot talks about all things red. This is obviously just for demonstration purposes. You can fill in situations like a user talking to your operations department and requesting a financial statement in the process or having a temporary marketing campaign in your conversational user interface. The user will be able to talk to the bot, and if they wish to

speak with another bot who has more expertise in a certain area, the transfer between the bots will happen.

Outline

Following the completion of this tutorial, you will be able to:

  • Create a bot called “Blue bot” on DialogFlow
  • Create a  bot on Amazon Lex called “Red bot”
  • Set them both up as one single bot in Zwerm and any channel we support
  • Use events and custom fulfilment to let the user choose which bot they want to talk to

Requirements

Before you can begin building the examples of Red and Blue, you will need the following:

Step 1: How to build Blue on DialogFlow

Firstly, download the Blue bot archive we have prepared for you, to easily import into DialogFlow.

Once you’re in the DialogFlow Console, open the agent list drop-down menu in the left navigation. Select ‘Create New Agent’ at the bottom. In the form, enter ‘demo-blue’ as agent name, select ‘English -en’ as Default Language (this is often pre-selected) and then choose a default timezone. Either create a new Google Project or choose an existing one. Click create in the top right corner to continue.

Once the agent has been created, you will be taken to a list of intents. Ignore these for now, and select the settings symbol, then select the ‘Export and Import’ tab. Select ‘Restore from Zip’ and choose the archive provided. Type restore in the text field and click the Restore button to confirm the import.

Lastly, follow DialogFlow’s guide to retrieve your authentication key and keep it safe. You will need it later to set up the agent with Zwerm.

Step 2: How to build Red on Amazon Lex

First, download the Red bot archive we have prepared for easy import into Amazon Lex.

Open the AWS Console and navigate to the Amazon Lex Service home. Select ‘Actions’ and ‘Import’. In the pop-up dialog, open the file you’ve just downloaded and click ‘Import’ again.

 

(Note: In Amazon Lex you cannot have multiple bots of intents with the same name. If you get a conflict while importing, Lex will ask you what to do. In that case, we recommend you unpack the archive manually and edit the JSON file to avoid duplicate names before importing.)

Next, click on the name of the bot in the list to open it. In the top right corner, select ‘Build’ and confirm in the dialog. This may take a while but should build your bot without any errors. Once you have confirmation of the success, you can test your bot out on the right side of the screen.

For now, skip this step and select ‘Publish’ next to the build button. In the dialog window, enter ‘demo’ as an alias name and click ‘Publish’ to continue. After a few minutes, this will be finished.

Before you’re ready for the next step, write down the following things:

  • The name of your Lex bot (‘Red’)
  • The alias (‘demo’)
  • The region (‘us-west-2’)

You will need these later on. You will also need to create an IAM Access key and secret. Follow our guide for Amazon LEX to create them.

Step 3: Connecting your two bots to Zwerm

Now that Red and Blue are ready to go, you can now connect them to Zwerm.

Open the Zwerm IAM Console and select ‘Add a bot’ on your dashboard. If you haven’t set up a team yet, you will have to create one first.

The ‘Create new bot’ will open, so enter ‘RedBlue’ as the bot name and the bot ID will be filled in automatically. Select ‘DialogFlow’ as the engine and set it to API Version V2. Choose and upload the authentication key file you created in Step 1 and give it the label ‘Blue’. Click Create and you will be taken to the overview page of your bots. Click the bot name.

Next, you will need to connect your Red bot. In the settings on the left, select ‘Engines’. Choose ‘Amazon Lex’ in the drop-down list and select ‘Add’ to open the ‘Add Engine’ form. Give this engine the label ‘Red’ and fill in the form with the values you noted down in Step 2. Select ‘Save’ to finish connecting Red to Zwerm.

Before you move on, there are two values you need to note down. For both engines, in the list click on the eye-icon then view their details. In the popup window, find the ‘Engine ID’ shown at the top and write down its value.

Now it’s time to see your bots in action! In the left navigation, click on ‘Open in app’ to open the bot in the Zwerm app. Login (if necessary) and select ‘Testing’ in the navigation. If everything is set up correctly so far, you will immediately see Blue’s introduction message: “Hello. This is blue speaking. I talk about everything that’s blue.”

Go ahead and have a talk with blue. Try asking it the following:

  • What are your favourite things?
  • Tell me something about what you like.
  • What do you like?

At the moment, Blue is the only bot you can talk to. Move onto step four to change this.

Step 4: How to change between your bots

Zwerm makes it super easy to add more complex functionality to your DialogFlow agent. The next step is to hand over from ‘Blue’ to ‘Red’ when the user requests it.

To do this, open the demo-blue agent in DialogFlow again, and select ‘Intents’ in the sidebar. as you can see, you already have an intent set up for ‘Talk to Red’. Select it in the list to edit the intent and scroll all the way down to ‘Responses’ section at the bottom. You will now add an additional response to this intent, to instruct Zwerm to hand the user conversation over to ‘Red’.

Click ‘Add Responses’ and select ‘Custom payload’. Copy the following JSON into the editor field and make sure to replace TEAM-NAME with the name of your team and RED-ENGINE-ID with the value you wrote down in Step 3. Now select ‘Save’ at the top right of the page until your agent is rebuilt. You will get a notification about this.

JSON:
{
   "#STaMP": true, 
   "type": "event", 
   "event": "zwerm.handover",
   "payload": {
      "route": "TEAM-NAME/redblue/RED-ENGINE-ID",
      "event": {
         "event":"zwerm.welcome",
         "payload": {}
         "data": {
            "query": "get started"
         }
      }
   }
}

So, what happens here is that ‘Blue’ now returns to the zwerm.handover event as part of its responses for this intent, which causes the conversation route to update and the new event to be sent to the engine.

Long story short, the user is now talking to Red, and Red has received the zwerm.welcome event which will make Red welcome the user.

Try it out! Send Blue bot one of these messages:

  • Talk to Red
  • I’m bored
  • Go away!

Now that you’re having a conversation with Red, how about switching back to Blue? It’s a very similar process. Open the ‘Red’ bot in AWS. Select the ‘TalkToBlue’ intent in the left column. Scroll down to responses and click ‘Add Message’. Change the type to ‘Custom Markup’ and copy and paste the following code into the editor field. Don’t forget to replace TEAM-NAME with the name with the name of your team and BLUE-ENGINE-ID with the value from previous steps.

Code:
{
   "$StaMP": true,
   "type": "event",
   "event": "zwerm.handover",
   "payload": {
      "route": "TEAM-NAME/redblue/BLUE-ENGINE-ID",
      "event": {
         "event": "zwerm.welcome",
         "payload": {}
      }
   }
}

Now scroll further down and click ‘Save Intent’, then click ‘Build’ in the top right corner and confirm in the pop-up. This will take a few seconds, but once done click the blue ‘Publish’ button next to it, choose the ‘demo’ alias and click ‘Publish’ again.

(Note: it might take a while until you receive the updated version of the Lex bot. It’s best to use an anonymous user in Zwerm’s testing tool.)

Step 5: Go for it!

That’s it! You’re good to go. Switch between your bots as you please. You can now see firsthand the benefits of having two bots, so why don’t you try it with your customers?

Machine learning and AI: improving your business performance

Machine learning and AI continue to make extensive progress within a variety of industries.

However, the potential for AI to improve your business’ performance requires a different approach. Managing chatbots, analytics, data retention and operation expenditure over a large number of channels can be challenging.

Key areas of interest

Companies who are planning to embrace these innovative technologies need to think about two key things. How to successfully implement an AI bot, and how to successfully manage it.

Firstly, implementation can easily go pear-shaped with a lack of adequate planning. This can be avoided simply by using a comprehensive development canvas, that takes you through each step and helps you plan for all possible outcomes.

Secondly, it is one thing to have a chatbot in your company, but being able to successfully manage it is a whole new ballpark. One of the best ways to do this is by using a management platform.

What you need to be looking out for

Delivering performance to the app is crucial. It’s not just about how fast the bot can pump out data or support services. 

Therefore, the management platform must be able to cater to the entire environment in question, not just one or two aspects. An expert management platform will aid you in continuously developing your bot for optimal outcomes. Keeping both you and your customer happy.

With a comprehensive management platform, like Zwerm, it will enable your business to seamlessly integrate, deploy, control, and monitor your bot(s) from one easy location. You can even take over from the bot if needed, which can help to identify areas of improvement. The success of your bot has so much potential, so make sure you do it right. 

Source Material:  https://www.information-age.com/benefiting-ai-data-management-123471564/

The Other Side: Are chatbots hurting your business?

Chatbots have been taking companies by storm, and most of what we see is why they’re so great. However, what we don’t see, is how they could be hurting your business.

The other side

Sure, they save time, they are cost-effective and can deal with unlimited requests all at once. It’s easy to be blindsided by the benefits. However, when making a big decision for your business it is important to also think about the potential negative impacts.

Firstly, bots are still continuously being developing and modified, and although are complex in their own right they do not match the complexity of the human brain. And there is bound to be a few mistakes that could actually cost you a customer.     

Chatbots can be incredibly useful in answering some questions, often on the more basic side of the scale such as product pricing. However, there are some customer-experience roles they just can’t handle. And those roles happen to be extremely important.

The reality is that bots are just a series of computer programming. They have no personal experiences or emotion to be able to relate to the customer and their needs. And this right here can be a huge downfall for a business.   

I like the idea of chatbots, but how do I avoid these aspects?

I’m glad you asked. One way to counteract the potential negative impacts of chatbots is to employ an AI management platform, such as Zwerm.

With a management platform, you can watch over all your bots from one convenient location. And, on the off chance your bot can’t adequately answer a customer’s query, you can jump in and take over.

Chatbots are a great development, and they are extremely beneficial when used as a compliment to humans. And that compliment should entail a management platform.

Make your life easier with an AI management platform

No one likes an angry customer, and if your chatbot is the cause, there is now a solution.

Bots are great

AI bots are great for companies: they’re efficient and save time and money. They don’t, however, match the complexity of the human brain. And like us, they get it wrong sometimes.

Lets say you’ve recently switched to using a bot to answer questions customers have about your product. For simple questions, about things like the basic features of your product your bot is managing really well. It directs customers to where they need to go or who they need to talk to.

But…

However, when your customers start asking more complicated questions, or even asking more than one question at once, your bot can’t respond properly. The bot is forced to ask repeatedly for the customer to simplify their question so it can understand what they’re asking, but by doing so it isn’t allowing them to ask their more complicated question at all.

Zwerm, our saviour

Zwerm is a new and innovated AI management platform that is sure to make corporate life easier for you. It provides the ability to monitor conversations as they happen in real time, and take over from the bot if needed.

ZwermGraphic

This preventative method ensures that your customer service staff can provide assistance when questions are too complicated, or when the bot doesn’t know where to direct the customer.

By preventing the problem before it is even is a problem, you can make sure that your customer’s experience is streamlined and effective.

By keeping the customer engaged and making the bot easy to communicate with, it is far less likely that your bot is going to make your business appear shortsighted. Hence strengthening your brand image and also preventing the worst case scenario, of putting customers off dealing with your company in its entirety.

By being able to add input and guide the conversation where needed, you can safely identify areas of needed growth and development for your bot. All without losing the interest of your customer!

AI management in its element

Artificial intelligent bots are relatively new to most businesses, so there’s bound to be a few speed bumps. No matter how big or small. That is where Zwerm comes in.

 

 

World leading new AI chatbot platform launched

Our digital world has been improving over the last decade faster than most of us can run. There are new developments in the artificial intelligence sphere happening everyday. The most recent, however, has been developed in little old New Zealand! Contrary to popular belief, we don’t just farm sheep and beef. We also dabble in artificial intelligent chatbot platforms.

Well, Zwerm does at least.

What in the world is Zwerm?

Zwerm is a new cutting edge product that has been developed by Zwerm Limited. Most of you know about chatbots, (virtual robots you can have a conversation with), but Zwerm is something special. Something more.

It is a platform that can manage a swarm of conversational robots. This allows organizations to rapidly improve their customer engagement through robots, from one single platform.

Essentially, this is a platform that manages all types of channels that are using chatbots. What Hootsuite is to Social Media, is what Zwerm is to conversational artificial intelligence.

 

The alternative is having to deal with multiple bots, over a bunch of different interfaces (no thank you!)

Sounds pretty appealing, doesn’t it.

Here’s a bit of trivia for you: ‘Zwerm’ is also the Dutch word for ‘swarm’, which is a pretty fitting term, if you ask me.

But how exactly does Zwerm operate?

Well, Zwerm eliminates the need for companies to spend their valuable time and money solving these issues themselves. It supplies a comprehensive platform that provides a management suite. That is one, unified application programming interface (API) allowing conversational AI robots to communicate across a wide range of channels. It can even integrate with over 1000 systems!

Why us?

Conversational bots revolve around making it easier and cheaper for organizations and customers. And because experts are developing robots with increasingly sophisticated natural language processors, they are becoming more and more complex. So what better way to make it easier on yourself than to get Zwerm to do all the heavy lifting for you?

Zwerm, bot force management to reshape enterprise customer engagement

New Zealand’s first public platform to manage a swarm of conversational robots, which allows organisations to improve their customer engagement using robots rapidly.

Wellington, August 15th, 2018 – Zwerm Limited released an “artificial intelligent bot management platform” called Zwerm. Zwerm enables businesses to focus on conversations with their customers, while Zwerm takes care of the heavy lifting of implementing a conversational AI strategy.

The wide range of use for robots using conversational AI revolves around making it easier and cheaper for organisations to communicate with customers on a one on one personalised basis. As robots develop with increasingly sophisticated natural language processors, they are becoming more complicated and interdependent.

Zwerm eliminates the need for organisations to spend valuable time and money solving these issues themselves. By supplying a comprehensive platform that provides a robust management suite, a single, unified application programming interface (API) that allows conversational AI robots to communicate across a wide range of channels and integrates with over 1000 systems Zwerm decreases the cost and increases the speed of moving New Zealand businesses into the next era of engagement.

About Zwerm
Zwerm Limited, founded in 2018 as a spin-off of Prefer Limited, aims to provide Zwerm as an independent product. Prefer Limited developed Zwerm, which is the Dutch word for ‘swarm’. It’s a pretty fitting term, with the abilities to manage the full range of components that go into a conversational AI robot as one.

About Prefer
Prefer Limited, founded in 2011 with the goal of providing conversations with impact! Prefer specialises in conversational AI, application development and website creation, with a team of around 10 people.

Media enquiries
For more information contact

Zwerm
phone: +64 22 676 8606
email: comms@zwerm.io

Prefer
Web: prefer.nz
phone: +64 4974 9633
email: comms@prefer.co.nz