Building the example flow

Let's dive into creating the interactive scenario

We will look at how you can build a complex interaction with a client using a simple example. Don't be intimidated by the word "complex", because it is made up of simple and straightforward steps.

The most important thing is to understand exactly how the dialogue will be structured and what we should eventually arrive at. Let's figure it out!

We'll take a hypothetical example.

We work in a bank, and want to automate the application process for opening a bank account. We will first greet the potential client, ask his name, and make sure that he meets the age requirement. In addition, if our client is over 60 years old, we'll offer him a special pension program and if he agrees, we will save the lead for the bank representative.

If our candidate is under the age of 18, we will notify them that we cannot open an account now, and we will be happy to wait for them when they reach the age of majority.

It would be nice to keep the client's name to make the communication a little more personalized and enjoyable. Let's do that, too.

So, we got a scheme like this:​

Here we have highlighted the main stages:

  • Greeting and saving the person's name into a variable;

  • The question about age with three options to choose from;

  • Rejection if the contact is under 18 (we'll let you choose the age again if the person made a mistake);

  • Asking if the candidate is interested in the special offer if the he is over 60 years old;

  • Sending a request with client's data to the bank representative;

  • Moving on to the application process.

Assembling the script

Variable

We mentioned a variable in which to save the name. It has to be created beforehand in the script settings section. To do this, go to the menu Automation → Flow builder → Settings → Variables.

Please keep in mind that variable names are case sensitive. For example, the variables 'Age' and 'age' are two different variables.

There we will create the variable. To do this, click Create, then set the name of the variable we understand (let's say ‘Name') and select the type—‘text'. If you want, you can set a description, so that you do not get confused later.​

Note: A variable is created for a specific contact and does not overlap with data from other dialogs. That is, the value of the variable will be different for different clients—the one that was received in a specific dialog.

Creating the flow

In the list of flows, we created two scenarios (we call it 'flows'). One we called 'Greeting', it will contain the instructions for the bot, which we described in the diagram above. The second one is 'Apply for account':​

The second flow should contain a sequence for gathering information and forming an application, but we only need it to demonstrate the move to it. We will create a simple message there, just to show the result of the move.

Note: none of our flows are active as shown on the screenshot above. In other words, they will not be executed. To enable the flow mark it as 'Default':​

Creating a greeting step

By design, this step should greet the potential customer and save his name after the answer. We discussed the creation of the step in the previous article, it shouldn't cause any difficulties. If you need to revise, refer to it out again.

So, let's go into the 'Client greeting' flow and create the first step. Since we want to ask the client a question and save his answer, we select the 'Question' step type.​

Now let's set up the step. We need to write the greeting itself, ask for a name and save it in a variable. We click on it and edit all the details:​

As you can see, we can upload an image so that it appears with the greeting. To do this, click on 'Choose file' under Image and select a picture. We will upload the logo of our imaginary "bank".

Now scroll through the step configuration panel below and select the variable where you want to save the name:​

Then we go to the bottom and click 'Save'. Our first step is ready!

Creating the age request step

Now it's time to create the next step—we'll find out the candidate's age category by offering them a menu choice. To do this, we'll need the Question type again. Let's create the step and name it 'Age option'.

Next enter a request to specify an age range and create three answer options: under 18, between 18 and 60, and over 60. To add a subsequent item, we will click the Add button. The screenshot shows the result after saving.​

The ‘Type' option can be left unchanged; by default it sets the move to step (next block).

Note: this step requires saving the answer in a variable, but since we don't need it, we'll choose the option with a dash. Below we've entered a message that the user will see if he enters the answer incorrectly.

After entering the data, save the block settings (Save).

Now we need to connect these steps to establish a scenario sequence.

Setting up a connection between the steps

We have two steps, but they are not linked yet. Let's make this link using the connection points, which are small gray circles. Click in one circle and drag the connecting line to the second circle:​

If you made the connection by mistake, click the connection line while holding down Shift. The connection will be deleted.

Now after executing the first step (Greeting and meeting), the system will move on to the next step (Age option) with which a connection has been created.

At this point, we have received the candidate's age category, and we need to respond accordingly.

According to our scheme, if the specified age is under 18, we should politely refuse to open an account and suggest applying later. In addition, we will offer to choose the age again if the user chosen it by mistake.

The Text Message step type will work for this. Let's create a step, enter a name (let it be 'Too young') and a message text. Below in the settings panel we'll add an option to re-enter the age. After saving we'll get the following view:

As you can see in the screenshot, we have linked the 'I'm below 18' menu item with the 'Too young' step. This menu item is no longer colored red, unlike the others, which don't lead anywhere yet.Let's create another link by connecting the 'I'm 18!' button to the 'Age option' block so that our candidate can re-enter the selection:

Now when enter the answer ‘1', the client will be able to re-select.

Next, let's deal with candidates in the 18-60 category. We'll immediately switch them to the application flow (we called it 'Apply for account', remember?). To do this, we do the steps as follows:

  • add an Action step (1),

  • click on it to go into settings (2),

  • click Add (3)

  • and select the 'Start flow’ action (4),

  • then select the 'Apply for account' flow from the dropdown list (5).

Let's give the step block a name—'Go to the application'. Then Save.

We don't forget to connect the block with the corresponding user choice:

This will execute the 'Apply for account' flow.

Let's move on. We are left with a pension category, to which we must offer special conditions, and if the client agree, create a lead for a bank representative, otherwise—switch to the application flow, as above.

Let’s create a text message type step and add a menu of two items. Then we write a greeting text and a couple of options to choose from—just like in the previous block. Don't forget to link the new block with the 'I'm 60+ y.o.' menu item from the previous block. We'll get this look:

Making a connectionNote right away that the second choice leads the candidate to the same place as the '18-60' category, that is, to the application process. So let's connect the second answer to the 'Go to the application' step:

For clarity, we moved the 'Go to the application' block to the right—you can do this by hooking the block header with the mouse cursor.

There is an option left when a prospective client has expressed a desire to learn the bank's offers for retirees and agrees to a call. We’ll create the request of call. For this we need the Commit lead block. Let's add it.

Now we'll set up the block. It has the usual text field—the message that our interlocutor will see, the ability to add a picture and menu items, and the settings necessary for our customer service department.

Let's write a text with a promise to call and below in the settings panel we set up a message for our colleagues in the 'Service settings' section:

Notification message contains the text that will be seen by the employees of our "bank" in the table located in the Leads section of the account page left menu. The data from the Name and Phone variables will also go there. Let's enter the notification text and click Save.

Below we can chose a tag for a more flexible distribution of leads among employees—these features we will discuss in another article.

This concludes our scenario according to the diagram we created at the beginning of this article. Let's zoom out and see what we've got:

As you can see, with the 1msg bot builder you can build complex and flexible customer interaction scenarios. In this example, we've shown only a small part of the features—but let's go further! In the next article, we'll take a closer look at the kinds of step blocks the builder offers.

Last updated