Start context & Flow structure

What is a Start context block?

A Start context block is the default block required to build a flow.

It's an important building block for designing and building bots on Automate.

479

Start blocks can also be used for advanced flows using conditions such as Null and Listeners, which will be covered below.



How do you set it up?

โœ… Do thisโŒ Do not do this
The first block you pick must be the Start context block.Building the bot conversations without linking it to a Start context block.


895


โ—๏ธ

Start context block must be linked

The bot will not respond if the flow is not connected to a Start block



How do you structure the flow on the canvas?

The order of blocks on the canvas matters.

Every context flow starts from left to right (horizontal structure) then top to bottom (vertical structure)

One single context can have:

  • one Start context block
  • multiple Start context blocks


How do you order your blocks when you have multiple Start contexts?

When there is more than one Start context block within a single context, they will be processed according to:



  1. their hierarchy on a canvas (i.e. from left to right, then top to bottom):
1475


  1. the conditions we set as their output:
1509


What do you use multiple Start contexts for?

Multiple start context blocks help us build advanced conversational flows within one context.

It assists us in obtaining variables, within flows where the bot collects customer information e.g. Name, times or custom inputs. Custom inputs such as a keyword entity with product names.

Using multiple Start contexts we can redirect the user into other contexts if a required piece of information is missing e.g. user needs to be authenticated. As well as listening for out-of-context queries such as requesting a human agent.

We can divide our flow into specific stages (starting at separate start context blocks) and allow entering or omitting parts of the flow depending on predefined conditions.

See the example below:
If the conditions defined in Start context: when are not met, this context will just be omitted and we will proceed straight to the following one, i.e. Start context - summary.

For example, a full phrase "make a transfer of 20 euros to James for tomorrow" fulfils all conditions required for the Start context - summary to trigger.

In other words, each variable condition has been captured:

  • the amount of money 20 euros
  • the person name, James
  • the time, tomorrow


1284


What outputs can a start context have?

The start context can contain specific outputs, defined by us. It could be:

  • a specific intent (See Listener section below)

  • a variable (See Setting output conditions with variable section below)

  • a check if it is true or false (equals 'null' or not). (See Setting output conditions with Null below)



Listeners

Listeners are another use case for multi-layered Start flows.

Thanks to Automate's canvas hierarchy, we can add a set of Listener with the Start block, to trigger specific intents when the user has typed phrases such as:

  • Asking for a human
  • Asking for help if they are stuck
  • Starting the flow again or restarting completely e.g. going back to the main menu
  • Any other relevant intent


Unlike other platforms, Automate's NLU does not constantly listen to every intent that has been trained, in every given context.

With Listeners, we are able to specify which intents we listen to.

Below we have an example of a Listener Start context. This Listener will be set to trigger for the intent "restart", redirecting the conversation to the "restart" context.

The main flow of the context remains below in the hierarchy. It will continue down this path as intended, unless "restart" is triggered by the user.

1004


๐Ÿ“˜

Triggering Listeners

It's important to note that a Listener can be triggered at any point of the main flow.
If the conversation is multiple blocks down the main path, and the user triggers a Listener, it will stop and redirect to the Listener.



How do you set up listeners?

1303


  1. Ensure the flow is positioned above the main flow (for hierarchy).
845


Setting output conditions with Null

On Start blocks, it is common to use what we call null conditions, when we collect information from users.

Null allows us to check if we have a specific piece of information: a variable, input and intent, or just simply checking if any data exists at all.

๐Ÿ“˜

Using Null

You may use 'null' to signify whether a condition has been met or not.

If = null, then the condition is empty. The intent or variable has not been filled.
If != null, then it means we have the intent or variable already.

The below example of Start context: when is checking if the entire context itself "memory.transfer" equals "null" AND if the "time" variable also equals "null".

This means no variable or information is present, so proceed to the Ask - time block and ask the time.

In Start context - summary, the conditions are set to "!=", meaning does not equal to "null".

If all conditions/variables have been asked and collected to memory, then trigger this flow only.

In other words, we have met these conditions:

  1. We have information in the memory
  2. We have the person name variable
  3. We have the time variable
  4. We have the amount of money variable

Therefore, the flow can proceed to the next block, Say - summary.

Setting output conditions with a variable

When creating a more advanced flow, we can set multiple Start contexts depending on particular variables.

The example below is from a bank card activation flow, containing 3 different flows checking for 3 different variables.

1133

Each Start context has been set to check for a specific variable.

  1. First Start context: Checks for the last 4 digits of the card (last_4_digits).
  2. Second Start Context: Checks for the expiry date (time).
  3. Third Start context: Checks for the CVC number (numeral).

Based on each of these scenarios, each Start context flow requires all 3 variables to proceed and complete the flow at number 3.

Note: Each variable must be a trained variable in the NLU.


Whatโ€™s Next