dim_discount_campaign


Description

A discount campaign is a time-bound promotional discount configuration that studio administrators define and activate per studio. When active, it automatically applies a discount to contracts signed via the configured allowed sales channels (origin types). A campaign defines its validity window (active_from / active_to), how it interacts with discount vouchers (voucher_interoperability_mode), and which rate bundles / flat fees / modules it applies to.

Columns

Column Type Size Nulls Auto Default Children Parents Comments
discount_campaign_id int8 19 null
bridge_discount_campaign_to_allowed_origin_type.discount_campaign_id Implied Constraint R
bridge_discount_campaign_to_organization_unit.discount_campaign_id Implied Constraint R
dim_discount_campaign_discount_period.discount_campaign_id Implied Constraint R
dim_discount_campaign_localized.discount_campaign_id Implied Constraint R
dim_discount_campaign_rate_bundle_scope.discount_campaign_id Implied Constraint R
dim_discount_campaign_scope.discount_campaign_id Implied Constraint R

The primary key of this table.

name varchar 256 null

The internal administrative name of the discount campaign as entered by the studio administrator. Not customer-facing — see dim_discount_campaign_localized for translated public names.

active_from timestamptz 35 null

UTC timestamp marking the start of the campaign’s validity window (inclusive). Always set.

active_to timestamptz 35 null

UTC timestamp marking the end of the campaign’s validity window (inclusive). NULL means the campaign has no expiry date and remains active indefinitely.

archived bool 1 null

True if the campaign has been soft-deleted and is no longer available for new activations. Archived campaigns are retained for historical reference.

voucher_interoperability_mode varchar 256 null

Controls how this campaign interacts with discount vouchers when both are active.

One of: * ALLOW_DISCOUNT_VOUCHERS: Discount vouchers can be combined with this campaign simultaneously (default). * DISALLOW_DISCOUNT_VOUCHERS: Discount vouchers are blocked while this campaign is active; the campaign takes full precedence. * VOUCHER_REPLACES_DISCOUNT: When a customer redeems a discount voucher, the voucher replaces this campaign discount entirely.

last_updated timestamptz 35 null

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

Relationships