Campaign Discounts Data Model
The Zenoti system allows multiple discounts to be applied for each line item (invoice item id) within an invoice. The total discount for an invoice item id is captured in the 'Sales' data source, but it is NOT split out by the various campaigns applied. This data source goes a step further and breaks out the discount by campaign for each invoice item id. It ONLY brings in invoice item ids where a discount has been applied (through a campaign, coupon, or voucher). Other invoice item ids are NOT brought in. Additionally, manual discounts are NOT brought in to this data source.
Example Use-Cases
Total discount by campaign
Total discount in a given time period (apart from manual discounts)
Granularity of the Data
At the most granular level, data is organized at the invoice item id and campaign level. This means that every line item in the invoice is populated in a separate row. Furthermore, if multiple campaigns are applied on the same invoice item id, the rows get further split out to accommodate this granularity. The examples below show how data is populated when discounts are generated through various means- like stand alone campaigns, vouchers, and coupons.
![]() |
Group | Description | Field | Definition | Examples/Notes | Data Type |
---|---|---|---|---|---|
Center, Zone, Organization | An organization can be divided into zones, which can be further divided into centers. Here, we refer to the center where the invoice is generated. | organization name | The formal name of the organization where the invoice is generated. | 'Massage Spa Express' is the formal name of an organization. | varchar(256) |
Center, Zone, Organization | An organization can be divided into zones, which can be further divided into centers. Here, we refer to the center where the invoice is generated. | organization account name | The domain name of the organization in Zenoti. This is the organization where the invoice is generated. | If the URL you use to sign in to Zenoti is 'https://massagespa.zenoti.com', then "massagespa" is your account name. The formal name and domain name may be different. | |
Center, Zone, Organization | An organization can be divided into zones, which can be further divided into centers. Here, we refer to the center where the invoice is generated. | center name | The center where the invoice is generated. | ||
Center, Zone, Organization | An organization can be divided into zones, which can be further divided into centers. Here, we refer to the center where the invoice is generated. | zone name | The zone to which the center belongs. | ||
Center, Zone, Organization | An organization can be divided into zones, which can be further divided into centers. Here, we refer to the center where the invoice is generated. | center city | The city where the center is located. | ||
Center, Zone, Organization | An organization can be divided into zones, which can be further divided into centers. Here, we refer to the center where the invoice is generated. | center state name | The state where the center is located. | varchar(128) | |
Center, Zone, Organization | An organization can be divided into zones, which can be further divided into centers. Here, we refer to the center where the invoice is generated. | country name | The country where the center is located. | ||
Center, Zone, Organization | An organization can be divided into zones, which can be further divided into centers. Here, we refer to the center where the invoice is generated. | center zip | The ZIP code in which the center is located. | ||
Center, Zone, Organization | An organization can be divided into zones, which can be further divided into centers. Here, we refer to the center where the invoice is generated. | minutes to add | The number of minutes that need to be added to UTC time to get the current time at the center. Timestamps that are generated by Tableau are in UTC [E.g. if you use filters such as Today, Tomorrow, etc.], hence we require this field to arrive at the center time. This is not needed for timestamps that are in the datasource directly; they are already in the center time zone. | int4 | |
Center, Zone, Organization | An organization can be divided into zones, which can be further divided into centers. Here, we refer to the center where the invoice is generated. | operating center | A flag that indicates if the center is operational. - True: Operational - False: Not operational | boolean | |
Center, Zone, Organization | An organization can be divided into zones, which can be further divided into centers. Here, we refer to the center where the invoice is generated. | center wid | A unique identifier, in Analytics, for the center. It does not exist in the core system. | bigint | |
Guest | These fields detail the attributes of the guest who purchased the item in the invoice. | user id | A unique identifier for the guest who purchased the item on the invoice. This is a non-blank value that gets populated for every guest. | varchar(36) | |
Guest | These fields detail the attributes of the guest who purchased the item in the invoice. | user first name | First name of the guest who purchased the item in the invoice. | varchar(160) | |
Guest | These fields detail the attributes of the guest who purchased the item in the invoice. | user middle name | Middle name of the guest who purchased the item in the invoice. | varchar(128) | |
Guest | These fields detail the attributes of the guest who purchased the item in the invoice. | user last name | Last name of the guest who purchased the item in the invoice. | varchar(256) | |
Discount | These fields detail the attributes of the guest who purchased the item in the invoice. | invoice id | A unique identifier for the invoice. It is unique within the organization. | varchar(36) | |
Discount | Invoice number that helps in identifying and tracking the invoice. | InvoiceNo | Invoice number that helps in identifying and tracking the invoice. | ||
Discount | These fields detail the attributes of the guest who purchased the item in the invoice. | invoice item id | A unique identifier for each line item within the invoice. | ||
Discount | These fields detail the attributes of the guest who purchased the item in the invoice. | campaign name | If applicable, this is the campaign name corresponding to the discount. | varchar(256) | |
Discount | These fields detail the attributes of the guest who purchased the item in the invoice. | coupon number | If applicable, this is the coupon number corresponding to the discount. | BIGINT | |
Discount | These fields detail the attributes of the guest who purchased the item in the invoice. | voucher code | If applicable, this is the voucher code corresponding to the discount. | varchar(256) | |
Discount | These fields detail the attributes of the guest who purchased the item in the invoice. | expiry date | Expiry date of the corresponding campaign, coupon, or voucher. | date | |
Discount | These fields detail the attributes of the guest who purchased the item in the invoice. | discount value | The value of the discount for the corresponding campaign, coupon, or voucher. Refer to the example above. | float | |
Discount | These fields detail the attributes of the guest who purchased the item in the invoice. | total discount value | The total value of the discount for the corresponding invoice item id. This is the sum of the applicable discounts for that invoice item id. Refer to the example above. | ||
Discount | These fields detail the attributes of the guest who purchased the item in the invoice. | appfactor | The ratio between discount value and total discount value. Refer to the example above. | numeric(10,2) |