Field Details: coll_product_group

Back to Fields
Basic Information
Field Name: coll_product_group
Source Table: evolved_records
Version: 1
Expression Type: jinja
Output Type: TEXT
Status: Active
Created: 2025-10-16 04:31:29
Updated: 2025-10-16 04:31:29
Metadata
Display Name: Product Group
Categories: COLLECTIONS
Group: Product Metrics
Usage
Used in Summary: Yes
Used in Template: No

Description

No description available

Expression

            {% if raw_data.product is defined %}
                {% set product = raw_data.product|upper %}
                {% if product in ["TWL", "PL", "PLN", "BL"] %}
                    "PERSONAL"
                {% elif product in ["ALN", "CAR", "VL", "TW"] %}
                    "VEHICLE"
                {% elif product in ["HL", "LAP", "MORT", "MTL"] %}
                    "MORTGAGE"
                {% elif product in ["BIL", "BZL", "MSME"] %}
                    "BUSINESS"
                {% else %}
                    "OTHER"
                {% endif %}
            {% elif raw_data.product_code is defined %}
                {% set product_code = raw_data.product_code|upper %}
                {% if product_code in ["TWL", "PL", "PLN", "BL"] %}
                    "PERSONAL"
                {% elif product_code in ["ALN", "CAR", "VL", "TW"] %}
                    "VEHICLE"
                {% elif product_code in ["HL", "LAP", "MORT", "MTL"] %}
                    "MORTGAGE"
                {% elif product_code in ["BIL", "BZL", "MSME"] %}
                    "BUSINESS"
                {% else %}
                    "OTHER"
                {% endif %}
            {% else %}
                "UNKNOWN"
            {% endif %}