Build rules rules

On this page: Build reusable decision rules and targeting rules, so you can control which decision items and personalized content are shown to which audiences across your campaigns and journeys.

About rules about

In Journey Optimizer, you can create two types of reusable rules:

Decision rules decision-rules

Decision rules allow you to define the audience for decision items by applying constraints, either directly at the decision item level, or within a specific selection strategy. This enables you to precisely control which items should be presented to whom.

For instance, let’s consider a scenario where you have decision items featuring Yoga-related products designed for women. With decision rules, you can specify that these items should only be displayed to profiles whose gender is ‘Female’ and who have indicated a ‘Point of Interest’ in ‘Yoga’.

NOTE
In addition to item and selection strategy level decision rules, you can also define your intended audience at the campaign level. Learn more

Targeting rules targeting-rules

AVAILABILITY
Targeting rules are currently in Limited Availability. Contact your Adobe representative to gain access.
Please note this capability is only available to organizations that have purchased the Decisioning add-on offering. It will be progressively rolled out to all customers.

Targeting rules allow to determine specific qualifications that must be met for a customer to be eligible to receive personalized content or to enter a specific journey path, based on specific audience segments, which enables you to target sub-audiences in your journeys and campaigns.

Many times, they are a combination of multiple attributes, in addition to customer behavior events and context data. To save you time and effort, you can create targeting rules once and reuse them across your journeys and campaigns, with the ability to quickly modify them inline at the time of authoring.

You can use these rules either:

➡️ Discover this feature in video

Access rules access

The list of rules is accessible in the Decisioning > Strategy setup menu.

The following actions are available:

  • You can filter on the rule entity (Decision item or Targeting - Learn more).

  • Select a rule by clicking its name and edit it using the rule builder. Learn how

  • From the More actions button located next to each item, you can:

    • If you selected the Decision item entity, add the rule to a package in order to export it to another sandbox. Learn how to export objects to another sandbox.
    • Duplicate a rule.
    • Delete a rule.

{width="100%"}

  • Click the More info icon to display the formula that makes up the rule.

{width="60%"}

Create a rule create

To create a rule, follow these steps:

  1. Navigate to Decisioning > Strategy setup > Rules, then click the Create rule button.

  2. In the Create rule dialog, choose one of the following tabs:

    • Create from scratch to continue in the rule creation flow.

    • Create with AI to use AI-assisted authoring. Describe the rule you want to create then and confirm. You are redirected to the rule builder and AI Assistant generates a rule suggestion in the right pane. For more information on how to generate a rule using AI, refer to Build a rule with AI section.

      note
      NOTE
      This capability is available to organizations with access to Adobe AI capabilities.
  3. If you chose Create from scratch, select the rule entity to specify which type of object the rule is being created for.

    {width="90%"}

    If you create a Decision item rule, you can select Enable dataset lookup to use data from Adobe Experience Platform to enrich your decision logic with external data. This is especially useful for attributes that frequently change, such as product availability, or real-time pricing. Learn how to use Adobe Experience Platform data for decisioning

  4. The rule creation screen opens. Name your rule and provide a description.

  5. Build the rule to suit your needs using the Adobe Experience Platform Segment Builder. To do this, you can leverage various data sources such as:

    • Profile attributes;
    • Decision item attributes - only available when creating a Decision item rule;
    • Audiences;
    • Context data coming from Adobe Experience Platform. Learn how to leverage context data

    {width="85%"}

    note
    NOTE
    The Segment Builder provided to create rules presents some specificities compared to the one used with the Adobe Experience Platform Segmentation service. However, the global process described in the documentation is valid to build rules in Journey Optimizer. Learn how to build segment definitions
  6. As you are adding and configuring new fields in the workspace, the Audience properties pane displays information on the estimated profiles belonging to the audience. Click Refresh estimate to update data.

    {width="85%"}

    note
    NOTE
    Profile estimates are unavailable when the rule parameters include data that are not stored in the profile, such as context data.
  7. Once your rule is ready, click Create. The created rule appears in the list and, according to the entity you created, is available for use:

    • In decision items and selection strategies to govern the presentation of decision items to profiles;
    • Or when building targeting in content optimization or path optimization.
NOTE
The nesting depth in a rule is limited to 30 levels. This is measured by counting the closing parentheses ) in the PQL string.
A rule string can be up to 15KB in size for UTF-8 encoded characters. This is equivalent to 15,000 ASCII characters (1 byte each), or 3,750–7,500 non-ASCII characters (2–4 bytes each).
Learn more about Eligibility rules Guardrails & limitations

Build a rule with AI build-rule-with-ai

NOTE
This capability is available to organizations with access to Adobe AI capabilities. It is only available for a set of organizations (Limited Availability). To gain access, contact your Adobe representative.
At this time, AI-assisted rule generation does not support Journey context data-based expression generation.

You can start AI-assisted rule authoring from two places:

  • From the Create rule dialog, in the Create with AI tab:

    {width="85%"}

  • From the rule builder, using the AI Assistant button.

    {width="85%"}

In the AI Assistant pane, describe the rule you want to build in plain language. The AI Assistant generates a rule suggestion, that you can apply to the builder, or discard.

CAUTION
When you click Apply to builder, the AI-generated rule replaces any existing rule logic currently built in the builder canvas.

Simulate your rule simulate-rules

Before using a rule in your decisioning strategy or campaign, you can test it with sample or generated data to validate the rule logic and ensure it behaves as expected.

  1. Open an existing rule or create a new one then click the Simulate rule button.

  2. The simulation screen opens with several sections:

    • Test Variants: Where you generate or create manual test variants
    • Rule expression: Displays the rule definition for reference
    • Simulation result: Shows whether the Profile will be eligible by this Rule or not
  3. Add test variants with the attributes required by your rule using one of the two methods below:

    • To create a manual sample, select the Create sample button.
    • To generate test variants using AI, click the Generate button.
NOTE
AI-based test variant generation is available to organizations with access to Adobe AI capabilities.

The Test variants section is automatically populated with the created or generated samples. Each variant includes attributes used in your rule. You can edit the field values directly to simulate different scenarios.

To view the rule evaluation results, select a test variant from the list. The Simulation result area shows whether the Profile will be eligible by this Rule or not.

In the example below, the first test variant shows a Pass simulation result, while the second test variant shows a Failed result.

Pass example
Failed example
The variant data satisfies all rule conditions, so the profile qualifies for the rule.
One or more conditions are not met, so the profile does not qualify for the rule.

AI-powered rule optimization optimize

Journey Optimizer can automatically analyze rules and suggest simplifications that preserve the original logic. Only rules whose PQL expression is larger than 2 KB (UTF-8 encoded) are eligible, smaller expressions are not analyzed. When a simplification is found, a red Optimize indicator appears next to the rule in the inventory.

NOTE
AI-powered rule optimization relies on the same generative AI capabilities as Generate Content, and uses the same access controls. Users must be granted the Generate Content permission on the AI Assistant resource. For details, refer to Access Generate Content.

To optimize a rule:

  1. In the rules inventory, click the red indicator icon next to the rule name.

  2. The Optimize window opens, displaying the original PQL expression alongside the AI-suggested version.

  3. To validate that both expressions behave identically, click Download Optimisation Analysis (TSV) to download a file showing how simulated profiles are evaluated against each version.

  4. Once satisfied, click Apply to replace the original expression with the optimized one.

How-to video video

Learn how to create, duplicate, and apply reusable targeting rules in Adobe Journey Optimizer to efficiently personalize campaigns based on customer attributes like region, language, and behavior—saving time while enhancing audience precision.

recommendation-more-help
journey-optimizer-help