bridge_customer_group_to_customer


Description

Records each customer’s membership in a customer group, one row per membership event. Captures the validity period, the member’s individual discount eligibility, and — for Shared Contract type groups — the relationship role within the group. A customer may appear multiple times for the same group across non-overlapping periods. Join to dim_customer_group on customer_group_id to determine the group type, discount configuration, and member limits. Join to dim_customer on customer_id for customer attributes.

Columns

Column Type Size Nulls Auto Default Children Parents Comments
customer_group_to_customer_id int8 19 null

Unique identifier for the customer-group membership row.

customer_id int8 19 null
dim_customer.customer_id bridge_customer_group_to_customer_customer_id_fkey R

The customer assigned to the group.

customer_group_id int8 19 null
dim_customer_group.customer_group_id bridge_customer_group_to_customer_customer_group_id_fkey R

The customer group assigned to the customer.

start_date date 13 null

Date when the customer became part of the customer group.

end_date date 13 null

Date when the customer-group membership ended. Null means the membership is still active.

is_discountable bool 1 null

Whether this individual membership is eligible to receive the group discount on the member’s contract. Acts as a per-membership override: even when the group is configured as discountable (dim_customer_group.is_discountable = true), setting this to false prevents the group discount from being applied to this member’s contracts.

permission varchar 256 null

Administrative permission level assigned to the customer within the group. Controls whether the member can manage group settings (e.g. add or remove members). NULL when no explicit permission has been configured for this membership.

relationship_type varchar 256 null

How the customer is related to the rest of the group. Only populated for Shared Contract type groups. * OWNER: The customer who owns and administers the group (not user-selectable). * PARENT: A parental member of the group. * CHILD: A child member of the group. * SPOUSE: A spousal member of the group. * FRIEND: A friend member of the group. * PARTNER: A partner member of the group.

is_archived bool 1 null

Whether the customer-group membership has been archived.

last_updated timestamptz 35 null

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

Relationships