All Channels - Condition Steps
Table of Contents
Condition steps can be used in the Bot Editor for all available channels like AlcmeonChat, WhatsApp, etc.
They are used to create branches in your scenarios based on a test. For example, you can test whether the customer sends their message during your business hours or not; or whether they entered a specific text; etc.
Condition on schedule
Creates 2 branches based on the business hours defined for this channel:
- HO (business hours) if the local time of the customer's message, translated into the time zone defined for business hours, is within business hours.
- HNO (non-working hours) otherwise.
📄 NB: You can configure your working hours per channel from the “Settings / Working Hours” page.
Condition on entered text
Allows you to define one or more branches (unlimited number) by testing whether the text of the client's last message exactly matches a certain value. A default "else" output is present in case the text of the client's last message does not match any of the tested values.
For example, by defining the 2 outputs:
- “customer service” if the customer’s last message is exactly “advisor” or “agent” or “speak to an advisor”.
- "welcome" if the last message from the client is exactly "menu" or "welcome" or "home" or "return".
…if a customer sends the message:
- “advisor” => he will go through agency 1
- “advisors” => it will go through the “otherwise” branch by default
- “return” => it will go through branch 2
- “welcome back” => it will go by default through the “else” branch
📄 NB: The test is case-insensitive, but is sensitive to accents, cedillas, and other letter derivatives in all alphabets.
📄 NB 2: To validate a test in the keyword entry step, press "enter", then type another test and press "enter", and so on. If you forget to press "enter" and save, when you reopen the step, nothing has been saved...
Condition on Custom Field
Allows the user to define one or more scenario branches by testing the values of a custom field.
Possible tests are as follows:
- has a value
- = [text or number]
- <, > [number]
- contains, does not contain [text]
Condition on variable
⚠️Advanced feature, please contact Alcmeon support before using it.
Creates 2 branches based on the result of a test on one or more variables, one if the branch is true, the other if it is not.
The format of the condition to be written in this step is the "Jinja2" format https://palletsprojects.com/p/jinja/
For example, if earlier in the scenario the customer went through an action step that set the variable “intent” to the value “commerce”, then we can use this condition on the variable step to make 2 scenario branches by writing the condition intent == “marketing” and in this case the customer will take the exit “otherwise” since the condition has the result false.
Moreover, we added custom filters to allow our users to handle dates. The developper documentationcan be found here: https://developers.alcmeon.com/docs/jinja2-documentation-and-custom-filters-guide
Multiple conditions on variable
⚠️Advanced feature, please contact Alcmeon support before using it.
Creates multiple branches based on the outcome of multiple tests on a variable.
The format of the conditions to be written in this step is the "Jinja2" format https://palletsprojects.com/p/jinja/
Moreover, we added custom filters to allow our users to handle dates. The developper documentationcan be found here: https://developers.alcmeon.com/docs/jinja2-documentation-and-custom-filters-guide
Condition on user language
Available only for the Apple Message channel
This step allows you to retrieve the language set by the customer on their Apple device and create scenario branches based on this information.
Condition on user country
Available only for the Apple Message channel
This step allows you to retrieve the country defined by the customer on their Apple device and create scenario branches based on this information.