Creating flow branches to target customers based on conditions
The Conditional Branch node lets you create multiple branches in a flow, assigning customers to a specific branch based on your specified condition(s).
This guide explains how you can leverage conditions in the Conditional Branch node for specific flows, use cases, and considerations.
- Shopify Checkout Integration
- Migrated Shopify Checkout Integration
How it works
The Conditional Branch node allows you to create multiple branches, each based on specific conditions. Customers who meet these conditions are directed to the corresponding branch. This setup enables you to move beyond simple IF and ELSE logic, allowing for more complex and tailored customer interactions.
Each branch is evaluated sequentially, with only the first branch that meets the customer's conditions being executed. If none of the conditions are met, an ELSE statement ensures that the customer still receives a tailored response. This system empowers businesses to craft personalized customer journeys that align with their goals and strategies.
You must set at least two branches. Branches are then executed in order from top to bottom, and you can adjust their sequence when configuring the flow.
Additionally, you can get granular with conditions by using AND or OR logic. You can use up to 10 OR logic blocks within a Conditional Branch node and 5 AND logic blocks within an OR block:
- Use
ANDlogic to ensure all of the specified conditions are met. - Use
ORlogic to ensure any of the specified conditions are met.
Available conditions
Review the chart below for a full understanding of the available options you can use to build your conditions:
Condition category |
Condition |
Purpose |
| Charge | Discount |
Target customers based on if a processed order contains a specific discount code. Discount is available as a condition for Rewards flows. |
| Customer | Number of active subscriptions | Target customers based on the total number of active subscriptions they have. |
| Customer | Subscription AOV |
Target customers based on their Average Order Value across all orders in Recharge. Recharge calculates the Average Order Value by dividing total subscription spend by the number of orders. Recharge calculates the total subscription spend by summing the line item prices, subtracting any discounts, and adding taxes and shipping. Refunds are not included in this calculation. |
| Customer | Total subscription spend | Target customers based on their total spend amount on all orders in Recharge. |
| Customer | Number of subscription orders processed | Target customers based on how many total orders in Recharge they have successfully processed, including both checkout and recurring orders. |
| Customer | Segment | Target a specific segment to apply the flow to select customers, or keep a specific segment of customers from entering the flow. |
| Customer | Streak count for subscription orders | Target customers based on where they are in their current subscription journey. This number represents the number of recent orders a customer has had in sequence, without any cancellations. |
| Customer | Tags |
Use Shopify customer tags to filter customers in Recharge flows. This allows you to target specific customer segments based on tags applied in Shopify. Recharge rolled out customer tag syncing globally on Feb 7, so older customers who haven’t had any store activity since then will not have synced tags. Tags are available as conditions in the following flows:
Note: Customer tags originate from various sources. For example, Recharge adds them after an order is processed, Shopify Flow adds them based on matching order conditions, and other third-party apps do the same. Recharge cannot guarantee a tag exists on the customer before the flow runs. When configuring the flow, consider which tags you will evaluate, and optionally add a Delay node before a Conditional branch to allow sufficient time for the tags to be applied.
|
| Line Item | Variant |
Target or exclude customers subscribed to a specific subscription product. Orders only enter a flow if they contain the subscription version of a product, even if the product can be purchased as both a subscription and one-time. If a processed order contains the one-time version of a product, it will not pass the line-item condition, even though it has the same variant ID as the subscription version. |
| Line Item | Collection |
Target or exclude customers subscribed to an item(s) in a specified Collection. Orders only enter a flow if they contain the subscription version of a product. The product can be purchased as both a subscription and one-time, but if a processed order contains the one-time version of a product, it will not pass the line-item condition, despite having the same variant ID as the subscription version. |
| Line Item | Property |
Target or exclude customers based on the custom properties on a line item in the customer's cart. Property is available as a condition in the following flows: |
| Shipping address | Country | Target or exclude customers based on the shipping country provided. |
| Shipping address | Zip code | Target or exclude customers based on the provided zip code. |
| Shipping address | State |
Target or exclude customers based on the state listed in their shipping address. State is available as a condition in the following flows: |
| Subscription being cancelled | Collection |
Target customers based on whether the subscription product being cancelled is included in a specific collection. This allows you to deliver one cancellation prevention experience to customers cancelling products from that collection, and a different experience to all other customers. This condition is only available for Cancellation Prevention flows. |
Number of subscription orders processed vs. streak count for subscription orders
Both the number of subscription orders processed and the streak count for subscription orders conditions refer to the number of orders a customer has made across all of their subscriptions. The conditions are different, however, in how the flow handles customers who have cancelled and then reactivated their subscriptions. If all subscriptions belonging to a customer are cancelled by either the customer or an admin at any time:
- The streak count for subscription orders resets to 1 on the next fulfilled recurring order
- The number of subscription orders processed remains unaffected and does not reset
The example below outlines the difference between the two conditions:
Step in the customer journey: |
Checkout order processed |
Recurring order #1 processed |
Customer cancels all subscriptions |
Customer reactivates their subscription, Recurring order #2 processed |
Recurring order #3 processed |
Number of subscription orders processed: |
1 | 2 | 2 | 3 | 4 |
Streak count for subscription orders: |
1 | 2 | 0 | 1 | 2 |
Use cases
Check out some of the most popular conditions other merchants are using when utilizing the Conditional Branch node, and how they’ve configured their conditions:
Use case |
Branch configuration |
|
Customers subscribed to specific products in a certain collection will receive an offer.
|
Remove the AB Test node and replace it with a Conditional Branch node using the A/B test new reward offering: Branch conditions:
Add an Incentive node in the first branch to choose what incentive (discount or free gift) customers with subscriptions to products in the collection will receive (ie. a free sample of a related product).
|
| Aim to reward customers who reach a streak order of 2 and consider their total subscription spend. |
Set the Conditional Branch conditions as follows when creating a rewards offering: Branch 1:
Offer a low-level incentive tailored to this branch or no incentive. The subsequent branches focus on customers who have a total subscription spend higher than 50 dollars. Branch 2:
AND
Use this branch to create a range between $50 -100 total subscription spend. Offer a better incentive than the prior branch tailored to customers with a mid-range total subscription spend. The remaining customers fall into the “Else” branch, where you can choose to offer an incentive to reward their loyalty, as the remaining customers will all have greater than $100 total subscription spend. |
| Customize rewards based on customer tags |
Set the following conditional branch conditions to target based on popular Shopify customer tags:
Update the first branch to offer tagged VIP customers a premium reward or experience. All customers who don’t meet the tag criteria enter the “Else” branch, where you can offer a standard incentive or no reward, depending on your strategy. |
Duplicate a branch
If your branches use similar logic, you can duplicate an existing branch instead of creating a new one from scratch.
To duplicate a branch:
- Open the Conditional Branch node.
- Select the branch you want to copy.
- Click Duplicate branch.
- Update the condition values as needed.
- Click Apply.
The duplicated branch appears directly below the original and includes all associated nodes on the canvas.
