Pricing Engines

Turn applicant data into loan offers with a spreadsheet-style pricing table, then version, test and run it from applications or the API.

A pricing engine is a lookup table that turns applicant data into one or more loan offers. Each row of the table is a possible offer. Its condition columns describe who qualifies (for example, a credit score of 700 or more and a loan amount between $5,000 and $20,000), and its output columns hold the terms (rate, term, fees). When an application reaches a decision outcome, LendAPI runs the pricing engines tied to that outcome and every matching row becomes an offer. A pricing engine can return zero, one or many offers.

Key concepts

  • Condition column: an input column. Its operator is Range or Equals, and it is mapped to an input variable such as credit_score.
  • Action column: an output column. The cell value is copied into the offer, for example interest_rate = 0.24.
  • Derived column: an output column whose value is an expression built from other variables, for example interest_fee + other_fees.
  • Offer row: one row of the table. The first column is the offer name.

How offers are priced

flowchart LR
    A[Decision tree reaches an outcome] --> B{Pricing engines triggered<br/>by this outcome and product}
    B --> C[Run live version<br/>with applicant variables]
    C --> D[Each matching row = one offer]
    D --> E[Child engine runs<br/>using parent outputs]
    D --> F[Offers tab on the application]
  1. A decision tree reaches an action node with an outcome. See Outcomes and Offers.
  2. LendAPI finds every active parent engine whose Outcome trigger includes that outcome and whose product matches the application's product. If the engine is assigned to specific sub-tenants, applications from other sub-tenants are skipped.
  3. The engine's live version runs with the application's current values for each input variable.
  4. Each row whose conditions all match produces an offer containing the action and derived values.
  5. If a Child Pricing Engine is set, it runs next.

A pricing engine can also be attached directly to a decision tree (it then runs before the tree's rules, so rules can use its outputs) or added as a Pricing Engine node in Flow Builder.

Condition formats

OperatorExample cellUse it for
Range700-800A numeric band with a lower and upper bound
Range700+A numeric value with only a lower bound
EqualsCAAn exact value, such as a state or a loan term

Set up an engine

Create an engine

  1. Go to Workflows → Pricing Engine and click + Pricing Engine.
  2. In New Pricing Engine, enter a unique name, choose the Engine Type (Parent or Child) and add an optional description.

Build the table

The editor is a spreadsheet. The top rows define the columns and each row below them is an offer.

  1. For each column, choose the variable it reads or writes and its type: Range, Equals, Action or Derived.
  2. In the first column of each offer row, enter the offer name (for example Loan-12).
  3. Fill in condition cells and output values. For Derived columns, enter an expression built from other variables.
  4. Use Add row, Add column and Remove row or column to change the grid, or Import a spreadsheet (.xlsx, .xls, .csv, .ods).
  5. Click Save (the disk icon).

Every column must be mapped to a variable before you can save. Publish is enabled only when the engine has unpublished changes.

Configure details and triggers

In the side panel:

SectionFieldPurpose
DETAILSEngine Name, Engine DescriptionName and notes.
DETAILSEngine StatusActive or inactive. Inactive engines are not triggered by outcomes.
TRIGGEROutcomeThe decision outcomes that trigger this engine. You can pick several.
TRIGGERAssign to a ProductThe product(s) the engine prices.
TRIGGERAssign to TenantsLimit the engine to specific sub-tenants.
TRIGGERChild Pricing EngineAn engine to run after this one, using this engine's outputs.

Test the engine

Click the Test (play) button, enter a value for each INPUT, and run it. The OUTPUTS show the result for the values you entered. If no row matches, no offer is returned. Test before every publish, including values right at the edges of your ranges.

Publish and set live

  1. Click Publish. In Publish Pricing Engine, describe what changed and optionally tick Set as live version.
  2. Open the Versions tab to see every published version. Click Set Live on a version to make it the one applications use.

Control manual offer edits (Config)

Open the engine's Config page (the Config button in the engine header). It lists the engine's variables with Allow Edits, Minimum value and Maximum Value; minimum and maximum are available for numeric variables. These rules apply when a non-admin agent modifies an offer on an application:

  • Agents can only change values marked Allow Edits.
  • Minimum and maximum can be a fixed number or another variable (for example, requested_loan_amount).
  • Admins are not restricted. If an engine has no config, any value can be edited.

See Outcomes and Offers for the offer editing flow.

Run pricing via the API

Base URL: https://app.lendapi.com/api/v1/. Authenticate with Authorization: Bearer <your API key>. Keys that start with live_ use your Production environment; keys that start with test_ use your Sandbox. The engine id is its UUID.

ActionMethod & pathNotes
List pricing enginesGET /pricing_engines/Paging with start and size. Reference
List versionsGET /pricing_engine/{id}/versions/Includes default_version (the live one). Reference
List parametersGET /pricing_engine/{id}/{version}/params/Input variables the version needs. Reference
Run a pricing enginePOST /pricing_engine/{id}/run/Runs the live version unless you pass version. Reference

Example: run a pricing engine

curl -X POST "https://app.lendapi.com/api/v1/pricing_engine/51638ae1-b7db-42d2-8c76-685259ba861c/run/" \
  -H "Authorization: Bearer test_xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
        "version": 3,
        "params": {
          "credit_score": 690,
          "requested_loan_amount": 12000
        }
      }'

The response has "object": "pricing_engine" and a result holding the matched offers. If no row matches, result is {"message": "No offer found"}.

🚧

API runs don't create offers on applications

Running an engine through the API only returns offers. It does not attach them to an application. Offers reach applications when an outcome triggers the engine.

Access and best practices

Permissions

Access is controlled by the Pricing Engine module. Edit access is needed to create, publish and set versions live. Changing the Config (allowed edits, min/max) requires an admin. See Roles and Permissions.

Best practices

  • Order isn't priority. Every matching row becomes an offer. If you want one offer per applicant, make your ranges non-overlapping.
  • Check range edges. Make sure adjacent bands neither overlap nor leave gaps, and test the exact boundary values.
  • Use derived columns for values that depend on the row (fees, totals) instead of hard-coding them.
  • Test with missing data as well as typical values before publishing.
  • Confirm the trigger. An engine with no outcome trigger never runs for applications.
  • Keep a version note that explains why prices changed. It is the audit trail when someone sets an older version live.

Related guides


Did this page help you?