Skip to main content

Journeys > Condition node

The condition node is a powerful tool to segment the customers going through your flow based on specific criteria.

Updated over a week ago

For example, use the condition node to check if customers who have purchased something from your shop in the last 2 weeks. Then: If no → send them a special offer to entice them to If yes → ask for feedback on their experience or considering up/cross-selling

ALL vs. ANY conditions

In charles there are two ways that you can connect single conditions within the Condition Builder:

  • ALL: a customer must meet all conditions to be included in this flow path

  • ANY: a customer must meet 1 condition to be included in this flow path

Want more details? Click below ⬇️ to deep dive into an example and see how ALL vs. ANY change the outcome.

Example

ALL is more exclusive. When using an ALL joiner, somebody must meet all the conditions in order to be included. For example, if you create a segment of people who have a certain tag and have placed an order, this will only include people who fulfilled both criteria.

ANY on the other hand is more inclusive. This means that somebody only has to meet one of the conditions in order to be included. Using the same example, let’s say that we build a segment of people that have a specific tag or have placed an order. In this case, somebody only needs to have placed an order or have the tag, not both.

While this will include everyone who is in our ALL segment, it will also include people who have the tag but have never placed an order and vice versa.

For this reason, segments with ANY conditions would be larger than segments with ALL conditions.

When using the ALL and ANY joiners, we must pay attention when we have a negative condition. The goal then is to check if none of the elements satisfy a certain condition. When using the OR connector in a negative condition, it is better to use the ALL joiner instead of ANY. This is because ALL checks if all elements satisfy a condition, while ANY checks if at least one element satisfies a condition.

For example, we want to display all the clients that don’t live in Canada or US. Naturally, we should use the ALL joiner to check that a client is neither living in Canada nor in US. First it will check if a client is not in Canada and then not in US; only if the client is in neither, it shall be displayed.

If you are not sure which to use when building a condition, think about the number of people who meet the conditions. If you use ANY when you should instead use ALL, this number will likely be much larger than what you expect.

Rules

Events that have happened

Events form the foundation of personalized messaging flows. They can include actions such as filtering if someone placed an order, triggered a flow or clicked a campaign link. By using events, you can create an engaging experience, making it more relevant for the end user.

Rule

Filters

Description

Example/s

Source

Person has placed an order

Where;

- Items contains x

- Discounts contains x

- total order value is greater/less than x

Check the contents or value of their last order and funnel customers into different flow paths.

- If a customer has placed an order more than 2 times in 30 days

- If customer has brought a product that contains “makeup”

- If a specific discount was used

- What the total order value is

Shop system

Clicked a campaign link

Where; - Campaign name is [completed campaigns]

Filter the flow based on whether a customer has engaged with a certain campaign.

-If a customer has clicked a campaign link at least once in the last 30 days

- If a customer engaged with last year’s Black Friday campaign

charles

Triggered a flow

Where;

- Flow name is [available flows]

Check if a customer has triggered a certain flow before funnelling them into different flow paths.

- If a customer has triggered a flow more than 2 times in the last 1 hour

- If a customer triggered the product finding flow

charles

Received a message

Where - Sender is [Staff/Flow/AI agent/Campaign]

Check if a customer has received a message from a certain sender before funnelling them into different flow paths.

-If a customer has received a message at least once in the last 30 days

- If a customer has received a message at least once over all time from the Welcome Flow.

charles

Properties about a customer

Tags are labels or identifiers that can be assigned, through the Manage tag node, to users based on specific attributes or answers they have given. You can use tags segmentation to enable targeted messaging based on their unique attributes. To learn how to add Tags using Journeys, click here Storing responses of your customers

Rule

Description

Example/s

Source

Tags

Filter the flow based on tags from a customer’s actions or previous responses

- If a customer is shopping for women’s clothing vs men’s

charles

Birthday

Check if a customer’s birthday is empty or not

-If a customer has a birthday in their profile or not

charles

Email

Check if a customer’s email address is empty or not

-If a customer has an email address in their profile or not

charles

Custom properties

Filter the flow based on custom properties from previously saved responses

- If a customer is shopping for women’s clothing vs men’s

charles

Has open service desk ticket

Check if a customer still has a service desk ticket open before continue a flow

- If a customer has an open service desk ticket

Service desk ticket tools

Opt-in status

Make sure you stay GDPR compliant with an opt-in status check. If already opted in, funnel the customer to start the flow. If not, get them to opt-in first.

Rule

Description

Example/s

Source

Person’s opt-ins include

Filter the flow based on specific opt-ins.

- If a customer opted in for a specific event or VIP sale

charles

Has at least one opt-in

Contacts having at least one opt-in.

❗️We recommend always checking if a customer has at least 1 opt-in to be GDPR compliant.

charles

Last activity was an opt-in

