Use the AI formula builder create-ranking-formulas
Ranking formulas allow you to define rules that will determine which offer should be presented first, rather than taking into account the priority scores.
To create these rules, the AI formula builder in 51黑料不打烊 Journey Optimizer provides greater flexibility and control in how offers are ranked. Instead of relying only on a static offer priority, you can now define custom ranking formulas that combine AI model scores, offer priorities, profile attributes, offer attributes, and contextual signals through a guided interface.
This approach allows you to dynamically adjust offer ranking based on any combination of AI-driven propensity, business value, and real-time context, making it easier to align decisioning with both marketing goals and customer needs. The AI formula builder supports simple or advanced formulas depending on how much control you want to apply.
Once a ranking formula has been created, you can assign it to a selection strategy. If multiple offers are eligible to be presented when using this selection strategy, the decisioning engine will use the selected formula to calculate which offer to deliver first.
Create a ranking formula create-ranking-formula
To create a ranking formula, follow the steps below.
-
Access the Strategy setup menu, then select Ranking formulas tab. The list of previously created formulas is displayed.
-
Click Create formula.
-
Specify the formula name, and add a description if desired.
-
Optionally, click Select AI model to set the model that will be used as a reference to build your ranking formula.
note note NOTE Personalized optimization models using continuous metrics are not supported with the AI formula builder. Every time you refer to a model score when defining your formula below, the AI model that you selected will be used.
note caution CAUTION When using an AI model incorporated into a ranking formula, data are not reflected in the Conversion rate for Holdout and Model Driven traffic report. -
Define the conditions that will determine the ranking score for the matching decision items. You can either
- fill in the Criteria section from the user interface,
- or switch to the code editor.
Define criteria using the formula builder ranking-select-criteria
With an intuitive interface, you can fine-tune decisioning by adjusting AI scores (propensity), offer value (priority), contextual levers, and external profile propensities 鈥 individually or in combination 鈥 to optimize every interaction.
To define criteria directly from the interface, follow the steps below.
-
In the Criterion 1 section, specify the decision items that you want to apply a ranking score to by doing the following:
- select a decision item attribute,
- select a logical operator,
- add a matching condition - you can either type a value, or select a profile attribute or context data.
-
Optionally, you can specify additional elements to refine the matching conditions for your criteria to be true.
For example, you defined Criterion 1 such as the Weather custom attribute Equals the warm condition. Additionally, you can add another condition such as if the first condition is met and if the temperature exceeds 75 degrees at the time of the request, then Criterion 1 is true.
-
Create an expression that will assign a ranking score to the decision items that meet the condition defined above. You can reference any of the following:
- the score that came out of the AI model that you optionally selected in the Details section above;
- the decision item鈥檚 priority, which is a value manually assigned when creating a decision item;
- any attribute that might live on the profile, such as any externally derived propensity score;
- a static value that you can assign in a free format;
- any combination of all the above.
note note NOTE Click the icon next to the field to add predefined variables. -
Click Add criterion to add one or more criteria as many times as needed. The logic is as follows:
- If the first criterion is true for a given decision item, it takes precedence over the next ones.
- If not true, the decisioning engine moves on to the second criterion, and so on.
-
In the last field, you can build an expression that will be assigned to all decision items that do not meet the above criteria.
-
Click Create to complete your ranking formula. You can now select it from the list to view its details, and edit or delete it. It is ready to be used in a selection strategy to rank eligible decision items.
Ranking formula example
Consider the example below:
If the decision item鈥檚 region (custom attribute) equals the profile鈥檚 geographical label (profile attribute), the ranking score expressed here (which is a combination of the decision item priority, the AI model score and a static value) will be applied to all decision items meeting that condition.
Use the code editor ranking-code-editor
To express ranking formulas in PQL syntax, switch to the code editor using the dedicated button on top right of the screen. For more on how to use the PQL syntax, refer to the dedicated documentation.
You can then leverage profile attributes, context data, and decision item attributes.
For example, you want to boost the priority of all offers with the 鈥渉ot鈥 attribute if the actual weather is hot. To do this, the contextData.weather=hot was passed in the decisioning call.
Ranking formula PQL examples ranking-formula-examples
You can create many different ranking formulas according to your needs. Below are some examples.
If the profile lives in the city corresponding to the offer, then double the priority for all offers in that city.
Ranking formula:
code language-none |
---|
|
Ranking formula:
code language-none |
---|
|
You can boost the score for an offer based on a customer propensity score.
In this example, the instance tenant is _salesvelocity and the profile schema contains a range of scores stored in an array:
Given this, for a profile such as:
code language-none |
---|
|
Journey Optimizer allows you to boost certain offers based on the context data being passed in the call. For example, if the contextData.weather=hot
is passed, the priority of all offers with attribute=hot
must be boosted. Detailed information on how to pass context data using the Edge Decisioning and Decisioning APIs, refer to this section
Note that when using the Decisioning API, the context data is added to the profile element in the request body, such as in the example below.
code language-none |
---|
|