Guest Data Model

Download the Guest swagger file

Table of Contents

GuestProfile

A GuestProfile encapsulates information about a guest that could potentially visit a business on the Tock platform. GuestProfiles are created when the guest or the business makes a booking on Tock, are added directly through the Tock Dashboard, or were created as part of an import from another system. Guests are shared amongst all of the businesses in a business group.

FieldTypeDescription
id uint64

A unique identifier for the guest. This identifier can change with edits to the guest by the business and should not be stored. For identifiers that do not change with edits, see Patron.id instead.

patron Patron

The Tock account that corresponds to this guest profile. This will be a subset of the full guest profile and the contents are owned and only changeable by the logged-in user.

nickName string

A nickname given to this user given by the business.

company string

If known, the company where this guest is employed.

jobTitle string

If known, the job title at the company where this guest is employed.

spouseName string

If known, the name of the guest's spouse.

spouse Patron

If known, the connected Tock account for this guest's spouse linked to this guest by the business or guest.

address Address

If known, the address assigned to this guest.

phone Phone[]

If known, a list of phone numbers for contacting the guest.

day Day[]

If known, a list of special days that have been recorded for this guest.

link Link[]

External links to public information about this guest found on the Internet.

patronProfileDietaryRestriction string[]

Notes that the guest has given to all businesses on Tock indicating their dietary restrictions. This information cannot be edited by the business.

patronProfileHospitalityPreference string[]

Notes the guest has given to all businesses on Tock indicating preferences that the guest would like the business to know about. This information cannot be edited by the business.

patronProfileAversions string

Notes the guest has given to all businesses on Tock indicating aversions that the business should avoid. This information cannot be edited by the business.

businessGroupId uint64

A unique identifier for the business group. Used internally by Tock.

nextGuestProfileId uint64

If this guest profile has been edited in the past, this will be the identifier for the guest profile that contains the edit. If this value is not set, this guest profile information is the most up-to-date for the business group.

importedProfile ImportedGuestProfile

businessGuestProfile BusinessGuestProfile[]

Some businesses in the same business group prefer to have their own notes and tags which are not automatically shared with the others in the group. This list contains the notes and tags for each business in the business group for this guest.

businessGroupGuestProfile BusinessGroupGuestProfile

The notes and tags for the guest that are shared with all businesses in a business group.

tag string[]

If tags are shared amongst all businesses in the business group, this will be the tags applied to the guest for the business group.

attribute ExternalIntegrationAttribute[]

If the business is synchronizing guest information from another system other than Tock, this field will contain the unique identifiers and club memberships for this guest in the external system.

canEdit bool

If the guest has never logged in or verified their Tock account, this value will be set to true.

isArchived bool

If there exists newer changes to this guest (when nextGuestProfileId is present), this value will be set to true.

updatedBy Patron

The user who made the last update to this guest profile.

loyaltyProgramCardNumber string

If the guest has made a successful login to a loyalty program integrated and enabled in the Tock Dashboard, this will be the card number for the guest's account in the loyalty program.

loyaltyProgramMembershipLevel string

If the guest has made a successful login to a loyalty program integrated and enabled in the Tock Dashboard and the guest has a membership level specified with their account, this will be the name of the membership level.

loyaltyProgramAccountId string

If the guest has an account tied to a loyalty program integrated and enabled in the Tock Dashboard this value will be the unique account identifier within the loyalty program.

optInSource OptInSource

Whether or not the guest has opted into email marketing from the business or Tock, the value of this field indicates the place where the guest made their choice.

optIn bool

Whether the guest has explicitly opted into email marketing from the business or Tock.

versionId uint64

This value indicates the number of edits that have been made to this guest's profile for this business in Tock.

createdAtTimestamp uint64

The timestamp for when the guest profile was created, in milliseconds since the Unix Epoch.

updatedAtTimestamp uint64

The timestamp for this edit to the guest profile, in milliseconds since the Unix Epoch. If this is the first edit, it will be the same as createdAtTimestamp.

isTockVerified bool

