Skip to main content

Documentation Index

Fetch the complete documentation index at: https://moengage.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Custom Formula is a ranking strategy available in Decision Policies that replaces a single-variable ranking signal with a weighted combination of multiple parameters. You choose which parameters matter and assign a percentage weight to each. The engine multiplies each parameter score by its weight, sums the results, and ranks all eligible Offerings for every customer accordingly.
The result is a ranking that reflects both what is strategically important to your business and what is personally relevant to each customer — recalculated in real time, without manual intervention.
Custom Score  = (Attribute 1 Score × Weight %) + (Attribute 2 Score × Weight %) + … + (Attribute N Score × Weight %) + (Performance Score × Weight %) + (Priority Score × Weight %)

How it compares to other ranking strategies

MoEngage offers three ranking strategies in Decision Policies. Understanding when each one fits helps you choose the right approach or combine them across different policies.
Manual priorityMerlin AICustom formula
How ranking worksAuthor assigns a rank (100, 90, 80…) to each offering manuallyAI learns from clicks and conversions to find the best-performing offering for each userMarketer defines a weighted formula combining Offering attributes, performance, and priority
Who sets the scoreAuthorAlgorithm (learns over time)Marketer defines weights; engine calculates score per user at runtime
PersonalisationNone — same rank for all usersImplicit — learns aggregate patterns across usersExplicit — score changes per user based on their profile (via dynamic attributes)
Business goal controlHigh — author fully controls rankLow — optimises for engagement/conversion, not specific business goalsHigh — marketer decides how much weight each goal carries
Responds to strategy shiftsManually — re-rank all offeringsGradually — model needs time to relearnImmediately — adjust weight in the Decision Policy; all Offerings re-rank instantly
Best forSmall, stable catalogs with clear priorityLarge catalogs where engagement is the primary goalWhen business value AND user relevance both need to influence ranking
Requires Offering AttributesNoNoYes
LimitationDoes not account for customer intent or business value trade-offsCannot protect high-value, low-CTR Offerings from being buriedRequires upfront configuration of attributes and weights
InformationManual Priority does not account for the customer. Merlin AI does not protect high-value, low-CTR offerings. Custom Formula is the only strategy that lets you simultaneously express what an Offering is worth to the business and how relevant it is to this specific customer.

Parameters available in Custom Formula

A Custom Formula can include up to 5 dynamic parameters in addition to static parameters. Parameters fall into two categories.

Dynamic parameters — Offering Attributes

These are attributes you configure under Settings > Offering Decisioning > Offering Attributes. You can include up to 5 offering attributes — Fixed Value, Dynamic Value, or a mix — as parameters in a formula. Fixed Value attributes capture the strategic importance of the Offering itself. The score is set by the author at Offering creation time and is the same for every customer. Examples: business objective, margin tier, campaign urgency. Dynamic Value attributes capture relevance to the individual customer. The score is calculated at decisioning time by matching the offer’s associated value against the customer’s live MoEngage profile. Examples: category affinity, churn propensity, purchase recency.

Static parameters

Two built-in parameters are always available regardless of attribute configuration:
  • Offering Performance — the historical Click-Through Rate (CTR) or Conversion Rate (CVR) of the offer.
  • Offering Priority — the manual priority rank assigned to the Offering (1 to 100). The priority number itself becomes the base score.
All weights across all selected parameters must sum to exactly 100%.

How to set up Custom Formula ranking

Before you begin If you have not yet set up attributes, navigate to Settings > Offering Decisioning > Offering Attributes and create at least one attribute before proceeding. Refer to the Create offering attributes guide for instructions. Step 1 — Create or edit a Decision Policy Navigate to the Decision Policy you want to configure, or create a new one. In the Ranking Strategy section, select Custom Formula from the available options.
Ranking Strategy
Step 2 — Add parameters Click Add offering attribute (0/5) in the Custom Formula builder. You can add:
  • Any offering attributes you have configured (Fixed Value or Dynamic Value)
    • For Fixed Value attributes, you’ll have to choose one of the options from the dropdown.
  • Offering Performance (Click-Through-Rate or Conversion Rate)
  • Offering Priority score
