Guarantee Catalog Component¶
Overview¶
The Guarantee Catalog component is responsible for managing insurance product guarantees, their configurations, and validating guarantee instantiations. It provides a hierarchical structure of categories, bundles, bundle choices, and guarantees with associated parameters and expressions.
Key Features:
- Hierarchical organization of insurance guarantees per country
- Guarantees validation
- Daily synchronization with YAML configuration
It is intended to be used by the Offer builder and Claims.
Data Model¶
Key Entities¶
- Category
- Top-level grouping of insurance guarantees
- Contains bundles and category-level parameters
- Country-specific configuration
- Bundle
- Groups related bundle choices
- Can be optional or mandatory
- Belongs to a specific category
- Bundle Choice
- Specific configuration of guarantees
- Contains bundle-level parameters
- Links to multiple guarantees
- Guarantee
- Core insurance coverage definition
- Contains expressions and eligibility items
- Can belong to multiple bundle choices
- Guarantee Expression
- Defines how guarantee reimbursement is calculated
- Contains expression-specific parameters
- Supports multiple expression types
Public API¶
This component exposes an HTTP get endpoint GET /guarantee_catalog that returns the complete hierarchy of guarantee definitions for the current country.
It also exposes two public functions:
get_guarantee_catalog: returns the full guarantee catalog, containing all guarantee categories and their complete hierarchy for the current country.validate_coverage_rules: validates coverage rules (guarantee instantiations) against business rules and data consistency.
For more details, refer to the API Reference.
Synchronization¶
The component includes a daily synchronization command to ensure the database reflects the latest guarantee catalog configuration:
This command:
- Reads the guarantees from a country-specific YAML file, which serves as the source of truth
- Validates the YAML file's structure and relationships
- Deletes existing database entries and creates new ones to match the YAML file configuration
Links¶
- Project overview (Linear) ⧉
- High level design (Notion) ⧉ is the high level design for context.