Skip to main content

Event types

Services or event-type are the fundamental concepts of TimeTime. An event-type is used to represent a service that can be booked. For example, a hair salon may have two types of events: "Haircut" and "Wash and Blow-dry".

Schema

FieldTypeDescription
idStringA unique uid for the event type.
nameStringThe name of the event type. This will be public facing
descriptionStringAn extra string containing information about the event type
durationDurationAn ISO string indicating the duration of the events for this event type
stepDurationAn ISO string indicating when the service allows to start
ownerStringThe id of owner of the event type.
imageUrlStringA URL to an image in png or jpg format that is used in the UI to illustrate the service.
unitsLabelStringOnly activated when the service has units. Indicates to the UI what to display in the selector.
themeString The color scheme that will be used in the public facing pages.
questionsArray<Question>An array of questions that will be displayed to the booker
resourceRulesObjectAn object explaining the resources that are required for this event type.
resourceRules.linkedResourcesArray<{id: String}>When linked resources are configured, the availability of those will be taken into account for the event type availability check.
enabledBooleanWhen false the event type will never be available for bookings.
workflowsArray<{id: String}>An array of workflows that related to this event type.

Questions

It is common for services to have associated questions. For example, a restaurant may want to know about customer allergies. Questions are defined in the questions attribute of the service.

Questions are an array of question objects, which in turn have different subtypes: EmailQuestion, LocationQuestion, PasswordQuestion, PhoneQuestion, TextQuestion.

Schema

All questions have id, label, and required as common attributes. The LocationQuestion field has an additional attribute AllowedOptions that defines which options are available to the user.

FieldTypeDescription
idStringA unique uid for the question.
labelStringThe label that will be displayed to the booked.
requiredBooleanWhen true answering the question is required to make a booking.
typeEnumThe type of the question.
EmailQuestion, LocationQuestion, PasswordQuestion, TextQuestion

Question types

Email

Questions of type email allow the client to ask for their email.

Example: Email question type
questions: [
{
id: "b10bb986-2732-41d0-bf19-e0700eed2158"
label: "write your email here",
required: true,
type: "EmailQuestion",
},
];
Location

Location questions allow the client to enter a location.

Example: Location question type
questions: [
{
id: "b10bb986-2732-41d0-bf19-e0700eed2158"
label: "Write your desired location",
required: true,
type: "LocationQuestion",
allowedOptions: [""],
},
];
Password

Questions of type password allow the client to ask for their password.

Example: Password question type
questions: [
{
id: "b10bb986-2732-41d0-bf19-e0700eed2158"
label: "Write a passwrord",
required: true,
type: "PasswordQuestion",
},
];

Phone

Questions of type phone allow the client to ask for their phone number.

Example: Phone question type
questions: [
{
id: "b10bb986-2732-41d0-bf19-e0700eed2158"
label: "Write your phone number",
required: true,
type: "PhoneQuestion",
},
];

Text

Questions of type text allow the client to enter a generic text before making the reservation.

Example: Text question type
questions: [
{
id: "b10bb986-2732-41d0-bf19-e0700eed2158"
label: "Write your food preferences",
required: true,
type: "TextQuestion",
},
];

Availability Rules

An event type can have its own availability rules or combine resources to create a meta-availability.

Normally, for simple event types, it will be sufficient to define the availability within the event type itself. For example, to book a meeting room, it will be enough to indicate a minimum notice period and specific time slots.

For more complex cases, availability can be generated from linkedResources where the availability of different entities is combined to create more complex availability rules.

For instance, a tennis class, where a court and a coach are required. These will be modeled as linkedResources and will have their own availability rules.

Check the availability rules section. to see all the rules available.