BusinessGuestProfile

The portion of this guest profile which is specific to a business in the business group.

FieldTypeDescription
business Business

The details of the business in the business group.

note AuditedNote[]

A list of notes attached to the guest for just this business and not shared with every business in the business group.

tag string[]

A list of tags attached to this guest for just this business and not shared with every business in the business group.

BusinessGroupGuestProfile

The portion of this guest profile that is attached at the business group level and shared with all businesses.

FieldTypeDescription
note AuditedNote[]

The list of notes attached to this guest for the business group that is shared with all businesses.

tag string[]

The list of tags attached to this guest for the business group that is shared with all businesses.

ImportedGuestProfile

FieldTypeDescription
link Link[]

Address

An object that summarizes an address. Can be partially filled in with just the pieces that have been supplied by the guest, by changing the guest information in the Tock Dashboard, or through an import of the guest information from another service.

FieldTypeDescription
address1 string

address2 string

city string

state string

country string

zipCode string

Phone

An object that summarizes a phone number for the guest.

FieldTypeDescription
type PhoneType

The use of this phone as specified by the guest.

phone string

The text of the phone number without the phone country code.

phoneCountryCode string

If known, the country code for the phone number that includes both the numerical and ISO country codes (e.g. "+1 US").

Day

An object that summarizes a special day for the guest.

FieldTypeDescription
type DayType

The type of special day as specified by the guest.

day uint32

The numerical day within the month.

month uint32

The numerical month within the year.

year uint32

If specified, the year of the day.

An object that summarizes a public link that exists for the guest in a few online services.

FieldTypeDescription
type LinkType

The site that hosts the link, or whether it is a link to a public image.

link string

The URL to the public link connected to this guest.

ExternalIntegrationAttribute

Tock supports synchronizing guest information with other external systems. This object summarizes information that is helpful for linking the guest to the record in the external system, such as account identifiers or club memberships. The variety of attributes is different depending on which external system Tock is synchronizing to.

FieldTypeDescription
businessId uint64

A unique identifier for the business. Used internally by Tock.

patronId uint64

A unique identifier for the patron that will be the same as Patron.id. Used internally by Tock.

type string

The name of the external system this attribute originated from.

attribute string

The name of the attribute assigned to this guest in the external system.

stringValue string

If the attribute value is a string type, this field will be the resulting value of the attribute.

intValue string

If the attribute value is a number type, this field will be the resulting value of the attribute.

AuditedNote

An object that encapsulates the text of a note for a guest along with the type of note and who made the modification.

FieldTypeDescription
note string

The text of the note.

lastUpdatedBy Patron

The account in Tock that made the last update to this note, whether that be the guest or someone using the Tock Dashboard.

lastUpdatedAtTimestampMs uint64

The timestamp when the note was created or updated, in milliseconds since the Unix Epoch.

previousVersionId uint64

A unique identifier for the update or creation of the note. Used internally by Tock.

noteType NoteType

The type of note this represents.

GuestProfileUpsertRequest

FieldTypeDescription
patron Patron

tag string[]

removedTag string[]

DayType

NameDescription
BIRTHDAY

OTHER_BIRTHDAY

ANNIVERSARY

PARTNER_BIRTHDAY

LinkType

NameDescription
IMAGE

A link to a public image of the guest whether given by the guest, attached to the guest's Facebook account, or found by Tock through Gravatar.

TWITTER

A link to the guest's account on Twitter.

FACEBOOK

A link to the guest's account on Facebook.

LINKEDIN

A link to the guest's account on LinkedIn.

INSTAGRAM

A link to the guest's account on Instagram.

IMAGE_BACKUP

A backup image stored by Tock to be used as a fallback.

NoteType

The notes that can be attached to a guest have two varieties.

NameDescription
GENERAL

A note not related to anything dietary.

DIETARY

A note related to dietary restrictions of the guest.

OptInSource

NameDescription
PURCHASE

The guest agreed to receiving email marketing after completing a checkout on Tock for the business.

WAITLIST

