Output

The output step defines what your model with return to your customer. Every model is required to have an output step.

Output is made of three sections.

Final Calculation

The calculated result (price, premium etc) that you will display to the customer.

Output key - This can't be changed here. It is always result.

Formula - This a mathematical formula based on the outputs in the previous steps. It can have any mathematical operator. The answer must be of type decimal.

Default Value - This is the fallback value. This shouldn't ever trigger unless that model fails in an unexpected way - i.e. faulty data or failed enrichment calls.

Quote Validity

This is how to determine if the quote is valid. i.e. you might not want to provide a quote if the customer is too young, or drivers a certain vehicle make.

Expression - This is an expression that will return a boolean TRUE or FALSE. The expression can look at any output from all steps but it all so has access to additional helper outputs called:

  • exclusions which is an array of all exclusions triggers in factor steps.

  • refers which is an array of all refers triggers in factor steps.

  • endorsements which is an array of all endorsements triggers in factor steps.

  • excesses which is an array of all excesses triggers in factor steps.

Additional Outputs

This allows you to amend the result by enriching with additional output keys from all steps. This is useful for returning commissions, taxes or fees.

The API response will then look like:

```json
"output": {
    "base_rule": 114,
    "matrix_rule": 0,
    "exclusions_rule": 0,
    "result": 114,
    "valid": true
}
```

Last updated