Advanced logic router uses “if, then” -type of logic to define what a bot should do next based on what has happened earlier. Here are some common use case examples to help you understand when and how you could make use of the node in your bots.
When wondering which inputs and operations to use as the basis of your logical conditioning, start by thinking what you want to make sure has happened before this point. Maybe one of these fits your case?
“If the price is greater/less than/equal to…”
Example case: If the user’s budget is less than 1000 euros, advise them to directly contact the resellers instead.
Input: Dynamic variable with type “number”.
Input collection method: Attach desired dynamic variables to any node where the user can input an answer (e.g. SingleChoice, MultiChoice or OpenField). If needed, use a Calculator node to calculate the total price from user inputs and use that new output variable as the input.
Operation: > (greater than), < (less than), >= (greater than or equal to), <= (less than or equal to) or == (equal to)
Example condition: budget < 1000
“If the user selected…”
Example case: If user wants to pick-up their pizza order from the restaurant, route them to a conversation path that doesn’t mention any price for the delivery.
Input collection method: Attach a label into desired answer choice(s) in SingleChoice or MultiChoice node. (Show options -> Labels -> Label group (Select/Create new) -> Label (Select/Create new))
Example condition: exists(pick-up)
Hint: You can also connect more than one Advanced Logic Router in a row. This can be useful for example if you are using MultipleChoice question.
Repeating the exist(label) conditioning for each of the answer choices in a MultipleChoice node allows you to check which conditions from the multiselection question are fulfilled and, if you will, show the user a selection-specific messages accordingly.
Example case: If user selected product A, B and C, show product description for each selection before moving forward.
“If user said/wrote/mentioned that…”
A) If the user mentioned in an OpenField answer that they are in a hurry with their matter, attach a special notion about this into the contact details of the lead.
B) If the user said that his/her country is Finland, advise them to be directly in contact with the local Finnish office.
A) Dynamic variable with type “text”
B) Lead data (e.g. Name, Email, Phone, Company, Location)
Input collection method:
A) Attach a dynamic variable into the desired open-ended question asked with OpenField. (Variables -> Select/Create new -> Read input)
B) Use a contact detail collection node (e.g. Name, Email, Phone, Company, Location)
Operation: contains (x,y)
*where x = text/keyword you want to check, y = variable attached to the question
A) consists (hurry, urgency)
*where hurry is a keyword and urgency is a dynamic variable
B) consists (finland, Location)