The guest agreed to receiving email marketing after putting themselves on a waitlist for the business.

NEWSLETTER

The guest agreed to receiving an email marketing newsletter from Tock by clicking directly on a link from https://exploretock.com without going through the checkout or waitlist forms.

IMPORTED

The guest agreed to receiving email marking in an external system and was imported into Tock when joining the platform.

NO_OPT_IN

The guest has agreed to not receiving email marking in an external system and was imported into Tock when joining the platform.

OPTED_OUT

The guest has agreed to not receiving email marketing directly through any form on https://exploretock.com

PhoneType

NameDescription
MOBILE

HOME

WORK

PAGER

FAX

HOTEL

OTHER

Business

A business encapsulates a small subset of information about a particular business that has their own Tock Dashboard.

FieldTypeDescription
id uint64

A unique identifier for the business. Used internally by Tock.

name string

The name given to the business in the Tock Dashboard.

domainName string

The unique section of exploretock.com that is devoted to showing inventory and allowing guests to book reservations. The top-level URL will be of the form https://exploretock.com/{domainName}/.

locale string

The locale that the business presents in using the ISO-3166 country code and ISO-639 language code (e.g. en-us for US English, es-es for Spain Spanish).

currencyCode string

The ISO 4217 three letter currency code that the business presents on exploretock.coms (e.g. "USD" for US Dollar, "GBP" for Great Britain Pound).

timeZone string

The time zone in which the business operates in the IANA named format (e.g. "America/Chicago").

Patron

A patron represents a user within Tock. These users can be guests that have previously visited the business, or concierges allowed to book on behalf of other patrons, or imported guests from other reservation systems. No two patrons can have the same email address. A patron does not necessarily have to have an email address if they are created in the Tock Dashboard or imported from another reservation system.

FieldTypeDescription
id uint64

A unique identifier assigned to the patron. Used internally by Tock.

email string

The email address of the patron. No two patrons can have the same email address, but an email address is not required of all patrons.

firstName string

If known, the first name of the patron.

lastName string

If known, the last name of the patron.

phone string

If known, the phone number of the patron without the country code.

phoneCountryCode string

If known, the country code for the patron using the prefix code and the ISO 3166-1 alpha-2 country code (e.g. "+1 US").

zipCode string

If known, the zip code given by the patron in their Tock profile.

imageUrl string

If known, a URL to a public image of the patron.

isoCountryCode string

If known, the ISO 3166-1 alpha-2 country code where the patron lives.

loyaltyProgramCardNumber string

If known and if the business participates in an integrated loyalty program, this field contains the card number given to the patron by the business.

loyaltyProgramAccountId string

If known and if the business participates in an integrated loyalty program, this field contains the account identifier given to the patron by the business.

Scalar Value Types

.proto TypeNotesJSONC++JavaPythonGoC#PHPRuby
double number double double float float64 double float Float
float number float float float float32 float float Float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. number int32 int int int32 int integer Bignum or Fixnum (as required)
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. number int64 long int/long int64 long integer/string Bignum
uint32 Uses variable-length encoding. number uint32 int int/long uint32 uint integer Bignum or Fixnum (as required)
uint64 Uses variable-length encoding. number uint64 long int/long uint64 ulong integer/string Bignum or Fixnum (as required)
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. number int32 int int int32 int integer Bignum or Fixnum (as required)
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. number int64 long int/long int64 long integer/string Bignum
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. number uint32 int int uint32 uint integer Bignum or Fixnum (as required)
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. number uint64 long int/long uint64 ulong integer/string Bignum
sfixed32 Always four bytes. number int32 int int int32 int integer Bignum or Fixnum (as required)
sfixed64 Always eight bytes. number int64 long int/long int64 long integer/string Bignum
bool boolean bool boolean boolean bool bool boolean TrueClass/FalseClass
string A string must always contain UTF-8 encoded or 7-bit ASCII text. string string String str/unicode string string string String (UTF-8)
bytes May contain any arbitrary sequence of bytes. string string ByteString str []byte ByteString string String (ASCII-8BIT)