Swallow
  • YOUR FIRST MODEL
    • Setting up your first project
    • Manual setup of a new product
    • Excel Model Upload
    • Create your team
    • Essential concepts
      • Syntax
      • Steps
      • Collections
      • Try Model
      • Spotlight
  • PROCESS
    • Team Management
    • Governance & Collaboration
  • BUILD
    • Building with AI
    • Step builder
      • Understanding step types
      • Ordering step blocks
      • Placeholder mode
      • Up/Downloading models
      • Sharing your model
      • Running tests
    • Inputs
    • Enriching Raw Data
      • Transform Data
      • Enrich via API
      • Data Set
      • Collection
      • Custom Code
    • Setting Up Decisions
      • Exclusions
      • Excesses
      • Endorsements
      • Refer
    • Making Calculations
      • Factors
      • Calculation
    • Outputs
  • TEST
    • Creating New Tests
    • Running Tests
    • Editing Tests
    • Reading & Interpreting Tests
    • Impact Testing
  • DATA
    • Working with real-time data
    • Data Views
    • Data Quotas
    • Troubleshooting
    • API Webhooks
    • Data Downloads
  • ADMIN & SETTINGS
    • Project Management
    • Account Management
  • INTEGRATIONS
    • Introduction
    • Payments
      • Stripe
      • GoCardless
      • Adyen
    • Alerting
      • Slack
      • Zapier
    • Data
      • AWS S3
      • Google Sheets
    • Admin
      • Socotra
      • Guidewire
      • Hubspot
      • Salesforce
  • Developer API
    • Introduction
    • Authentication
    • Errors codes
    • Endpoints
      • /quotes
      • /projects
      • /tests
      • /process
Powered by GitBook
On this page
  • 1. Calculated Final Result
  • Output Key
  • Formula
  • Default Value
  • 2. Quote Validity
  • Expression
  • Default value
  • Output key
  • 3. Additional Outputs
  1. BUILD

Outputs

Defining the outputs of your pricing model.

PreviousCalculationNextCreating New Tests

Last updated 11 months ago

The last step of every model is where you define and format the outputs that you'll generate when the pricing process is complete.

The output step defines what your model will return to your customer.

Whether you're building your pricing model from scratch, editing an existing version of your model or working from a Swallow template, the last step will always be a light blue OUTPUT block.

The OUTPUT step is made up of three sections.

1. Calculated Final Result

The calculated result that you'll display to a customer, such as final total price or premium.

Output Key

This can't be changed in your output step. 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.

2. Quote Validity

This is how your model determines whether a quote is valid or not.

For example, you might not want to provide a quote if the customer is too young, or if the driver owns a car of a certain vehicle make or model.

Expression

This is an expression that you'll set to return a boolean TRUE or FALSE, using the standard Syntax.

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.

Default value

Set a fall-back default value here.

Output key

Name the key for the validity decision. You can use letters, symbols and numbers, but no spaces.

3. Additional Outputs

This allows you to amend the customer's result by enriching it with additional output keys from any of your steps.

This is useful for returning things like excesses, commissions, taxes, or fees, but could also be where you may want to re-share information about their quote that has been enriched - for example, detailed information about their car's make, model and trim.

Simply select an output from the drop down menu, and add it to the list.

The API response containing your outputs will then look like this:

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