Guest Dimension Table
ZTZenoti Docs Team Updated April 10, 2026 3 min readGuide
Dimension table storing guest (customer) profile information including demographics, contact details, communication preferences, and referral data. Populated from the guest/user master data, providing a guest-specific view of the user base.
Columns
| Column Name | Data Type | Nullable | Description |
|---|---|---|---|
| guestwid | BIGINT IDENTITY | No | Surrogate warehouse key for the guest dimension, auto-generated |
| userid | VARCHAR(36) | Yes | Natural unique identifier (GUID) of the guest from the source system |
| firstname | VARCHAR(160) | Yes | Guest's first name |
| lastname | VARCHAR(256) | Yes | Guest's last name |
| middlename | VARCHAR(128) | Yes | Guest's middle name |
| address1 | VARCHAR(256) | Yes | Primary address line |
| address2 | VARCHAR(256) | Yes | Secondary address line |
| city | VARCHAR(128) | Yes | City of the guest's address |
| stateother | VARCHAR(128) | Yes | Free-text state field when state is not in the standard list |
| zipcode | VARCHAR(32) | Yes | Postal/ZIP code |
| usertypeid | VARCHAR(36) | Yes | Identifier for the user type classification |
| usertypename | VARCHAR(128) | Yes | Display name of the user type |
| creationdt | TIMESTAMP | Yes | Timestamp when the guest record was created in the source system |
| centerid | VARCHAR(36) | Yes | Identifier of the center the guest is associated with |
| VARCHAR(512) | Yes | Guest's email address | |
| homephone | VARCHAR(64) | Yes | Home phone number |
| mobilephone | VARCHAR(64) | Yes | Mobile phone number |
| workphone | VARCHAR(64) | Yes | Work phone number |
| username | VARCHAR(512) | Yes | Guest's login username |
| usercode | VARCHAR(128) | Yes | Unique user code assigned in the source system |
| lastlogin | TIMESTAMP | Yes | Timestamp of the guest's most recent login |
| gender | INTEGER | Yes | Gender code of the guest (enumerated integer value) |
| dob | TIMESTAMP | Yes | Date of birth of the guest |
| preferredtherapist | VARCHAR(36) | Yes | Identifier of the guest's preferred therapist |
| preferredroom | VARCHAR(36) | Yes | Identifier of the guest's preferred room |
| otherpreferences | VARCHAR(65535) | Yes | Additional guest preferences stored as text/JSON |
| referralsourceid | VARCHAR(36) | Yes | Identifier of the referral source through which the guest was acquired |
| roomno | VARCHAR(80) | Yes | Room number (relevant for hotel/spa guests) |
| referredby | VARCHAR(36) | Yes | Identifier of the user who referred this guest |
| anniversarydate | TIMESTAMP | Yes | Anniversary date for the guest |
| preferedcenerid | VARCHAR(36) | Yes | Identifier of the guest's preferred center |
| registrationsource | INTEGER | Yes | Enumerated value indicating how the guest registered |
| customerapplogin | INTEGER | Yes | Flag/count indicating customer app login activity |
| culturecode | VARCHAR(4000) | Yes | Culture/locale code (e.g., en-US) |
| culturedispname | VARCHAR(4000) | Yes | Display name for the culture/locale |
| langcode | VARCHAR(4000) | Yes | Language code preference |
| langdispname | VARCHAR(4000) | Yes | Display name for the preferred language |
| mobilecountrydname | VARCHAR(4000) | Yes | Full country name for the mobile phone number |
| mobilecountrysname | VARCHAR(4000) | Yes | Short country name for the mobile phone number |
| workcountrydname | VARCHAR(4000) | Yes | Full country name for the work phone number |
| workcountrysname | VARCHAR(4000) | Yes | Short country name for the work phone number |
| homecountrydname | VARCHAR(4000) | Yes | Full country name for the home phone number |
| homecountrysname | VARCHAR(4000) | Yes | Short country name for the home phone number |
| statedispname | VARCHAR(4000) | Yes | Display name of the guest's state/province |
| stateshortname | VARCHAR(4000) | Yes | Short/abbreviated name of the guest's state/province |
| statecode | VARCHAR(40) | Yes | State/province code for the guest's address |
| countrydname | VARCHAR(4000) | Yes | Full display name of the guest's country |
| countrysname | VARCHAR(4000) | Yes | Short/abbreviated name of the guest's country |
| receivetransactionalsms | BOOLEAN | Yes | Whether the guest has opted in to receive transactional SMS |
| receivemarketingsms | BOOLEAN | Yes | Whether the guest has opted in to receive marketing SMS |
| userpk | NUMERIC(19,0) | Yes | Primary key of the user from the source transactional system |
| unsubscribetotransactionalemail | BOOLEAN | Yes | Whether the guest has unsubscribed from transactional emails |
| unsubscribetomarketingemail | BOOLEAN | Yes | Whether the guest has unsubscribed from marketing emails |
| passwordupdatedon | TIMESTAMP | Yes | Timestamp when the guest's password was last updated |
| receivetransactionalemail | BOOLEAN | Yes | Whether the guest has opted in to receive transactional emails |
| receivemarketingemail | BOOLEAN | Yes | Whether the guest has opted in to receive marketing emails |
| acceptedtandc | INTEGER | Yes | Flag indicating whether the guest accepted terms and conditions |
| nationalityfk | INTEGER | Yes | Foreign key reference to the nationality lookup |
| dob_incompleteyear | VARCHAR(20) | Yes | Date of birth with incomplete year information (e.g., month-day only) |
| void | BOOLEAN | Yes | Soft-delete flag; TRUE indicates the record is voided/inactive |
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
guestwid
Foreign Keys
| Column | References |
|---|---|
| centerid | Bi_DimCenter |
| organizationid | Bi_DimCenter |
| userid | Bi_DimUser |
| preferredtherapist | a user/employee ID |
| referredby | another user ID |
| preferedcenerid | a center ID |
Enumerator Values
| Column | Values |
|---|---|
| gender | -1 = Not Specified 0 = Female 1 = Male 3 = Other/Third Gender 4 = Multiple |
| registrationsource | 0 = Store 1 = Mobile 2 = Web 3 = Imports 4 = Offline 6 = Employee App 7 = Manager App 9 = BiometricApp 10 = SupportLogin |
| acceptedtandc | 0 = Not Accepted, 1 = Accepted |
| customerapplogin | 0 = No Login, 1 = Has Logged In |
Was this article helpful?
Your feedback helps us improve our documentation.