Offer Engine

Understanding the Offer Engine

The Offer Engine is a tool for implementing financial institutions' pricing algorithms, consisting of a set of offer scripts and their execution mechanism. This system enables dynamic offer calculation based on participant data and product parameters.

Core Concepts

Offer Scripts Offer Scripts define the pricing algorithms used by financial institutions. These are JavaScript or Python expressions that:

  • Implement offer calculation logic for participants

  • Operate within associated additives

  • Process input data (typically participant profiles)

  • Return structured offer parameters or null

Execution Context The system calculates offers for participants with any role, though these offers may be used differently depending on the role. For example:

  • A borrower participant might have a maximum offer of $10,000

  • A guarantor participant with lower creditworthiness has a maximum offer of $8,000

  • The borrower's final offer with this guarantor would be limited to $8,000

This logic must be embedded in the script implementation.

Script Implementation Example

The system documentation provides this detailed example:

function calc() {
   const today = Temporal.Now.plainDateISO();
   
   // Calculate interest rate based on product additive and current date
   const interest = interestRate(productAdditive.getInterestRateExpression(), today);
   const length = productAdditive.maxTerm;
   const monthlyInterest = interest / 1200;
   const lengthParam = 1 / length;
   
   // Get participant profile attributes
   const score = profile.get("score");
   const netDisposableIncome = profile.get("netDisposableIncome");
   
   // Calculate maximum affordable amount based on net disposable income
   const calculatedAmount = netDisposableIncome / (monthlyInterest + lengthParam);
   
   // Apply credit score threshold and amount validation
   if (score >= 750 && calculatedAmount >= productAdditive.getMinAmount()) {
       const offerAmount = calculatedAmount < productAdditive.getMaxAmount()
           ? calculatedAmount
           : productAdditive.getMaxAmount();
       
       const res = {
           minAmount: productAdditive.getMinAmount(),
           maxAmount: offerAmount,
           minTerm: productAdditive.getMinTerm(),
           maxTerm: productAdditive.getMaxTerm()
       };
       
       return res;
   }
   
   // Return null if score below threshold or calculated amount insufficient
   return null;
}

calc();

Script Components Explained

Profile Attributes Used:

  • score: Participant credit rating used for offer access gating (minimum 750 required)

  • netDisposableIncome: Participant's net disposable income used for affordability calculation

Product Additive Data Accessed:

  • getInterestRateExpression(): Interest rate expression for current rate calculation

  • maxTerm: Maximum lending term for duration calculation

  • getMinTerm(): Minimum lending term for offer bounds

  • getMinAmount(): Minimum loan amount for validation

  • getMaxAmount(): Maximum loan amount as upper limit

Calculation Logic: The script performs affordability assessment based on income and applies product constraints to determine the final offer parameters within participant capabilities.

Configuration Architecture

Integration Points

The Offer Engine integrates with multiple system components:

Additive Integration

  • Each additive references an offer script

  • Scripts execute within additive context

  • Product parameters available to scripts

  • Results bound by additive constraints

Profile Integration

  • Scripts access participant profiles

  • Profile attributes serve as input variables

  • Missing attributes can cause script failure

  • Validation occurs at execution time

Business Process Integration

  • Process stages trigger offer calculation

  • Timing configured at framework level

  • Results influence process flow

  • Multiple execution points possible

Script Types and Triggers

The framework supports different script types based on business process stages:

  • Initial offer scripts for preliminary assessment

  • Final offer scripts after complete evaluation

  • Renewal scripts for existing relationships

  • Special condition scripts for exceptions

Script Operation Principles

Based on the documented example, offer scripts operate with:

Input Data Sources

  • Participant Profile: Provides attributes like score and netDisposableIncome

  • Product Additive: Supplies product parameters through getter methods

  • Temporal Context: Current date for time-sensitive calculations

Processing Logic

The example demonstrates:

  • Interest rate calculation from product expression

  • Affordability assessment using income data

  • Threshold validation (minimum score of 750)

  • Constraint application (min/max amounts)

  • Structured result or null return

Multi-Role Considerations

As documented, the system handles different participant roles:

  • Each participant receives independent calculation

  • Role relationships affect final offers

  • Guarantor limits can constrain borrower offers

  • Script logic must embed these dependencies

Configuration Management

Script Development Process

Step 1: Define Requirements

  • Identify necessary profile attributes

  • Determine product parameters needed

  • Specify calculation logic

  • Define edge cases

Step 2: Implement Script

  • Write JavaScript or Python code

  • Access profile and product data

  • Implement business logic

  • Handle error conditions

Step 3: Test Thoroughly

  • Verify with sample profiles

  • Test boundary conditions

  • Validate calculations

  • Check null scenarios

Step 4: Deploy and Monitor

  • Associate with additives

  • Monitor execution success

  • Track offer generation rates

  • Identify optimization opportunities

Version Control

The system maintains script versions:

  • Each modification creates new version

  • Previous versions preserved

  • Rollback capability available

  • Change tracking for audit

Key Implementation Considerations

Framework Requirements

As documented in the system design:

  • Scripts must be JavaScript or Python expressions

  • Profile attribute validation occurs at execution time

  • Missing required attributes cause script failure

  • Scripts return structured offers or null

System Behavior

The Offer Engine enforces:

  • Script execution within additive context

  • Access to participant profiles and product parameters

  • Role-based offer calculations with relationship logic

  • Version tracking for all script modifications

Implementation Resources

Through the Admin Panel (Step 1)

Access Offer Engine configuration:

Through the SDK

  • (Amortization Schedules - SDK Guide coming soon)


timveroOS: Intelligent offer calculation through configurable scripting

Last updated

Was this helpful?