dim_contract_voucher_rate_discount_period


Description

A period during which a discount is applied in the context of a contract voucher. Discounts are defined at a hierarchical granularity: rate → term configuration → payment frequency. A null at any level means the discount applies to all values at that level and below. For example, a null rate_id means the discount covers all rates; a set rate_id with a null rate_term_configuration_id means all term configurations of that rate.

Columns

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

The primary key of this table. System column calculated by the source system.

contract_voucher_definition_id int8 19 null
dim_contract_voucher_definition.contract_voucher_definition_id Implied Constraint R

The voucher definition this discount period belongs to. Null if linked only to a specific voucher.

contract_voucher_id int8 19 null
fct_contract_voucher.contract_voucher_id Implied Constraint R

The specific redeemed voucher this discount period is linked to. Null if linked only to the definition.

rate_id int8 19 null
dim_rate.rate_id Implied Constraint R

The specific rate this discount applies to. Null if the discount applies to all rates.

rate_term_configuration_id int8 19 null
dim_rate_term_configuration.rate_term_configuration_id Implied Constraint R

The specific term configuration (contract term, cancellation period, etc.) this discount is restricted to. Null if the discount applies to all term configurations of the rate. Only meaningful when rate_id is set. Joins to dim_rate_term_configuration.

rate_term_payment_frequency_id int8 19 null
dim_rate_term_payment_frequency.rate_term_payment_frequency_id Implied Constraint R

The specific payment frequency (e.g. monthly, annual) this discount is restricted to. Null if the discount applies to all payment frequencies of the term configuration. Only meaningful when rate_term_configuration_id is set. Joins to dim_rate_term_payment_frequency.

effective_period varchar 256 null

Description on how long this discount period is effective for.

One of: * TIME_BASED: The discount is effective for a specific time period defined by effective_period_time_based_term_value and effective_period_time_based_term_unit. * UNLIMITED: The discount is effective indefinitely. * INITIAL_TERM: The discount is effective for the initial term of the contract.

effective_period_time_based_term_value int8 19 null

The numeric value of the time-based term for this discount period (e.g., 3 for 3 months). Only applicable if effective_period is TIME_BASED.

effective_period_time_based_term_unit varchar 256 null

The unit of the time-based term (e.g., MONTHS, WEEKS, DAYS). Only applicable if effective_period is TIME_BASED.

discount_position int8 19 null

The position/order of this discount in a sequence of multiple discount periods.

discount_type varchar 256 null

The type of discount: ABSOLUTE (fixed amount) or PERCENTAGE.

discount_absolute_amount numeric 19,2 null

The absolute discount amount if discount_type is ABSOLUTE.

discount_percentage numeric 19,2 null

The percentage discount if discount_type is PERCENTAGE. E.g., 100.00 for free.

last_updated timestamptz 35 null

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

Relationships