Skip to main content

Overview

Computed values let you define formulas on offer categories that are evaluated dynamically for each customer during a decision flow. This enables personalization like custom pricing, dynamic discounts, and tailored messaging.

How It Works

  1. Define computed fields on a category with a formula and output type
  2. Configure enrichment in a decision flow to load customer data from schema tables
  3. Add a compute stage to evaluate formulas per candidate offer
  4. Access results in the Recommend API response under the personalization field

Formula Syntax

The formula engine supports:
FeatureExample
Arithmeticbase_rate * 1.05
Comparisonamount > 1000
Ternarytier == "gold" ? 0.15 : 0.10
Functionsmin(rate, 0.25), max(amount, 100)
Roundinground(price, 2)
Null handlingcoalesce(custom_rate, default_rate)
String concatconcat(first_name, " ", last_name)

Variable Namespaces

PrefixSourceExample
(none)Other custom fields on the offerbase_rate
customer.*Enriched data from schema tablescustomer.loan_amount
attributes.*Request-time attributes from Recommend APIattributes.tier

Example

A “Personal Loan” category with a computed field:
Field: personalized_rate
Formula: base_rate * (1 - customer.loyalty_score * 0.01)
Output Type: decimal
When the Recommend API runs, each loan offer’s personalized_rate is calculated using the customer’s enriched loyalty_score and the offer’s base_rate.