Guest Coupon Dimension Table
ZTZenoti Docs Team Updated April 10, 2026 2 min readGuide
Dimension table storing coupon instances issued to guests, including print dates, expiry, redemption details, and associated campaign information.
Columns
| Column Name | Data Type | Nullable | Description |
|---|---|---|---|
| guestcouponwid | BIGINT IDENTITY | No | Surrogate warehouse key for the guest coupon record |
| guestcouponid | VARCHAR(36) | Yes | Unique identifier (GUID) for the guest coupon instance |
| userid | VARCHAR(36) | Yes | Unique identifier (GUID) of the guest/user who received the coupon |
| discountid | VARCHAR(36) | Yes | Unique identifier (GUID) of the associated discount |
| couponnumber | INTEGER | Yes | Numeric coupon number assigned to this coupon instance |
| printdate | TIMESTAMP | Yes | Timestamp when the coupon was printed/issued |
| expirydate | TIMESTAMP | Yes | Timestamp when the coupon expires |
| redemptiondt | TIMESTAMP | Yes | Timestamp when the coupon was redeemed |
| redemptionnotes | VARCHAR(1024) | Yes | Notes recorded at the time of coupon redemption |
| cashback | VARCHAR(1024) | Yes | Cashback value or description associated with the coupon |
| invoiceid | VARCHAR(36) | Yes | Unique identifier (GUID) of the invoice where the coupon was redeemed |
| couponruleid | VARCHAR(36) | Yes | Unique identifier (GUID) of the coupon rule governing this coupon |
| baseinvoiceid | VARCHAR(36) | Yes | Unique identifier (GUID) of the base/originating invoice |
| campaignid | VARCHAR(36) | Yes | Unique identifier (GUID) of the campaign this coupon belongs to |
| void | INTEGER | Yes | Indicates whether the record has been voided/soft-deleted |
| skiprereq | INTEGER | Yes | Flag indicating whether prerequisite checks are skipped |
| redeemedbyall | INTEGER | Yes | Flag indicating whether the coupon was redeemed across all applicable contexts |
| couponupdatedby | VARCHAR(36) | Yes | Unique identifier (GUID) of the user who last updated the coupon |
| couponupdatedon | TIMESTAMP | Yes | Timestamp when the coupon was last updated |
| centerid | VARCHAR(36) | Yes | Unique identifier (GUID) of the center where the coupon applies |
Note: All dimension tables also include standard ETL metadata columns (
podname,organizationid,groupid,etlLastUpdatedOn,etlLastUpdatedBy) which are omitted from this reference for brevity.
Primary Key
None
Foreign Keys
| Column | References |
|---|---|
| userid | a user/guest entity in the source system |
| discountid | a discount entity in the source system |
| invoiceid | an invoice entity in the source system |
| couponruleid | a coupon rule entity in the source system |
| baseinvoiceid | a base invoice entity in the source system |
| campaignid | a campaign entity in the source system |
| centerid | a center entity in the source system |
| organizationid | an organization entity in the source system |
Enumerator Values
| Column | Values |
|---|---|
| void | 0 = Active, 1 = Voided |
| skiprereq | 0 = Enforce Prerequisites 1 = Skip Prerequisites |
| redeemedbyall | 0 = Not Redeemed by All 1 = Redeemed by All |
Was this article helpful?
Your feedback helps us improve our documentation.