Pricing Matrix Functions¶
The Pricing Matrix is the core data structure for insurance premium calculations. These 27 functions build and manipulate pricing structures, applying items, factors, discounts, taxes, and regulatory charges.
Configuration Functions¶
$SetCurrencyToPricingMatrix¶
Sets the currency for the pricing matrix.
Signature
Parameters
currency(string) - ISO currency code (e.g., "GBP", "USD", "EUR")
Returns
- PricingMatrix object
Example
$SetCommissionRateToPricingMatrix¶
Sets the commission rate applied to gross premium.
Signature
Parameters
rate(number) - Commission rate as decimal (e.g., 0.15 for 15%)
Returns
- PricingMatrix object
Example
$SetIptRateToPricingMatrix¶
Sets the Insurance Premium Tax (IPT) rate.
Signature
Parameters
rate(number) - IPT rate as decimal (e.g., 0.12 for 12%)
Returns
- PricingMatrix object
Example
$SetFeeToPricingMatrix¶
Sets a fixed fee amount.
Signature
Parameters
amount(number) - Fee amount
Returns
- PricingMatrix object
Example
$SetTaxDutyToPricingMatrix¶
Sets tax/duty configuration for the pricing matrix.
Signature
Parameters
config(object) - Tax/duty configuration object
Returns
- PricingMatrix object
Example
$SetPreCalculatedIptToPricingMatrix¶
Sets a pre-calculated IPT amount instead of calculating from rate.
Signature
Parameters
amount(number) - Pre-calculated IPT amount
Returns
- PricingMatrix object
Example
$SetPreCalculatedIptToAdjustmentDifferencePricingMatrix¶
Sets pre-calculated IPT for adjustment differences in MTAs.
Signature
Parameters
amount(number) - Pre-calculated IPT adjustment amount
Returns
- PricingMatrix object
Example
$SetMinimumPremiumToPricingMatrix¶
Sets a minimum premium threshold.
Signature
Parameters
amount(number) - Minimum premium amount
Returns
- PricingMatrix object
Example
$ApplyIptToFeeInPricingMatrix¶
Applies IPT to fee amounts.
Signature
Parameters
- None
Returns
- PricingMatrix object
Example
Item Functions¶
$AddItemToPricingMatrix¶
Adds a premium item (base premium or component).
Signature
Parameters
name(string) - Item descriptionamount(number) - Item amount per unitquantity(number) - Quantity (usually 1.0)
Returns
- PricingMatrix object
Example
$AddItemToPricingMatrix("Base Premium", 500.00, 1.0);
$AddItemToPricingMatrix("Camera Cover", 75.00, 2.0); // 2 cameras
$AddPreCalculatedItemToPricingMatrix¶
Adds an item with pre-calculated net and gross premiums.
Signature
Parameters
name(string) - Item descriptionnet(number) - Net premium (before commission)gross(number) - Gross premium (after commission)isMTARefundable(boolean) - If true, refundable on MTA cancellationisMTAFullPremium(boolean) - If true, charges full premium on MTA (not pro-rated)
Returns
- PricingMatrix object
Example
// Pre-calculated item from third-party system
$AddPreCalculatedItemToPricingMatrix("Third Party Item", 170.00, 200.00, true, false);
// Non-refundable setup fee with full premium on MTA
$AddPreCalculatedItemToPricingMatrix("Setup Fee", 50.00, 59.00, false, true);
$RemoveItemFromPricingMatrix¶
Removes an item by name.
Signature
Parameters
name(string) - Item name to remove
Returns
- PricingMatrix object
Example
Factor Functions¶
Factors are multiplicative adjustments (e.g., age factors, risk factors).
$AddFactorToPricingMatrix¶
Adds a factor to the pricing matrix.
Signature
Parameters
name(string) - Factor descriptionrate(number) - Factor rate (e.g., 1.25 = 125%)accumulative(boolean) - If true, multiplies existing premium; if false, applies to base onlyapplicability(number) - Applicability flag (0 = all items)
Returns
- PricingMatrix object
Example
$AddFactorToPricingMatrix("Age Factor", 1.25, true, 0); // 25% increase
$AddFactorToPricingMatrix("No Claims Discount", 0.90, true, 0); // 10% reduction
$AddItemFactorToPricingMatrix¶
Adds a factor specific to an item.
Signature
Parameters
itemName(string) - Target item namefactorName(string) - Factor descriptionrate(number) - Factor rateaccumulative(boolean) - Accumulative flag
Returns
- PricingMatrix object
Example
Discount Functions¶
$AddGrossDiscountToPricingMatrix¶
Adds a discount applied to gross premium.
Signature
Parameters
name(string) - Discount descriptionamount(number) - Discount amount or percentage (e.g., 10 for 10%)isPercentage(boolean) - True for percentage, false for fixed amount
Returns
- PricingMatrix object
Example
$AddGrossDiscountToPricingMatrix("Loyalty Discount", 10, true); // 10% off gross
$AddGrossDiscountToPricingMatrix("Promo Code", 25.00, false); // £25 off
$AddNetDiscountToPricingMatrix¶
Adds a discount applied to net premium (before commission).
Signature
Parameters
name(string) - Discount descriptionamount(number) - Discount amount or percentageisPercentage(boolean) - True for percentage, false for fixed amount
Returns
- PricingMatrix object
Example
$AddInternalDiscountToPricingMatrix¶
Adds an internal discount (not visible to customer).
Signature
Parameters
name(string) - Discount descriptionamount(number) - Discount amount or percentageisPercentage(boolean) - True for percentage, false for fixed amount
Returns
- PricingMatrix object
Example
$AddItemGrossDiscountToPricingMatrix¶
Adds a gross discount specific to an item.
Signature
Parameters
itemName(string) - Target item namediscountName(string) - Discount descriptionamount(number) - Discount amount or percentageisPercentage(boolean) - True for percentage, false for fixed amount
Returns
- PricingMatrix object
Example
$AddItemNetDiscountToPricingMatrix¶
Adds a net discount specific to an item.
Signature
Parameters
itemName(string) - Target item namediscountName(string) - Discount descriptionamount(number) - Discount amount or percentageisPercentage(boolean) - True for percentage, false for fixed amount
Returns
- PricingMatrix object
Example
Add-On Functions¶
Add-ons are optional coverages or charges with their own commission/IPT structure.
$AddAddOnToPricingMatrix¶
Adds an add-on with full pricing configuration.
Signature
$AddAddOnToPricingMatrix(name, netRate, commissionRate, iptRate, isRefundable, discountAllowed, isFullPremiumMTA)
Parameters
name(string) - Add-on descriptionnetRate(number) - Net premiumcommissionRate(number) - Commission rate (decimal)iptRate(number) - IPT rate (decimal)isRefundable(boolean) - If true, refundable on cancellationdiscountAllowed(boolean) - If true, discounts can apply to this add-onisFullPremiumMTA(boolean) - If true, charges full premium on MTA (not pro-rated)
Returns
- PricingMatrix object
Example
// Refundable add-on with discounts allowed, pro-rated on MTA
$AddAddOnToPricingMatrix("Legal Expenses", 25.00, 0.15, 0.12, true, true, false);
// Non-refundable add-on, full premium on MTA
$AddAddOnToPricingMatrix("Setup Fee", 50.00, 0.10, 0.12, false, false, true);
$AddPremiumAddOnToPricingMatrix¶
Adds a premium-based add-on.
Signature
Parameters
name(string) - Add-on descriptionpremiumRate(number) - Premium rate
Returns
- PricingMatrix object
Example
$RemoveAddOnFromPricingMatrix¶
Removes an add-on by name.
Signature
Parameters
name(string) - Add-on name to remove
Returns
- PricingMatrix object
Example
Lead Value Functions¶
$CalculateLeadValue¶
Calculates lead value for lead generation scenarios.
Signature
Parameters
- Various parameters based on lead value calculation rules
Returns
- Calculated lead value
Example
$AddLeadValueFactorAndCostToPricingMatrix¶
Adds lead value factor and cost to pricing matrix.
Signature
Parameters
factor(number) - Lead value factorcost(number) - Lead acquisition cost
Returns
- PricingMatrix object
Example
Complete Example¶
// Initialize pricing matrix
$SetCurrencyToPricingMatrix("GBP");
$SetCommissionRateToPricingMatrix(0.15);
$SetIptRateToPricingMatrix(0.12);
$SetMinimumPremiumToPricingMatrix(100.00);
// Add base premium
$AddItemToPricingMatrix("Base Premium", 450.00, 1.0);
// Apply risk factors
$AddFactorToPricingMatrix("Age Factor", 1.20, true, 0); // 20% increase
$AddFactorToPricingMatrix("No Claims Discount", 0.85, true, 0); // 15% decrease
// Add discounts
$AddGrossDiscountToPricingMatrix("Multi-Policy", 10, true); // 10% off
// Add optional coverages
$AddAddOnToPricingMatrix("Legal Expenses", 25.00, 0.15, 0.12, true, true, false);
$AddAddOnToPricingMatrix("Breakdown Cover", 45.00, 0.10, 0.12, true, true, false);
// Set admin fee
$SetFeeToPricingMatrix(20.00);
// Calculate final premium
$CalculatePremiumAdditive("NewBusiness");
// PricingMatrix.Premium now contains final premium with all adjustments
Next Steps¶
- Quote Calculation Functions - Calculate premiums and handle policy changes
- Examples - Complete workflow examples