dim_customer_group


Description

One row per customer group configured in the system. Customer groups classify customers by membership arrangement and determine whether group discounts apply to their contracts. Groups belong to an organization unit and come in three types: Customer (a generic grouping for shared discounts), Premium (an elevated-tier group linking a referred customer to a referrer), and Shared Contract (a family plan in which all members share a single contract). The group type governs discount behaviour, member capacity limits, and contract linking throughout the model.

Columns

Column Type Size Nulls Auto Default Children Parents Comments
customer_group_id int8 19 null
bridge_customer_group_to_customer.customer_group_id bridge_customer_group_to_customer_customer_group_id_fkey R
dim_customer_group_member_discount.customer_group_id dim_customer_group_member_discount_customer_group_id_fkey R

Unique identifier for the customer group.

organization_unit_id int8 19 null
dim_organization_unit.organization_unit_id dim_customer_group_organization_unit_id_fkey R

The organization unit that owns the customer group.

contract_id int8 19 null
fct_contract.contract_id dim_customer_group_contract_id_fkey R

The contract shared by all members of this group. Only populated when type = 'Shared Contract'.

name varchar 256 null

Display name of the customer group. Auto-generated for Customer type groups (prefixed CG). Always UNKNOWN for Premium type groups, which carry no name.

code varchar 256 null

Business code used to identify the customer group. Auto-generated for Customer type groups (prefixed CG). Always UNKNOWN for Premium type groups, which carry no code.

type varchar 256 null

The type of customer group, determining its purpose and behaviour: * Customer: A generic grouping of customers (e.g. for shared discounts). * Premium: A premium-tier group with elevated benefits or pricing rules. * Shared Contract: A group whose members share a single contract (e.g. a family plan).

is_discountable bool 1 null

Whether this group is configured to apply a discount to eligible members’ contracts. Always true for Premium type groups. When false, no group discount is applied.

discount_type varchar 256 null

How the group’s discount values are expressed: PERCENTAGE (0-100) or ABSOLUTE (fixed amount). NULL when the group has no discount tiers configured.

apply_discount_during_paid_period bool 1 null

Controls whether the group discount is charged during the billing period in which the member joins the group, or deferred to the start of the next billing cycle. The group discount’s effective date (visible as fct_contract_price_history.valid_from_date where dynamic_adjustment_origin = 'CUSTOMER_GROUP') is always set to the membership start date (bridge_customer_group_to_customer.start_date) in both cases. Always true for Premium type groups. * When true: the group discount is charged proportionally within the billing period it falls into. The period is split at the membership start date — the portion before is charged at the original price, the remainder at the discounted price. * When false: the current billing period is charged in full at the original price. The group discount takes effect only from the start of the next billing cycle. NULL when is_discountable is false.

max_member_count int4 10 null

Maximum number of members allowed in the group. Always 2 for Premium type groups (one discount receiver, one referred customer). NULL when no explicit limit is configured for Customer or Shared Contract groups.

max_full_age_member_count int4 10 null

Maximum number of adult members allowed in the group. Only populated when type = 'Shared Contract'.

max_under_age_member_count int4 10 null

Maximum number of underage members allowed in the group. Only populated when type = 'Shared Contract'.

discount_value numeric 23,6 null

Extra discount added on top of the group discount step matched from the group’s discount schedule (see dim_customer_group_member_discount) for the current eligible group size. Applied to the contracts of eligible group members (see bridge_customer_group_to_customer.discountable). The value is a percentage (0-100) or an absolute amount, as defined by discount_type. Only Customer type groups can carry a non-zero value here — Premium and Shared Contract groups always have 0.

is_archived bool 1 null

Whether the customer group has been archived.

last_updated timestamptz 35 null

System column. UTC Timestamp at which entry was calculated (lags shortly behind source system).

Relationships