You can add up to 5 parameters in total. If the Add Parameter button is disabled, you have reached the maximum.
Add Attribute
Step 3 — Assign weights For each parameter, enter a weight percentage. Weights represent how much each parameter contributes to the final score. All weights must sum to exactly 100%. Example weight configuration
  • Business Goal: Increase gross margin (Fixed Value attribute) — 40%
    • Business goal is the name of the Fixed value attribute. Increase gross margin is one of the options.
  • User preferred category (Dynamic Value attribute) — 30%
  • Offering Performance (CTR) — 20%
  • Offering Priority — 10%
Assign Weightage
Step 4 — Save and publish Once all weights sum to 100%, save the Decision Policy. The Custom Formula becomes active immediately for all Offerings within that policy. You do not need to edit individual Offerings — the engine uses the formula to score and rank them automatically for each customer. How the score calculation works When a customer qualifies for multiple Offerings in a Decision Policy, the engine calculates a Custom Score for each eligible Offering and ranks them in descending order. The highest-scoring Offering is shown to the customer. Calculation formula Custom Score  = (Attribute 1 Score × Weight %) + (Attribute 2 Score × Weight %) + … + (Attribute N Score × Weight %) + (Performance Score × Weight %) + (Priority Score × Weight %) Worked example
  • A Decision Policy contains two offerings: Offering A (New iPhone launch) and Offering B (Discount on Apparel). The policy is configured with the attributes and weights listed above in Step 3.
  • Offering configuration
    • Offering A
      • 1 Fixed value: Business goal with 2 options:
        • Option 1: Increase gross margin ; Score: 90
        • Option 2: Reduce customer churn ; Score: 10
      • 1 Dynamic value attribute: User preferred category
        • Option: Electronics
    • Offering B
      • 1 Fixed value: Business goal with 2 options:
        • Option 1: Increase gross margin ; Score: 75
        • Option 2: Reduce customer churn ; Score: 25
      • 1 Dynamic value attribute: User preferred category
        • Option: Fashion
  • A user “Ross” has “Electronics” as their primary category affinity; User “Rachel” has “Fashion” as their primary category affinity.
Scores for Ross:
ParameterWeightOffering A scoreOffering B scoreWeighted contribution
Business goal - Increase gross margin (Fixed)40%907536.00 (90 × 0.40)  |  30.00 (75 × 0.40)
User preferred category (Dynamic)30%100030.00 (100 × 0.30)  |  0.00 (0 × 0.30)
Offering Performance (CTR)20%608012.00 (60 × 0.20)  |  16.00 (80 × 0.20)
Offering Priority10%70707.00 (70 × 0.10)  |  7.00 (70 × 0.10)
Total Custom Score100%Offering A: 85.00  |  Offering B: 53.00
Result for Ross Offering A scores 85.00, Offering B scores 53.00. Offering A is ranked first — the iPhone launch is shown to Customer X despite having a lower CTR than the Apparel offer. Scores for Rachel:
ParameterWeightOffering A scoreOffering B scoreWeighted contribution
Business goal - Increase gross margin (Fixed)40%907536.00 (90 × 0.40)  |  30.00 (75 × 0.40)
User preferred category (Dynamic)30%10000.00 (0 × 0.30)  |  30.00 (100 × 0.30)
Offering Performance (CTR)20%608012.00 (60 × 0.20)  |  16.00 (80 × 0.20)
Offering Priority10%70707.00 (70 × 0.10)  |  7.00 (70 × 0.10)
Total Custom Score100%Offering A: 55.00  |  Offering B: 83.00
Result for Customer Y Offering A scores 55.00, Offering B scores 83.00. Offering B is ranked first — the Discount on Apparel is shown to Customer Y.

What happens when two offerings have the same score?

If two or more Offerings in a Decision Policy calculate to the same Custom Score for a given customer, the engine applies a sequential tie-breaking logic to determine which Offering is ranked first:
StepConditionLogic
1Earliest end date & timeThe Offering expiring soonest wins — it is more time-critical.
2Earliest start date & time (if end dates match)Among equally expiring offers, the one that went live first wins.
3Random selection (if start & end dates match)One Offering is chosen at random.

Next Steps