ZenotiHelp

Campaign Discount Fact Table

ZTZenoti Docs Team Updated April 10, 2026 1 min readGuide

Stores discount values applied to invoice items through marketing campaigns and coupons.

Columns

Column Name Data Type Nullable Description
factcampaigndiscountwid BIGINT IDENTITY NOT NULL Surrogate key and primary key for the campaign discount record.
factcampaigndiscountid BIGINT NOT NULL Source system identifier for the campaign discount.
invoiceid VARCHAR(36) YES GUID of the associated invoice.
invoiceitemid VARCHAR(36) YES GUID of the associated invoice item.
campaignwid BIGINT YES Foreign key to the campaign dimension.
couponwid BIGINT YES Foreign key to the coupon dimension.
centerwid BIGINT YES Foreign key to the center dimension (Bi_DimCenter.centerwid).
podid SMALLINT YES Identifier for the pod (database partition).
userwid BIGINT YES Foreign key to the user/guest dimension (Bi_DimUser.userwid).
vouchercode VARCHAR(256) YES Voucher or coupon code used for the discount.
discountvalue DOUBLE PRECISION YES Discount value applied to the individual item.
totaldiscountvalue DOUBLE PRECISION YES Total discount value across the invoice.
appfactor NUMERIC(10,2) YES Apportionment factor for distributing the discount.
void INTEGER YES Soft-delete flag (0 = active, non-zero = voided). Default: 0.
discountwid BIGINT YES Foreign key to the discount dimension.
invoiceNo VARCHAR(160) YES Human-readable invoice number.

Note: All fact tables also include standard ETL metadata columns (podname, organizationid, groupid, etlCreatedDate) which are omitted from this reference for brevity.

Primary Key

factcampaigndiscountwid

Foreign Keys

Column References
userwid Bi_DimUser.userwid
centerwid Bi_DimCenter.centerwid

Enumerator Values

Column Values
void 0 = active; non-zero = voided/soft-deleted.
Was this article helpful?
Your feedback helps us improve our documentation.