Answer
Use advanced workflow logic when the standard Rule Builder is not enough for the condition you need. Advanced logic lets you define conditional behavior using JSON logic, such as checking whether answers match, whether an option was selected, or whether multiple conditions are true at the same time.
Steps
Understand the basic format
Write each rule using this structure, below.
Replace the operator and values based on the logic you want to apply.
{ "operator": [ value1, value2 ] }
Reference a workflow answer
Use a variable reference to read the answer from another field.
Make sure the Field Name matches the workflow field label exactly, including capitalization.
{ "var": "Field Name" }
Use supported operators
Use
"=="for equals.Use
"!="for not equal.Use
"!"for not.Use
"in"to check whether a value exists in a list, such as a checklist or multi-select answer.Use
"and"when all conditions must be true.Use
"or"when any condition can be true.
Build more complex logic by nesting operators
Combine conditions inside one another when needed.
Example:
{"or":[{"in":["Eye Protection",{"var":"response"}]},{"in":["Face Shields",{"var":"response"}]}]}This example means: if the response includes Eye Protection or Face Shields, the rule evaluates as true.
Apply and test the logic
Open the route or condition where the logic should apply.
Switch to the advanced logic editor.
Enter the JSON logic.
Save the rule.
Test the workflow to make sure the logic behaves as expected.
Common Use Cases
When multiple conditions must be true
Example: route a user only when two conditions are both true.
{
"and": [
{ "==": [ { "var": "Hazard Present" }, "Yes" ] },
{ "==": [ { "var": "Supervisor Present" }, "No" ] }
]
}Use this when the next step should happen only if both conditions are met.
For checklist or multi-select answers
Example: route a user if a selected PPE item includes Eye Protection.
{ "in": [ "Eye Protection", { "var": "Required PPE" } ] }Use this when the answer is a list and you need to check whether a specific option was selected.
When either of two answers should trigger the same path
Example: route the user if either Eye Protection or Face Shields was selected.
{
"or": [
{ "in": [ "Eye Protection", { "var": "Required PPE" } ] },
{ "in": [ "Face Shields", { "var": "Required PPE" } ] }
]
}Use this when different responses should lead to the same follow-up question or branch.
To combine a checklist answer with another question
Example: route the user only if a specific PPE item was selected and the work area is the shop floor.
{
"and": [
{ "in": [ "Eye Protection", { "var": "Required PPE" } ] },
{ "==": [ { "var": "Work Area" }, "Shop Floor" ] }
]
}Use this when routing depends on both a selected option and another field value.
Use JSON logic to block or reroute based on an undesirable response
Example: route to a corrective-action path if the answer is not Yes.
{ "!=": [ { "var": "Guarding in Place" }, "Yes" ] }Use this when you want any answer other than the expected one to trigger a different path.
For nested conditions
Example: route only if the user selected one of two PPE options and the work area is the shop floor.
{
"and": [
{
"or": [
{ "in": [ "Eye Protection", { "var": "Required PPE" } ] },
{ "in": [ "Face Shields", { "var": "Required PPE" } ] }
]
},
{ "==": [ { "var": "Work Area" }, "Shop Floor" ] }
]
}Use this when the route needs a combination of grouped conditions.
Additional Details
Use advanced logic only when the standard Rule Builder cannot support the condition you need.
Field names are case-sensitive and must match the workflow exactly.
Nested logic can make workflows harder to maintain, so keep it as simple as possible.
Always test advanced logic before publishing workflow changes.
