Overview
Straight Through Processing (STP) in underwriting enables automated decision-making based on rule logic. Advanced trigger support lets users define custom logic using Python code, vastly increasing flexibility and control over rule execution.
How Do Advanced Triggers Work?
Advanced triggers use Python code to determine if a rule should execute. The core of this logic is the return_value variable:
- Set return_value = True to execute the rule.
- Set return_value = False to skip the rule.
Example:
Your Python code can include any logic you need—if statements, loops, calculations, and much more.
What Data Can I Access in My Triggers?
Advanced triggers expose a wide range of data for you to use in your logic. This includes policy details, vehicles, drivers, coverages, claims, and more.
Below are all the variables available to reference within each category scope:
All Category Scopes
These variables are universally available, regardless of the scope:
| Variable Name | Type | Description |
| revision_date | date | Revision Date |
| effective_date | date | Policy Term Effective Date |
| policy_inception_date | date | Policy Inception Date |
| age_from_date | function | Calculate age from a date |
| age_from_year | function | Calculate age from a year |
| date | function | Date utility |
| datetime | function / datetime | Date and time types |
| math | module | Mathematical functions |
| named_insureds | list[NamedInsured] | All named insureds |
| policy_items | dict{coverage_name:Coverage} | Policy-wide coverages/items |
Vehicle, Vehicle → Policy Scope
| Variable Name | Type | Description |
| {field_name} | Vehicle | Vehicle fields (e.g., vehicle_make, vehicle_year) |
| primary_driver | Driver | Vehicle's primary driver |
| secondary_driver | Driver | Vehicle's secondary driver |
| violations | list[Violation] | Vehicle violations |
| drivers | list[Driver] | All policy drivers |
| vehicles | list[Vehicle] | All policy vehicles |
| vehicle_items | dict{coverage_name:Coverage} | All vehicle coverages/calculation items |
Vehicle UI Scope
Same as above; access any vehicle field:
| Variable Name | Type | Description |
| {field_name} | Vehicle | Vehicle fields |
Watercraft, Watercraft → Policy Scope
| Variable Name | Type | Description |
| {field_name} | Watercraft | Watercraft fields |
| property_items | dict{coverage_name:Coverage} | All watercraft coverages/calculation items |
Watercraft UI Scope
| Variable Name | Type | Description |
| {field_name} | Watercraft | Watercraft fields |
Driver, Driver → Policy Scope
| Variable Name | Type | Description |
| {field_name} | Driver | Driver fields (e.g., name, date_of_birth) |
| violations | list[Violation] | Driver violations |
| drivers | list[Driver] | All policy drivers |
| vehicles | list[Vehicle] | All policy vehicles |
Examples:
Driver UI Scope
| Variable Name | Type | Description |
| {field_name} | Driver | Driver fields |
Claim Scope
| Variable Name | Type | Description |
| {field_name} | Claim | Claim fields |
Module Scopes Available Data
Generally, module scopes provide access to the same data as category scopes, with extra data available in the STP module scope.
STP Module Scope
In addition to All Category Scopes and Active Category Scopes, you have access to:
| Variable Name | Type | Description |
| underwriting_questions | list[UnderwritingQuestion] | Underwriting Questions data |
| vendor_claims | list[VendorClaim] | Vendor claims data |
| catastrophes | list[Catastrophe] | All catastrophes created in the system |
| policy_claims | list[Claim] | All claims related to this policy |
| property_disclosures | list[PropertyDisclosure] | All property disclosures |
| properties | list[Property] | All properties of the policy |
Summary
Advanced triggers empower users to automate underwriting with complex conditions using familiar Python logic. With extensive data access and flexibility, you can craft highly customized rules for straight-through processing.
If you need more examples or specific data references, ask your technical team for details though a zendesk ticket!