dim_customer_group_member_discount


Description

Defines the group discount schedule for a customer group. Each row is one step in the schedule: when the number of eligible group members reaches or exceeds min_member_count, that step’s discount_value becomes the group discount applied to all eligible members’ contracts. The highest matching step is always used — for example, with thresholds at 2 members (5%) and 4 members (10%), a group of 4 eligible members receives a 10% group discount. dim_customer_group.discount_value is then added on top of the matched step’s value. Join to dim_customer_group on customer_group_id to get the group type and discount_type (percentage or absolute) that applies to all steps.

Columns

Column Type Size Nulls Auto Default Children Parents Comments
customer_group_member_discount_id varchar 256 null

Generated identifier for this group discount step.

customer_group_id int8 19 null
dim_customer_group.customer_group_id dim_customer_group_member_discount_customer_group_id_fkey R

The customer group this discount step belongs to.

min_member_count int4 10 null

Minimum number of eligible group members needed for this discount step to activate. The step with the highest min_member_count that is still ≤ the current eligible group size is applied.

discount_value numeric 23,6 null

The group discount for this step. Interpreted as a percentage (0-100) or an absolute amount according to dim_customer_group.discount_type.

discount_type varchar 256 null

How the discount value is expressed: PERCENTAGE (0-100) or ABSOLUTE (fixed amount).

last_updated timestamptz 35 null

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

Relationships