Condition

Create conditions to branch your chatbot flow.

For chatbot flows requiring a logical condition to be evaluated to branch out to the next step in the flow, you can use the condition action block.

With the help of Branch action block, you have the ability to create multiple branches based on certain conditions, which have their own conversational flows.

The default Sopro flow is using conditions to supports different message chat flows for identified prospects vs identified companies vs unidentified visitors.

Use case scenario:

Following are few of the scenarios in which the branch action block can be used:

  • Let's say you want to separate the flows for identified prospects vs identified companies vs unidentified visitors

  • When you want to branch out the flow based on a the time the chat is received.

You can create a set of conditions for each branch in the chatbot flow.

Each condition is made up of:

  • Variable - which contains the value to be compared.

  • Operator - specifies the operation to be carried out.

  • Value - the value against which the variable's value is to be compared.

All conditions will be evaluated with ANY if you want any one condition to be satisfied, and ALL if you want all conditions to be satisfied.

Operators supported

There are various types of operators that Sopro Webchat supports, they are:

OperatorDescriptionExample

Equals To

Commonly used when you want to match the value of the variable with the defined value

"City" 'Equals To' "New York"

Not Equals To

Commonly used when you don't want the value of the variable to be matched with the defined value

"City" 'Not Equals To' "New York"

Contains

Commonly used when you want the variable to contain the defined value

"URL" 'Contains' "Web"

Does Not Contain

Commonly used when you do not want the variable to contain the defined value

"URL" 'Does Not Contain' "Web"

Is Empty

You can use this operator to identify whether the variable is empty or not

"Phone" is 'Empty'

Is Not Empty

You can use this operator to ensure that variable is not empty

"Name" is 'Not Empty'

How do I set it up?

You can follow the following steps to set up the branch action block;

  1. Add action block on canvas by clicking on '+'

  2. Choose 'Condition'

  3. Configure it on the right panel

    • Add a Branch: You can add multiple branches by clicking on '+ Branch'. The maximum number of branches that you can add is 10

    • Define the condition: Click on the branch to open the configuration window. You can configure following once the panel opens up;

      1. Variable: Click on 'Variable' to open the drop down list of the defined variables and select the variable as per your preference

      2. Operator: Click on 'Operator' to open the drop down list of supported operators and select it as per your preference

      3. Value: Define the value with which the variable value will be compared with. Here you can enter multiple values by hitting enter and they will be displayed as chip

    • Choose 'Any/All' condition: You can select either of the condition from Any or All Any: System will route the visitors through this branch if any of the condition is met or holds true All: System will route the visitors through this branch if all the conditions are met or holds true

Last updated