The customer’s last subscription activity was an opt-in.

❗️Be even more GDPR compliant and check that the customer’s last activity was to opt-in to receive communication from you.

charles

Last activity was an opt-out

The customer’s last subscription activity was an opt-out.

❗️Be always GDPR compliant and check if the customer’s last activity was to opt-out in order not to send any messages.

charles

Person has no opt-out

As a customer can have multiple opt-ins, this helps to segment based on who hasn’t opted out of them.

- If a customer hasn’t opt-ed out

charles

To be super GDPR compliant, the best combination is: Last activity was an opt-in + person has no opt-out

Flow variables - charles

Rule

Description

Source

Preferred name

Contact’s preferred name

charles

First name

Contact’s first name

charles

Last name

Contact’s last name

charles

Name

Contact’s full name

charles

Nickname

Contact’s nickname

charles

Contact’s channel ID

Contact’s channel ID

charles

Person ID

Contact’s person ID

charles

Contact's email

Contact’s email

charles

Contact's phone number

Contact’s phone number

charles

Last updated

Contact’s last update timestamp

charles

Date of birth

Contact’s date of birth

charles

Last updated subscription name

Name of the last updated subscription

charles

Last updated subscription status

Status of the last updated subscription

charles

Last updated subscription timestamp

Timestamp of the last updated subscription

charles

First subscribed date

The 1st time the user has ever subscribed

charles

Last unsubscribed date

The last time the user has ever unsubscribed

charles

Trigger message text

The text content of the message that triggered a flow

charles

Flow variables - shop systems, webhooks & Klaviyo

To use the flow variable rules, the condition node needs to be connected to a shop system or Incoming webhook trigger or the outgoing webhook node. This way, the available variables can be fetched and used within the condition node.


Shopify Flow Variables based on an event (Order Confirmed, Parcel Sent, Tracking URL Changed, Abandoned Cart):

Rule

Description

Source

Custom ID

Order's custom ID

Shopify

Order name

Name of an order

Shopify

Order summary

Short textual summary of an order

Shopify

Total gross

Order total gross value

Shopify

Total net

Order total net value

Shopify

Total tax

Total amount of taxes paid

Shopify

Currency

Currency used for an order

Shopify

Provider

A provider handling the fulfilment

Shopify

Tracking URL

URL used for tracking a package

Shopify

Custom tracking ID

A custom ID used for tracking

Shopify

Custom ID

Custom ID of an abandoned cart

Shopify

Name

Name of an abandoned cart

Shopify

Summary

Summary of an abandoned cart

Shopify

Amount_total_gross

Total gross value of an abandoned cart

Shopify

Amount_total_net

Total net value of an abandoned cart

Shopify

Amount_total_tax

Total amount of taxes paid in an abandoned cart

Shopify

Discount_amount_total

Total amount of a discount in an abandoned cart

Shopify

Currency

Currency used for an order in an abandoned cart

Shopify

Abandoned_cart_URL

URL of an abandoned cart

Shopify

Klaviyo Flow Variables based on the payload:

You can pass variables from Klaviyo to charles by including them in the webhook payload.
Here is an example of Klaviyo webhook payload for a Back-in-Stock event:

{   
"id": "{{ person.id|default:'' }}",
"email": "{{ person.email|default:'' }}",
"event": "{{ event|default:'' }}",
"person": "{{ person|default:'' }}",
"ProductId": "{{ event.ProductID|default:'' }}",
"VariantId": "{{ event.VariantId|default:'' }}",
"ProductName": "{{ event.ProductName|default:'' }}",
"phone_number": "{{ person.phone_number|default:'' }}", "external_reference_id": "{{person.KlaviyoID}}"
}

Rule

Description

Source

Email

Contact’s email

Klaviyo

First_Name

Contact’s first name

Klaviyo

Event

Name of an event

Klaviyo

Product ID

ID of a product

Klaviyo

Variant ID

ID of a product variant

Klaviyo

Product name

Name of a product

Klaviyo

Mix and match rules

Now that you have a glimpse of all possibilities to customize your content based on your customers’ actions, you can build rules as specific as you want.

Grouping

Rule groups are powerful when you want to combine ANY and ALL joiners in the same condition. For example, Someone who has the tags A OR B, AND has the tags C OR D, would be in the shaded segment below.

ANY

To recreate this kind of segment in Journeys, first create the following rule:

  • All conditions must be met

  • Person’s tag(s) include tag A

  • Person’s tag(s) include tag B

Next, add another condition.

This time, create the same rule you did before, just with tags C and D. To combine these two rules with the ANY joiner, simply connect both outgoing ports to the same node, for example, a message:

ALL

If you want to combine groups with the ALL operator, you can do that by simply chaining multiple condition nodes, as shown in the example below.

Did this answer your question?