With Condition step, you can go to different steps/sub flows depends on conditions.
In your Condition step, click on "+ Add Condition Group" to set at least one condition group. "Otherwise" group is always there.
You can make as many condition groups as you need. The matching start from the top to the bottom, once a group matched, the system goes to a named step. When it fails to match all condition group, the "Otherwise" group will take over it. So it's always a good practice to name a step in the "Otherwise" group even it is very unlikely to be used.
Another important thing to know is the difference between "All conditions" and "Any conditions". It is sitting at the upper right corner of each condition group.
You can list more than 1 condition in a condition group. When you do, it matters whether you choose "All" or "Any".
"All Condition" means to get this group matched, you will need to have all the conditions matched in the group.
However, to get a group with "Any Condition" matched, you only need to have one of the conditions matched.
Tag & Sequence Condition
For tag and sequence condition, you can choose "in" or "not in" from the "Operator". Choosing multiple tags/sequences is allowed.
Text Variable Condition
These are all the operators for text condition.
For "has any value" and "is empty" of all variable types, when you clear a variable, the variable becomes empty. Thus, "has any value" is false and "is empty" is true for this variable.
Number Variable Condition
These are all the operators for number condition.
DataTime Variable Condition
These are all the operators for DateTime condition.
Note that you will need to put "value" always as the correct format "yyyy-MM-dd HH:mm:ss" no matter which displayed format you choose for that variable.
Please note that - "before/after" is different from "time before/after". The former compare the whole datetime value while the latter only compare the time value.
JSON Variable Condition
These are all the operators for JSON condition.
Note - The very last 3 operators, "has item matched with ...", require the JSON to be a list of variables, not a list of JSON. In other words, if your JSON is storing a list of normal variables, these 3 operators work. They won't work for a JSON storing a list of JSON.
Custom Input
Custom input is built for compare values in JSON variable. Search "custom input" in the if field:
Pick a value from a JSON, then you can compare it as you use the text variable condition.
Math Formula
With this operation, you can now do formula calculation directly in the Action Step - "Set Variable Value" and Condition Step - "Value".
Math operations and function supported:
+, -, *, e, pi, PI, abs(), min(), max(), ceil(), floor(), log(), pow(), round(), sqrt(), sin(), cos(), tan()
Please note that - If the formula is invalid, the system will return 0 to number variable and empty to text variable.
UChat also provides the following system variables to be used inside the condition node.
These relate to the email nodes where a specific email node is sent/delivered/clicked.
Condition | Explanation |
Email Click | Whether a specific email is clicked |
Email Opened | Whether a specific email is opened |
Email Delivered | Whether a specific email is delivered |
Email Sent | Whether a specific email is marked sent |
Opted-In for Email | Whether a bot user has been opted-in for emails |
True/False Conditions (Boolean)
These refer to the booleans variables whether a condition or variable is true or false
Condition | Explanation |
Subscribed to bot | Whether a bot user is subscribed to bot or isnt |
Has Interacted in last 24h | Whether a bot user has interacted in last 24 hours of the last interaction |
Is Guest User | Whether a user is a guest user |
Is Tester | Whether the user is a tester |
Is Admin | Whether the user is an admin |
Is assigned to agent | Whether the bot user has an assigned agent |
Has SSO user connected | Whether user has SSO connected |
Is Business Hours | Whether the time of interaction is within specified business hours |
Is assigned agent online | Whether the bot user’s assigned agent is online or not |
Has agents online | Checks if any live agent is assigned or not |
Integer/Numerical Conditions
Condition | Explanation |
Opted-In Date (minutes ago) | Represents minutes since the bot user has subscribed to bot |
Last seen (minutes ago) | Represents minutes since the bot user has last seen the message sent by the bot |
Last interaction (minutes ago) | Represents minutes since the bot user last interacted with the bot flow |
Last agent interaction (minutes ago) | Represents minutes since the live agent last interacted with the bot user |
Opted-In for Email (minutes ago) | Represents minutes since the bot user has been opted in for email |
Opted-In for SMS (minutes ago) | Represents minutes since the bot user has been opted in for SMS |
Shopping cart total price | Represents the total price of the cart present in ORDER JSON system,field |
Agent Id | System ID of the live agent |
Last FB Comment is existing user | |
Last FB Comment total new tagged user | |
Last FB Comment total tagged users |
Date/Time Conditions
Condition | Explanation |
Opted-In Date | Date of the user’s opt in |
Last Seen | Datetime field representing the last seen of the bot user |
BOT_CURRENT_TIME | Current time in present represented in workspace timezone |
Created At | Datetime field representing the timestamp the bot user was created |
Last Interaction | Datetime field representing the timestamp of the last interaction by the bot user |
NOW | Current time in present represented in UTC time |
Subscribed | Datetime representing the timestamp the bot user subscribed to the bot |
TODAY | Date field representing the date today |
System Fields Conditions
Condition | Explanation |
Agent Email | Represents the email of the assignedagent |
Agent Name | Represents the name of the assigned agent |
Browser | Represents the browser through which the user is interacting with the bot on web channel |
CRM Contact Id | Represents the unique Id assigned by the integrated CRM. (for eg GHL, Zoho etc) |
Channel | Represents the channel via which the bot user is interacting with bot |
City | Represents the city of the bot user |
Country | Represents the country of the bot user |
Department | Represents the department you want to assign the bot user |
Device | Represents the device via the bot user is interacting with the bot |
Represents the email of the bot user | |
First Name | Represents the first name of the user |
Flow Ns | Represents the the current mainflow Ns of the bot |
GMB Name | Name of the GMB Location |
GMB Place Id | Id of the GMB location |
GTAG Client Id | |
GTAG Session Id | |
Gender | Represents the gender of bot user |
IP | Represents the the IP of the bot user on web channel |
Instagram Id | Represents the Meta assigned unique ID of the bot user on Instagram |
Instagram User Name | Represents the Meta assigned user name of the bot user on Instagram channel |
Interest | Represents the interest of the bot user you cn assign |
Language | Represents the language of the bot user |
Last Button Title | Represents the last button the user clicked |
Last FB Comment | Represents the last comment made by the user on Facebook channel |
Last FB Comment Id | Represents the Id of the last comment made by the user |
Last FB Comment Post Id | Represents the Id of the post on which the last comment was made by the user |
Last Name | Represents the last name of the bot user |
Last Node Ns | Represents the Ns value of the node last visited by the bot user |
Last Text Input | Represents the last text input bot user entered |
Lead Source | Represents the source of the bot user you can assign |
Lead Status | Represents the status of the bot user you can assign |
Live Chat Url | Represents the URL link of the livechat of the bot user |
Locale | Represents the locale of the bot user |
Market | Represents the market of the bot user you can assign |
OpenAI Thread Id | Represents the current thread Id by the assistant run from OpenAI |
Page Id | Represents the Id of the facebook page |
Page Name | Represents the name of the facebook page integrated |
Page User Name | Represents the user name of the facebook page’s admin who integrated the page with UChat |
Platform | Represents the platform from which the bot user is interacting with the bot |
Profile Image | Represents the profile image of the bot user |
Region | Represents the region of the bot user |
SSO Url | This contains the SSO Url |
Sub Flow Ns | Represents the NS value of the subflow in which the bot user is currently in |
Timezone | Represents the timezone of the user |
User Id | Represents the User ID assigned by the system of the bot user |
User Name | Represents the username of the bot user |
User Ns | Represents the unique value assigned by UChat to every bot user |
System JSON Fields Conditions
Condition | Explanation |
CART | Represents the line items user has selected when using UChat native ecommerce |
Claude | Represents the chat history of the bot user when using Claude AI |
DialogFlow | Represents the chat history of the bot user when using DialogFlow |
Gemini | Represents the chat history of the bot user when using Gemini |
Last Error | Represents the Last error triggered by the bot user |
Last Message | Represents the last message the bot user went through |
ORDER | Represents the order placed by the bot user when using UChat native ecommerce |
OpenAI | Represents the chat history of the bot user when using OpenAI |
SELECT | Unique JSON that saves the key-value pair from the JSON the user has selected from the previous step. Is used widely in For Each option. |
SHOP | Contains the information regarding the user’s business |
User | Contains the complete information regarding the bot user |
Miscellaneous Conditions
Condition | Explanation |
Segments | Represents the segment the bot user belongs to |
Tag | Represents if the bot user has a certain tag or not |
Label | Represents if the bot user has a certain label or not |
Sequence Subscription | Represents if the bot user is subscribed to a sequence or not |
Closing Notes | Represents the closing notes assigned to the bot user |
Board | Represents the board the bot user currently is assigned to |
Notification Topic | Represents the notification topic assigned to the bot user |
Assigned Agent | Represents whether a certain agent assigned to the bot user |
Channel | Represents the channel the bot user belongs to |
Conversation Status | Represents the status of the bot user’s conversation (Done, Open, Pending etc) |
Custom Input | Allows the user to input custom inputs that doesnt necessarily fit into the various conditions provided by the user. For example using Custom JSON user fields. |
Add Comment