ZenotiHelp

Campaigndiscount Fact Consolidated

ZTZenoti Docs Team Updated April 10, 2026 2 min readGuide

Consolidated fact table storing campaign discount and voucher redemption details at the invoice item level, including discount values and associated guest information.

Columns

Column Name Data Type Nullable Description
organization name VARCHAR(256) YES Name of the organization. Sourced from DimOrganization.organization name.
organization account name VARCHAR(256) YES Account name of the organization. Sourced from DimOrganization.organization account name.
zone name VARCHAR(256) YES Name of the geographic zone. Sourced from DimCenter.zone name.
center name VARCHAR(256) YES Name of the center. Sourced from DimCenter.center name.
center city VARCHAR(256) YES City where the center is located. Sourced from DimCenter.center city.
center zip VARCHAR(128) YES ZIP/postal code of the center. Sourced from DimCenter.center zip.
center state name VARCHAR(128) YES State name of the center. Sourced from DimCenter.center state name.
country name VARCHAR(128) YES Country name of the center. Sourced from DimCenter.country name.
operating center BOOLEAN YES Indicates whether the center is an operating center. Sourced from DimCenter.operating center.
center wid INTEGER YES Warehouse identifier for the center. Sourced from DimCenter.center wid.
minutestoadd INTEGER YES Minute offset to convert UTC to center local time.
user id VARCHAR(36) YES Unique identifier of the guest who redeemed the discount. Sourced from DimUser.user id.
user first name VARCHAR(160) YES First name of the guest. Sourced from DimUser.user first name.
user last name VARCHAR(256) YES Last name of the guest. Sourced from DimUser.user last name.
user middle name VARCHAR(128) YES Middle name of the guest. Sourced from DimUser.user middle name.
coupon number BIGINT YES Coupon number associated with the campaign discount.
expiry date TIMESTAMP WITHOUT TIME ZONE YES Expiry date of the coupon or voucher.
invoiceid VARCHAR(36) YES Unique identifier of the invoice.
invoiceitemid VARCHAR(36) YES Unique identifier of the invoice item.
campaign name VARCHAR(256) YES Name of the campaign associated with the discount.
voucher code VARCHAR(256) YES Voucher code used for the discount redemption.
discount value DOUBLE PRECISION YES Discount value applied to the individual invoice item.
total discount value DOUBLE PRECISION YES Total discount value applied across the invoice.
appfactor NUMERIC(10,2) YES Application factor used for discount calculation.
campaign code VARCHAR(256) YES Code assigned to the campaign.
discountid VARCHAR(36) YES Unique identifier for the discount record.
factcampaigndiscountwid BIGINT YES Warehouse identifier for the campaign discount fact record.
factcampaigndiscountid BIGINT YES Business identifier for the campaign discount fact record.
Center Code VARCHAR(40) YES Code assigned to the center. Sourced from DimCenter.Center Code.
Invoice No VARCHAR(160) YES Human-readable invoice number.

Primary Key

factcampaigndiscountwid -- BIGINT warehouse surrogate key uniquely identifying each campaign discount fact record.

Foreign Keys

  • center wid references DimCenter
  • user id references DimUser
  • invoiceid references FactInvoice
  • invoiceitemid references FactInvoiceItem
  • discountid references DimDiscount
  • groupid references the tenant/data group

Standard ETL metadata columns (EtlLastUpdatedOn, EtlLastUpdatedBy, podname, groupid) are present in the underlying table but omitted from this reference for brevity.

Was this article helpful?
Your feedback helps us improve our documentation.