XFlow App

Workflow condition: Customer criteria

12 min read
image

Before you begin

Description

Filter and branch workflows based on customer profile data and behavior, so each customer follows the path that best fits them.

How to set up Customer criteria condition:

  1. Add criteria and choose AND / OR logic.
  2. Select a variable that matches your needs (you can edit or remove it anytime).
  3. Set the operator and value to define the condition.
  4. Add more criteria if you need multiple conditions.

Available customer data fields

A list of customer data fields you can use to build conditions and personalize workflow paths.

image
FieldData TypeDescription
Order count
customer.numberOfOrders
NumberTotal number of orders placed
Total spent
customer.amountSpent.amount
NumberThe total amount a customer has spent on orders in their lifetime.
Signed up date
customer.signUpDate
DateWhen customer signed up for notification
Last order date
customer.lastOrder.createdAt
DateDate of most recent order
Customer tags
customer.tags
Text/ArrayTags assigned to customer
Accepts marketing
customer.acceptsMarketing
Boolean (True/False)Email marketing opt-in status

If the correct data type is not entered, the "compare value" will not appear in the workflow condition.

You can combine these fields with operators and AND/OR logic to:
  • Segment customers
  • Personalize workflow paths
  • Send different messages based on customer behavior or profile data

Examples:

  • Order count: Target customers who have placed at least 3 orders.
  • Total spent: Target customers who have spent more than $500 in total.
  • Signed up date: Target customers who signed up before Jan 1, 2024
  • Last order date: Target customers whose most recent order was more than 90 days ago.
  • Customer tags: Target customers who are tagged as VIP.
  • Accepts marketing: Target customers who have opted in to email marketing.

Available operators

Operators define how a customer data value is compared in a condition. They help you check whether a customer meets specific rules.

Operators are evaluated at the moment the workflow runs, ensuring your conditions always use the most up-to-date customer data.

Combining multiple criteria with AND/OR logic in a condition

When building a condition, you can add multiple criteria. You can then choose how these criteria are combined to decide whether the condition is evaluated as true or false.

AND - If all criteria are met

Selecting AND means the condition is true only when all criteria are met.

AND logic: Enabling highly precise and controlled targeting.

Example:

Trigger: New customer sign-up

Condition: Customer criteria (Check if Total spent ≥ 300 AND Customer tags include Loyal)

If True

Action: Create discount code
Action: Send email (Send loyalty welcome email with special offer)

If False
Action: Send email (Send standard welcome email)

image

This condition is True only when both criteria are met.

If either the total spent is below 300 or the customer does not have the Loyal tag, the workflow goes to the False branch.

OR - If any criteria are met

Selecting OR means the condition is true when at least one criterion is met.

OR logic: Providing flexible targeting with multiple paths to entry.

Example:

Trigger: New customer sign-up

Condition: Customer criteria (Check if Order count = 0 OR Signed up date is today)


If True
Action: Send email (Send first-time welcome email)


If False
Action: Send email (Send returning customer email)

image

With OR logic, the condition is True if at least one criterion is met.

If Order count = 0 or Signed up date equals February 1, 2026, the workflow follows the True branch.

If neither condition is met, the workflow follows the False branch.

Example of workflow condition: Customer criteria

Example 1: Customer criteria - Order count

Trigger: New customer sign-up

→ Condition: Customer criteria - Order count > Greater than or equal to > 1 (customer has placed at least one order)

→ Action (If True): Add customer tags (automatically adds the "loyalty member" tag to the customer's profile)

→ Action: Send email (sends a loyalty program welcome email to the customer)

🔗 Learn more: Loyalty program enrollment
image

Example 2: Customer criteria - Total spent

Trigger: Product restock

Condition: Customer criteria (Total spent ≥ 1000) (Check if customer is VIP / high spender)

If True
Action: Create discount code (Create VIP discount code)
Action: Send email (Send VIP back-in-stock email with discount)

If False
Action: Send email (Send standard back-in-stock notification)

🔗 Learn more: Back in stock with tiered response
image

Example 3: Customer criteria - Signed up date

Trigger: New customer sign-up

Condition: Customer criteria (Signed up date = 2026-02-14) (Check if Signed up date equals a specific date)

If True
Action: Send email (Send special welcome or anniversary email - Valentine)

image

Example 4: Customer criteria - Last order date

Trigger: Product restock

Condition: Customer criteria (Last order date) (Check if Last order date is 90 days ago)

If True
Action: Send email (Send special back-in-stock email)

image

Example 5: Customer criteria - Customer tags

Trigger: New customer sign-up

Condition: Customer criteria (Customer tags) (Check if customer tags include Wholesale)

If True
Action: Send email (Send wholesale welcome email)

If False
Action: Send email (Send standard welcome email)

image

Example 6: Customer criteria - Accepts marketing

Trigger: New customer sign-up

Action: Send email (Send welcome email)

Condition: Customer criteria (Accepts marketing) (Check if Accepts marketing = True)

If True
Action: Send email (Send promotional follow-up email)

image

Best practices

  • Start with the most important condition first: Place high-impact or broad conditions at the top to reduce unnecessary checks later in the workflow.
  • Choose AND vs OR carefully:
    • Use AND for precise targeting when all conditions must be met.
    • Use OR for broader targeting when any condition can qualify.
  • Keep conditions simple and readable: Avoid adding too many criteria in a single condition. If logic becomes complex, consider splitting it into multiple conditions.
  • Use clear, meaningful values: Choose thresholds that make sense (for example: order count ≥ 1).
  • Plan for the False branch: Decide what should happen when conditions are not met.
  • Avoid overlapping criteria: Ensure conditions do not unintentionally target the same customers across branches.
  • Test with real scenarios: Validate your conditions using example customers to ensure the logic behaves as expected.
Available triggers, actions, and conditions
Get started with workflow templates library
Create a workflow
Last updated