Skip to content

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

View Data Model Documentation

Key Entities

  1. Category
    • Top-level grouping of insurance guarantees
    • Contains bundles and category-level parameters
    • Country-specific configuration
  2. Bundle
    • Groups related bundle choices
    • Can be optional or mandatory
    • Belongs to a specific category
  3. Bundle Choice
    • Specific configuration of guarantees
    • Contains bundle-level parameters
    • Links to multiple guarantees
  4. Guarantee
    • Core insurance coverage definition
    • Contains expressions and eligibility items
    • Can belong to multiple bundle choices
  5. 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:

  1. get_guarantee_catalog: returns the full guarantee catalog, containing all guarantee categories and their complete hierarchy for the current country.
  2. 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:

flask guarantee_catalog sync_guarantee_catalog

This command:

  1. Reads the guarantees from a country-specific YAML file, which serves as the source of truth
  2. Validates the YAML file's structure and relationships
  3. Deletes existing database entries and creates new ones to match the YAML file configuration