fct_contract_voucher


Description

A voucher code that can be applied to a contract to get a discount or credit. Only includes vouchers that have been redeemed or withdrawn. Represents the actual usage of a voucher.

Columns

Column Type Size Nulls Auto Default Children Parents Comments
contract_voucher_id int8 19 null
dim_contract_voucher_rate_discount_period.contract_voucher_id dim_contract_voucher_rate_discount_period_contract_voucher_id_fkey R

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

contract_id int8 19 null
fct_contract.contract_id fct_contract_voucher_contract_id_fkey R

The contract this voucher is applied to. Null if the voucher was withdrawn before it could be redeemed.

contract_voucher_definition_id int8 19 null
dim_contract_voucher_definition.contract_voucher_definition_id fct_contract_voucher_contract_voucher_definition_id_fkey R

The voucher definition this voucher was generated from.

company_id int8 19 null
dim_company.company_id fct_contract_voucher_company_id_fkey R

The partner company this voucher is associated with.

campaign_id int8 19 null
dim_campaign.campaign_id fct_contract_voucher_campaign_id_fkey R

The campaign this voucher is associated with.

redemption_date timestamp 29,6 null

Date when the voucher was redeemed and applied to a contract.

withdrawn_date timestamp 29,6 null

Date when the voucher was withdrawn/cancelled. Withdrawn vouchers are no longer valid.

effective_start_date timestamp 29,6 null

Start date when the voucher benefits become effective.

effective_end_date timestamp 29,6 null

End date when the voucher benefits are no longer effective.

voucher_code varchar 256 null

The unique code of this voucher.

voucher_number varchar 256 null

A human readable key assigned to this voucher.

is_reversed bool 1 null

Whether this voucher has been reversed, nullifying its effects.

archived bool 1 null

Whether this voucher has been permanently removed but kept for historic relations.

contract_voucher_type varchar 256 null

The type of benefit this voucher provides.

One of: * CREDIT: Fixed amount credit applied to the customer’s account. * DISCOUNT: Discount applied to the contract. * CONTRACT: Voucher tied to a specific contract that is free of charge. * COMPANY_FEE_SPLIT: Partner company pays part of the fee.

credit_amount numeric 18 null

The credit amount provided by this voucher, if type is CREDIT.

legacy_discount_type varchar 256 null

The type of discount: ABSOLUTE or PERCENTAGE. Note: This field is deprecated, use dim_contract_voucher_rate_discount_period instead.

legacy_discount_absolute_amount numeric 18 null

The absolute discount amount if discount_type is ABSOLUTE. Note: This field is deprecated, use dim_contract_voucher_rate_discount_period instead.

legacy_discount_percentage numeric 18 null

The percentage discount if discount_type is PERCENTAGE. Note: This field is deprecated, use dim_contract_voucher_rate_discount_period instead.

company_fee_split_type varchar 256 null

The type of company fee split: ABSOLUTE or PERCENTAGE.

company_fee_split_absolute_amount numeric 18 null

The absolute amount the company pays if company_fee_split_type is ABSOLUTE.

company_fee_split_percentage numeric 18 null

The percentage the company pays if company_fee_split_type is PERCENTAGE.

last_updated timestamptz 35 null

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

Relationships