Skip to main content
When contacts are routed to the wrong branch in your workflows, the issue typically involves condition logic, empty fields, or data type mismatches. This guide walks you through the most common if/else problems in the HoopAI platform and how to resolve them.

Contacts routing to the wrong branch

1

Review the condition operators

Open the if/else step in your workflow builder and verify the operator for each condition. Common mistakes include using equals when you need contains, or is when you need is not empty.
2

Check the condition values

Ensure the value you are comparing against matches exactly, including capitalization and spacing. For example, if you are checking a tag called VIP Customer, the condition must match that exact string — vip customer will not match with the equals operator.
3

Verify AND vs OR logic

If your branch has multiple conditions, check whether they are joined by AND (all must be true) or OR (any must be true). Click the logic toggle between conditions to switch.
4

Test with a known contact

Use the Test Workflow button and select a contact whose data you know. Trace which branch they follow and compare it against the condition logic.

Empty field handling

If a contact’s field is empty (null or blank), most condition operators will evaluate to false, sending the contact to the Else branch. This is the most common cause of unexpected routing.
OperatorBehavior with empty field
EqualsEvaluates to false — contact goes to Else
Is not emptyEvaluates to false — contact goes to Else
Is emptyEvaluates to true — contact stays on the If branch
ContainsEvaluates to false — contact goes to Else
Does not containMay evaluate to true depending on the platform’s null handling
When building conditions that rely on fields that might be empty, add an Is not empty check as the first condition in an AND group. This prevents unexpected behavior from null values.

Nested conditions not evaluating correctly

1

Flatten complex logic when possible

Deeply nested if/else steps can be difficult to debug. If you have more than three levels of nesting, consider restructuring your workflow to use separate branches or multiple if/else steps in sequence.
2

Check each level independently

Start from the outermost if/else and verify the condition works on its own. Then move inward, testing each nested level. This isolates which specific condition is failing.
3

Review the execution logs

Go to Automation > Workflows, open the workflow, and click Execution Logs. Filter by the affected contact and trace their path through each if/else step to find where the logic diverges from your expectation.
Execution logs show which branch a contact followed at each if/else step, along with the field values evaluated at that moment. This is the fastest way to diagnose nested condition issues.

Custom field type mismatches

Custom fields have specific data types that affect how conditions are evaluated. A mismatch between the field type and the condition operator will cause unexpected results.
Field typeWorks withDoes not work with
TextEquals, Contains, Is emptyGreater than, Less than
NumberEquals, Greater than, Less thanContains
DropdownEquals, Is not emptyContains, Greater than
DateIs before, Is after, Is emptyContains, Equals (use date-specific operators)
CheckboxIs true, Is falseEquals, Contains
1

Confirm the field type

Go to Settings > Custom Fields and check the data type of the field used in your condition. Make sure the condition operator is compatible with that type.
2

Update the condition operator

If you are using an incompatible operator, open the if/else step and change the operator to one that matches the field type. For example, change Contains to Equals for dropdown fields.
3

Re-test after changes

After updating the condition, test the workflow again with a contact to confirm the correct branch is now followed.

Best practices

  • Use descriptive branch names (e.g., “Has email — send nurture” instead of “Branch 1”) so the logic is clear at a glance
  • Add an Else catch-all branch that logs or tags contacts who do not match any condition, so you can identify gaps
  • Document complex condition logic in the workflow’s internal notes
  • Test every branch path before publishing

FAQs

If/else conditions support custom field values and contact properties, but not calculated formulas. If you need computed logic, use a webhook to an external service or set a custom field value in a prior workflow step.
Date fields include time components. If your condition checks for a specific date, the contact’s field may include a time that causes a mismatch. Use Is after and Is before operators with date ranges instead of Equals.
There is no hard limit, but performance and readability degrade with more than 10 conditions in a single step. Break complex logic into multiple sequential if/else steps for clarity.
Last modified on March 5, 2026