# Creating Stage Rules for a Real Time Journey

The following information highlights what is required to create a journey stage rule. Following these items, you create real-time stages.

![](/assets/realtime-stage-rules.e0d2dc9f357610ed660337adb4153efc79378c3e37528377e81708013cfd5128.9e7171ae.png)

## Limitations

* When creating a journey with 120 events, limit your activations to less than 50 for better performance.
* Each stage in a journey can support a maximum of 40 events.


## Using the Journey Canvas

1. Navigate to Audience Studio.
2. Select a Parent Segment.
3. Select a real-time existing journey or [create a real-time journey](/products/customer-data-platform/journey-orchestration/realtime/creating-a-real-time-journey). (The ![](/assets/new-topic-7-2024-04-01.08adf82d2976734517cf43a6e59d784e4667b33c6130adcb4e5b8bec02b57d17.cf3845cb.png) icon represents a real-time journey.)
4. Select **Open Journey**.


## Using Filters

Real-time key events support the following operators:

* is
* is not
* is null
* is not null
* greater than
* less than
* at least
* *at most*
* regex
* not regex


* *Greater than* , *less than* , *at least* , and *at most,* operators work with numeric columns only.
* The user interface does not restrict the number of filters that can be applied to key events; however, internally, the aggregation of the filter rule condition cannot exceed 1000 characters.


## Include Profiles With No Batch Data

When configuring entry criteria, you can select the **Include profiles with no batch data** checkbox. This option is always visible above the batch attribute selection area.

Include profiles with no batch data checkbox
This checkbox is off by default and only selectable when batch related rules have been added to the entry criteria (i.e., Batch Attributes, Batch Behaviors, Batch Drag-on Rules). When enabled, profiles that are not linked to any batch data automatically meet the entry criteria, regardless of any batch attribute conditions configured.

This is useful when your entry criteria uses a batch attribute condition to filter profiles that do NOT have a certain value, but you also want profiles with no batch data at all to enter the journey. Without this option, those profiles would be excluded because they have no batch data to evaluate against.

This setting applies to entry criteria only and does not affect exit criteria, decision points, or goals.

## Use Case Example

We will build stage rules for a hotel check-in to identify new, prospective, and loyal customers.

### (Optional) Set a Journey Goal

1. In the Journey canvas, select **Set Goal**.


![](/assets/new-topic-7-2024-04-08.1762a74b631e502aa7c1fe0186dbdfdcc60958fd4c16b9a6da9698b8c868d703.9e7171ae.png)

1. Our goal for this journey is to reach a lifetime value target (LVT) of 2000.
2. Select a key event. A data engineer in your organization defines a key event representing criteria to help you define a real-time goal. In this example, the key event is retail_golden.hotel_checkin with an additional filter of hotel_name = is Hotel Soho.
3. You can also add batch attributes to define trigger criteria further.


![](/assets/new-topic-7-2024-04-08-1.a893f8f552f09a42edc39ebfaecc99b7f9876aaf40f74050529a61138baed7f6.9e7171ae.png)

In the previous example, the profiles must qualify for the "Store Orders Line Item" attribute with a value greater than 100 within the past 30 days. Additionally, the profiles must have a lifetime value (LTV) greater than 100.

### Add Exit Criteria

Real-time journeys support stale profiles as well as custom exit criteria. Learn more about [Creating Exit Criteria for Real-time Journeys](/products/customer-data-platform/journey-orchestration/realtime/creating-exit-criteria-for-a-real-time-journey).

## Example Stages

Let's go through all three stages with examples of the criteria used for each stage.

### New_Customer Stage

![](/assets/new-topic-7-2024-04-09-1.4a2930bc2c1225441854373e4345f141baaf4bbd2ee0a9f32c6952d6eae4da27.9e7171ae.png)

#### New_Customer Stage Objective

Identify new customers checking into Hotel Soho; send a welcome email after waiting one minute.

### New_Customer Stage Rule

This first stage requires entry criteria.

* **Entry criteria** :
  * Key event = retail_golden.hotel_checking; match all filters = hotel_name is Hotel Soho; loyalty_number is null
* **Wait Step:** Wait one minute before starting the activation. (The maximum time for a wait step in a real-time journey is seven days.)
* **Triggered Activation** : Send welcome email. Learn more about [creating real-time triggered activations](/products/customer-data-platform/journey-orchestration/realtime/creating-a-real-time-triggered-activation).
* **End** : (Optional) Indicates the end of a stage. You cannot add another event after an End.
* **Milestone:** New Prospect
  * Key event = retail_golden.hotel_checking; match all filters = hotel_name is Hotel Soho; loyalty_number is not null
    * Attributes:
      * Segment includes  *hotel_segment*
      * LTV > greater than 0


When a profile meets these criteria, move it to the Prospect_Customer stage.

### Prospect_Customer Stage

![](/assets/new-topic-7-2024-04-09-2.2d66083402314ff758e207fcfd30a849dbf036710172a33150359271678f04a5.9e7171ae.png)

#### Prospect_Customer Stage Objective

Identify prospective customers checking into Hotel Soho; send a promotional email after waiting two minutes.

#### Prospect_Customer Stage Rule

Because this is the second stage, the entry criterion is not required. The journey enters this stage after meeting the Prospect_Customer milestone criteria.

* **Wait Step:** Wait two minutes before starting the activation. (The maximum time for a wait step in a real-time journey is seven days.)
* **Triggered Activation** : Send a promotional discount. Learn more about [creating real-time triggered activations](/products/customer-data-platform/journey-orchestration/realtime/creating-a-real-time-triggered-activation).
* **End** : (Optional) Indicates the end of a stage. You cannot add another event after an End.
* **Milestone:** Loyal Customer:
  * Key event = retail_golden.hotel_checking; match all filters = hotel_name is Hotel Soho
    * Attributes:
      * App login ≥ is at least 1 within the past 30 days
      * LTV > greater than 0


### Loyal_Customer Stage

![](/assets/new-topic-7-2024-04-09-3.969636625ae27503b23bd7535436ddb76954e405f6dcff20fa7a5d7ef9a81583.9e7171ae.png)

#### Loyal_Customer Stage Objective

Identify loyal customers checking into Hotel Soho; email a discount coupon after waiting five minutes.

#### Loyal_Customer Stage Rule

Because this is the third stage, the entry criterion is not required. The journey enters this stage after meeting the Loyal_Customer milestone criteria.

* **Wait Step:** Wait five minutes before starting the activation. (The maximum time for a wait step in a real-time journey is seven days.)
* **Triggered Activation** : Send discount coupon. Learn more about [creating real-time triggered activations](/products/customer-data-platform/journey-orchestration/realtime/creating-a-real-time-triggered-activation).
* **End** : (Optional) Indicates the end of a stage. You cannot add another event after an End.


You can save the real-time journey at any time as a draft. You must set up the real-time journey goal, entry criteria, and milestones to launch the journey. Adding a triggered activation at each stage is optional. After you launch the journey, the journey is live and begins processing profiles through the journey.

## See also

* [Creating a Real-time Triggered Activation](/products/customer-data-platform/journey-orchestration/realtime/creating-a-real-time-triggered-activation)
* [Configuring Parent Segments for Real-time](/products/customer-data-platform/real-time/creating-a-real-time-configuration)