# Wait Until...

Use the *Wait Until* item to hold a person in a campaign until they meet a condition or enter a segment.

## How it works[](#how-it-works)

You can set three different types of waits. Each wait type adds a new path in your workflow. A person progresses down the first path they meet conditions for.

*   **Conditions**: Determine whether a person needs to achieve certain attributes, perform an event, join a segment, and so on before they can progress through the campaign. You can set multiple conditions.
*   **Event time** (event-triggered campaigns only): Base your wait on a timestamp in your event data.
*   **Max. time**: Set the maximum time a person can wait. If a person reaches the maximum wait time without achieving any other conditions, they’ll progress through the workflow.

For example, if you set attribute conditions and a max time, a person will progress in your campaign if they either meet your attribute conditions *or* they reach the maximum wait time.

 People who already meet your conditions will skip the wait

If you set up a wait condition, and a person already meets the condition when they reach the wait, they’ll move on immediately. See [Why did someone skip the wait?](#why-skip) for more information.

### Each type of delay starts a new path[](#wait-until-paths)

You can set up different types of waits in the same actions, creating multiple paths for people in the journey. A person will progress down the first path they meet conditions for.

You can either take advantage of different paths to send different messages based on the conditions the person met or, if the result of a conditional wait or a maximum wait is the same, you can place actions after the paths converge.

[![you can set up multiple wait until types creating different paths in the journey](https://docs.customer.io/images/wait-until-paths.png)](#c2408f68f08de1515443761b668bd66d-lightbox)

## Set up a Wait Until[](#set-up)

This video shows each of our delay options. Click to fast forward to the Wait Until section.

1.  Drag **Wait Until…** into your workflow.
    
    [![image.png](https://docs.customer.io/images/image%28361%29.png)](#f2e818e57a2bfa46dd978d813192bea4-lightbox)
    
2.  Click it and determine the conditions a person must meet before they continue the campaign. You can choose one or more types of conditions. However, a person will proceed through the campaign when they meet any of the following:
    *   **Conditions**: Attribute, event, segment, or message conditions that a person must meet (or not meet) to move on. Multiple *conditions* in the same path are joined with *And*—a person must meet all conditions to satisfy the wait; you can also [set up multiple conditional paths](#evaluating-multiple-conditions) (joined by *Or*).
    *   **Event time**: A timestamp specified in an event that triggers your campaign.
        
        For example, if you trigger your campaign with an event called `event_reminder` you could *Wait until* the `remind_me_at` timestamp in your event to send a reminder message. Your timestamp should be in Unix seconds since epoch.
        
    *   **Max. time**: The maximum time that a person can wait before moving on in the workflow.
        
        [![wait until supports 3 different types of conditions](https://docs.customer.io/images/wait_until_conditions.png)](#8e57916fddbf860e84dfb787124814ac-lightbox)
        

[![image.png](https://docs.customer.io/images/image%28363%29.png)](#68483995788d726fd334621597163554-lightbox)

## Conditions[](#conditions)

When you set your *Wait until* delay, you can use attribute, event, segment, or message conditions. Within a path, can set multiple conditions joined by *AND*—meaning that a person must meet all conditions to progress down the path.

You can also set multiple conditional paths. See [the section below](#evaluating-multiple-conditions) for more information about setting up multiple condition-based paths.

*   **Attribute**: Wait until a person matches a profile [attributeA key-value pair that you associate with a person or an object—like a person’s name, the date they were created in your workspace, or a company’s billing date etc. Use attributes to target people and personalize messages.](/journeys/attributes/) condition—whether a person has an attribute, doesn’t have an attribute, matches an attribute value, etc.
*   **Event**: Wait based on whether a person has, or has not, performed an event. Unlike [Event time](#event-time) delays, this *does not* have to be an event that triggered your campaign. You can also specify event properties to narrow down the condition.
*   **Segment**: Wait based on whether or not a person belongs to a segment. See the [Not in segment condition](#not-in-segment) for more information about matching folks who aren’t in a segment.
*   **Message**: Set a condition to check if someone has been sent or is sent a message. You can also base message conditions on other statuses like delivered, opened, clicked, and more. Choose messages from any campaign, broadcast, or transactional message in your workspace. For example, if your campaign follows up on a person’s order, you might wait until after they receive a transactional message containing their receipt.

The following conditions are only available in object- or relationship-triggered campaigns:

*   **Object (Trigger)**: Wait until a condition on the object that triggered a campaign is true. For example, you could set up a wait until `Order.status` *is equal to* `delivered` or `Subscription.active` *is equal to* `true`.
    
*   **Relationship**: Wait until a condition on a relationship to an object is true. For example, if your objects are online courses, you could set up a wait until a person’s relationship attribute for `enrolled` *is equal to* `true`.
    
    **This can be a relationship to any object, not just the triggering object!** So you could trigger a campaign when someone signs up for an account (i.e. an account object is created). Then you could have them wait until they’ve activated a subscription, where subscriptions are separate objects.
    

 *Wait Until* event conditions aren’t available in liquid

While you can reference an a different event than the one that triggered your campaign as a *wait* condition, you can’t use properties from this event later in your campaign with [liquidA syntax that supports variables, letting you personalize messages for your audience. For example, if you want to reference a person’s first name, you might use the variable `{{customer.first_name}}`.](/using-liquid). The liquid `event` context is always the event that triggered your campaign.

### Event property conditions[](#event-example)

When your **Wait Until** condition is an event, you can click **Add event data filter** to evaluate the wait condition based on fields in an incoming event. You can even evaluate properties in your condition against a person’s [attributesA key-value pair that you associate with a person or an object—like a person’s name, the date they were created in your workspace, or a company’s billing date etc. Use attributes to target people and personalize messages.](/journeys/attributes/) or the trigger event’s properties. This helps you fine-tune the paths people might take in journeys.

[![Pick the property you want to evaluate against](https://docs.customer.io/images/wait-until-event-properties-1.png)](#647f4bf2b1b1ee0bdccfdc927aaaf17d-lightbox)

For example, imagine that a person enters a campaign when they set up an appointment—they generate a `new_appointment` event with an `appointment_id`. You want to wait until the day before the event to send an email reminding a person about their appointment—but you don’t want to send a reminder if they already cancelled the appointment.

In this case, you can set up a *Wait Until…* condition to look for an `cancelled_appointment` event where the `appointment_id` matches the trigger event’s `event.appointment_id`. If the two values match, you don’t send the appointment reminder.

[![a workflow with a wait until action based on event properties](https://docs.customer.io/images/wait-until-appointment-example-1.png)](#f86f13f1a0b79b0dce9609a6ada4f199-lightbox)

[Learn more about editing wait until blocks in live campaigns.](/journeys/wait-until/#editing-a-wait-until)

### Evaluating multiple conditions[](#evaluating-multiple-conditions)

When you set conditions, you’ll see *AND*; these conditions are a part of a single path; a person must meet all of the conditions to progress down a path.

But, unlike *Event time* and *Max. time*, you can set up multiple *Condition*\-based paths. Each set of conditions creates a branch in your workflow. If a person meets the conditions in *any* path, they’ll progress down the associated path.

Paths for your different wait conditions are numbered, starting at 1. In the workflow, they’ll read left-to-right. If a person meets the conditions in multiple paths simultaneously, they’ll go down the path closest to 1 (farthest to the left) in your workflow.

[![a workflow with multiple conditions](https://docs.customer.io/images/wait-until-multiple-conditions-1.png)](#cdde49e6906b4b36e96edda8e2112a95-lightbox)

### Message conditions[](#message-conditions)

You can set conditions based on whether a person has ever been sent or is sent a message. You can also base message conditions on other statuses like delivered, opened, clicked, and more. Choose messages from any campaign, broadcast, or transactional message in your workspace. In a message condition, you can check if a person *has ever been sent* a message, or wait until a message *is sent* after a person enters the wait.

The **has ever** condition is based on whether or not a person *has ever* been sent (or another message status like delivered) a particular message. If you specify “*has ever been sent*,” and the person was sent a message before they entered the wait until, they meet the condition and will move on in the workflow.

The **is** condition is only satisfied if a person *is* sent (or another message status like delivered) a message *after they enter the wait*. This prevents people from inadvertently meeting wait until conditions based on messages sent long before a person entered your campaign or wait. If you specify “*is sent*,” and the person was sent a message before they entered the delay, they do NOT meet the condition. If they were sent a message after entering the wait until, they do meet the condition and will move on in the workflow.

[![set up a message condition to check if a person has or hasn't been sent a message](https://docs.customer.io/images/wait-until-message-condition-1.png)](#f214c052b5d7d5df5e2af235587a8456-lightbox)

### Object and relationship conditions[](#object-and-relationship-conditions)

In Wait Untils, you can set conditions based on objects or relationships when your campaign is triggered by an object or relationship. Other campaign types won’t have this option.

You can set conditions based on *any* object or relationship in your workspacel it’s not limited to trigger data. If your campaign is triggered by an object or relationship, you’ll also see the option to have them wait based on trigger data.

Here are a few examples:

*   **Object trigger condition:** You want someone to wait until a date associated with your triggering object, like an appointment time, before they receive a message.
*   **Relationship to trigger object:** A campaign triggers when people express interest in a webinar (a relationship is created with a webinar object). You want people to wait until a week before the webinar before you send them a reminder.
*   **Relationship to object that’s not the trigger:** A campaign triggers when someone signs up for your product (i.e. an account object is created). You want people to wait until they’ve activated a subscription, where subscriptions are separate objects, before sending them further messages.

In this example, you’ll see a couple conditions based on the trigger object:

[![A set of conditions waiting for an upcoming appointment and a relationship attribute for 'rsvp' set to 'true'](https://docs.customer.io/images/wait-until-object-workflow.png)](#f65a791a61fbaf6a3b2ccbb6dad4d592-lightbox)

## Event time[](#event-time)

If your campaign is triggered by an event, you can make people wait until a timestamp value in the triggering event before they move on to the next step in the workflow. For example, if you trigger your campaign with an event called `new_appointment`, you could make people wait until the day before the `appointment_time` in the triggering event and then send a reminder message.

The timestamp in your event can be either:

*   Unix timestamp (in seconds)
*   RFC 8601-formatted time (for example, `2022-06-04T10:24:34-0400`).

Unlike event [conditions](#conditions), your timestamp must be a part of the event that triggers your campaign. You can’t base this time on a different event.

 Make sure your triggering event includes a timestamp and that it’s correctly formatted

If you send an event that either doesn’t contain the timestamp specified in your wait, or the timestamp is incorrectly formatted, your event timestamp condition won’t do anything. Your audience will wait until they meet another condition. If your wait doesn’t have any other conditions, a person could wait forever!

Note, people will wait until the current time *is equal to or after* the time specified by the wait condition. For instance, if you set an event time path of “2 days before the time specified in the `appointment-time`” of the trigger event, then people will meet the condition and move forward when it reaches not just before 2 days, but also within 2 days of the `appointment_time`. It’s possible then that some people move down this wait until condition if it’s 1 day before the appointment time.

To demonstrate that last statement, let’s continue with the example of a campaign triggered by scheduling an appointment:

1.  It is June 13, and an appointment is just now scheduled for June 14 which triggers the campaign.
2.  The first step in the campaign sends a confirmation email immediately.
3.  The second step is the wait until set for two days before the appointment, which means before *or after* 2 days. Because it’s 1 day before the appointment, the person passes the condition immediately and moves down that path.
4.  The campaign immediately sends an email reminder for the appointment.

Since the current time is already *after* the wait until condition of “2 days before `appointment_time`”, the person is not held in the wait until and we consider that they’ve successfully met the condition. In this example, the person would receive the confirmation email and reminder email close together.

To avoid this behavior, you can add a True/False branch to your workflow. For this example, you could set an event attribute condition to “`appointment_time` is a timestamp before 2 days from now”. When this is true, people move forward but don’t receive a reminder email. If this is false, people would enter a wait until and eventually receive a reminder email only 2 days before the appointment time.

[![An example campaign workflow. People in the true path exit campaign but people who move down the false path enter a wait until then get a reminder email.](https://docs.customer.io/images/branch-for-waituntil-event-time-2.png)](#c78a66dc7c5440a8912f05e2bea987e0-lightbox)

## The max time fallback[](#max-time)

By default, people will wait until they meet your conditions. If they never meet your conditions, they could get stuck waiting in your campaign forever! Use the *Max time* option to let people exit the campaign or move on to the next action.

In this example, if a person isn’t in the specified segment after one week, they’ll move on to the next action in the workflow.

[![Set a wait until item with a max time](https://docs.customer.io/images/wait-until-max-time-1.png)](#c3f30d211d0a4fa42329ff3246e00833-lightbox)

### Segment “Not in…” conditions[](#not-in-segment)

If you base your wait condition on whether people are *not in* a segment, people who were *never* in the segment will skip the wait. If people are already in the segment, they will be held in the wait until they leave the segment.

[![an example of a wait until not in segment condition](https://docs.customer.io/images/wait_until_not_in-1.png)](#057ef5aed4ce8733080d3fdee26f9608-lightbox)

## Why did someone skip the wait?[](#why-skip)

If a person meets your wait conditions *before* they enter the wait, they’ll skip it entirely. We evaluate the conditions as soon as someone reaches the *Wait until* block; someone doesn’t have to meet the conditions *again* to progress past it.

For example, imagine that someone performs an event—they signed up for a class at a local school. You want to send them a reminder message a week before the class starts.

[![a wait until block with a condition based on an event called class-signup](https://docs.customer.io/images/wait-until-class-1.png)](#d9ee2e0b20e6b94cc7cba0709f7f19dc-lightbox)

If someone signed up late for the class, and the class starts in less than a week, they’ll skip the wait and move on to the reminder message, which you can see on the person’s journey.

[![displays a journey timeline where a person skipped a wait because they already met wait conditions](https://docs.customer.io/images/wait-until-skip.png)](#2c8e6f865a48e2fd81613c870c2ca404-lightbox)

## Modify Wait Until blocks in live campaigns[](#modify-wait-untils-in-live-campaigns)

### Change event conditions[](#editing-a-wait-until)

You can edit the conditions of your Wait Until if the campaign is live; just be aware that doing so might cause people to quit waiting.

For example, if you reduce an *Event time* condition from seven days to two days:

*   People who have already waited more than two days will move on (or exit the campaign)
*   People who have not yet waited two days will continue waiting

### Delete a Wait Until[](#deleting-a-wait-until)

If you delete a *Wait until*, you can choose what to do with anybody currently waiting.

*   Continue to the next action in the campaign
*   Exit the campaign immediately

It’s up to you! If people have been waiting a long time, you may not want to continue sending messages in the campaign.

## Copy a Wait Until to other campaigns[](#copying-a-wait-until)

It’s easy to copy the Wait Until between campaigns within the same workspace, because your segment conditions remain the same.

If copying **between workspaces**, you’ll need to re-add your conditions, and we’ll show you a warning note both in the workflow and when editing the item.

## Combining delay blocks[](#combining-delay-blocks)

Meeting wait until conditions doesn’t ensure that someone receives your message at the right time; and it being the right time doesn’t mean that someone’s met your conditions yet. You can use conditions together so people meet your conditions and receive messages in the right timeframe!

For instance, you could wait for people to match specific conditions using a Wait Until block, but you’d need to use a Time Window if you also wanted people to only receive a subsequent message during a specific timeframe.

### Combine Wait Until and Time Delay[](#combine-wait-delay)

You might add multiple flow control blocks to a campaign to ensure people don’t receive a message too soon. For instance, maybe you want people to minimally wait 7 days after receiving their first message, and then they should receive their next message only if they’re a member of a specific segment.

1.  Time Delay: Wait 7 days
2.  Wait Until: Person enters the segment
3.  Email

Make sure you check the order of your blocks so you don’t make people wait unnecessarily in your workflow. You might switch the delay with the Wait Until if you want to make sure that people wait exactly seven days after satisfying the wait condition.

1.  Wait Until: Person joins the segment
2.  Time Delay: Wait 7 days
3.  Email

For Wait Untils, consider adding a second condition, like a max wait, so people aren’t held forever in the flow. This is also important if the subsequent message is time sensitive.

### Combine Wait Until and Time Window[](#example-wait-and-time-window)

With both Time Windows and Wait Until blocks, you can add conditions to determine which people wait before continuing through your campaign or just specify a static time or timeframe to wait. You’ll only need to combine them if you need to set a specific timeframe to wait.

For instance, if you want people to belong to a segment before receiving a message in a certain timeframe, you’d start with a Wait Until block, followed by a Time Window:

1.  Wait Until: Person joins a segment
2.  Time window: Monday between 9AM and 5PM
3.  Email

In this case, people wait until they’re in a segment, and *then* wait for 9am on a Monday (assuming it isn’t already that time). If the person stops matching the segment condition while they’re waiting for the time window, they would still get the email on Monday at 9AM. If you want them to skip the message if they stop matching, add the segment condition to the email too.

 Don’t use a Time Window if you need to send a message at a specific, relative time.

For instance, let’s say you want a campaign to send a reminder email 1 day before an appointment. Your campaign could flow like this:

1.  Trigger: When a person books an appointment
2.  Wait Until: 1 day before the appointment
3.  Email

You might think to add a Time Window before the message so they receive it at a reasonable time. However, the Time Window could prevent them from receiving the message exactly 1 day before, especially if they booked their appointment less than a day ago. If receiving the message exactly 1 day before is the most important thing, don’t add a time window.