Documentation Index
Fetch the complete documentation index at: https://docs.axle.insure/llms.txt
Use this file to discover all available pages before exploring further.
Overview
As an extension of Policy Validation, you can also use Templates to simplify Rule configuration in your application. Instead of manually storing the list of rules, you can define them once and let Axle handle rule maintenance and policy validation.Dynamic Inputs via source and default
Rules that can have inputs (e.g. collision-coverage-meets-requirements which can have a deductible input) are configured in a template using a source key instead of a hardcoded value. At evaluation time, Axle looks up the rule input value dynamically using the following priority order:
- Request body metadata — the flat
metadataobject passed in the Validate Policy with Template request body, keyed bysource. - Ignition session metadata — the
metadataobject via Start Ignition, keyed bysource. - Template default — the
defaultvalue defined on the rule input in the template (if set).
Metadata rules are defined in Start Ignition (
metadata on the session) and Validate Policy with Template (request body).Example Template
source: "maxDeductible" tells Axle to look for a key named maxDeductible in the request body metadata or Ignition session metadata. If neither provides that key, the default value of 500 is used.
Usage
Create or modify Validation Template
Start by identifying the rules you want to use. Then, either create a new template or modify an existing one.If your application is a platform, you can create shareable template across all of your destination clients. If you are existing Axle for Platforms customer, please reach out to Axle team for more information.
Provide dynamic inputs to Ignition metadata (optional)
Include
metadata in Start Ignition to serve as dynamic Rule inputs. The keys in this object must match the source values defined in your Template’s rule inputs, and the values must conform to the associated Rule input type.For example, if a template rule input has "source": "maxDeductible", include "maxDeductible": 500 in the metadata object when starting Ignition.Retrieve Validation Templates
After creating a template, you can store its Template identifier in your application. Using this identifier, you can retrieve specific template and all of its details or get all the available Templates for your Axle client or destination client.
Request Policy Validation with Template
Use the Template identifier to make a request to Validate Policy with Template. The request body accepts a flat
metadata object whose keys correspond to the source values in your Template’s rule inputs — these values override any matching keys from the Ignition session metadata.