ResytechResytech Docs
Workflows & Automation

Configure Workflow Triggers

Complete reference for every trigger event, condition type, condition operator, and action available in the Resytech workflow builder.

This guide is a comprehensive reference for every component you can use when building a workflow. It covers trigger events, condition types and operators, and all available actions with their configuration options.

Trigger events

The event node defines when a workflow fires. Select one of the following event types:

Event typeLabelFires when
booking_createdBooking CreatedA new booking is submitted (any status except Draft).
booking_confirmedBooking ConfirmedA booking's status changes to Confirmed. This is derived from booking_status_changed events where the new status is "Confirmed".
booking_canceledBooking CanceledA booking is canceled by the customer, staff, or system.
booking_rescheduledBooking RescheduledA booking's date or time is changed.
payment_receivedPayment ReceivedA payment is successfully processed for a booking.
payment_failedPayment FailedA payment attempt fails.
customer_registeredCustomer RegisteredA new customer record is created.
reminder_scheduledReminder ScheduledA reminder event is generated by the system.

Event data available in context

Each event type populates a set of variables that conditions and actions can reference:

Booking events (booking_created, booking_confirmed, booking_canceled, booking_rescheduled):

VariableTypeDescription
bookingIdGUIDThe unique identifier of the booking.
locationIdGUIDThe location where the booking was made.
customerIdGUIDThe customer who made the booking.
activityIdGUIDThe activity that was booked.
totalAmountdecimalThe grand total of the booking.
startTimedatetimeThe booking start time in UTC.
endTimedatetimeThe booking end time in UTC.
statusstringThe current booking status.

Status change events (booking_confirmed, booking_canceled) also include:

VariableTypeDescription
oldStatusstringThe previous booking status.
newStatusstringThe new booking status.
changedBystringWho triggered the change (e.g., "customer", "staff", "system").
reasonstringOptional reason for the change.

Rescheduled events also include:

VariableTypeDescription
oldStartTimedatetimeThe original start time before rescheduling.
newStartTimedatetimeThe new start time after rescheduling.
oldEndTimedatetimeThe original end time.
newEndTimedatetimeThe new end time.
rescheduledBystringWho initiated the reschedule.

Condition types

Condition nodes evaluate a property and branch the workflow based on the result. The following condition types are available:

Booking conditions

Condition typeLabelValue returned
booking_statusBooking StatusThe current status string (e.g., "Pending", "Confirmed", "Canceled").
booking_valueBooking ValueThe GrandTotal as a decimal.
booking_dateBooking DateThe booking date.
booking_timeBooking TimeThe booking start time.
booking_start_timeBooking Start TimeThe start time of the booking.
booking_end_timeBooking End TimeThe end time of the booking.
booking_equipment_countEquipment CountNumber of equipment items on the booking.
booking_has_addonsHas Add-Onstrue if any equipment on the booking has add-ons selected.

Customer conditions

Condition typeLabelValue returned
customer_typeCustomer TypeCurrently returns "individual".
customer_emailCustomer EmailThe customer's primary email address.
customer_phoneCustomer PhoneThe customer's phone number.
customer_nameCustomer NameThe customer's full name.
customer_is_newIs New Customertrue if the customer was created within the last 7 days.
customer_countCustomer CountThe calculated guest count for the booking.

Equipment conditions

Condition typeLabelValue returned
equipment_typeEquipment TypeA comma-separated list of equipment names on the booking.

Activity conditions

Condition typeLabelValue returned
activity_nameActivity NameThe name of the booked activity.
activity_typeActivity TypeOne of: equipment_rental, tour, dynamic_duration_equipment_rental, or unknown.
activity_is_equipment_rentalIs Equipment Rentaltrue if the activity type is an equipment rental or dynamic-duration rental.

Location conditions

Condition typeLabelValue returned
location_nameLocation NameThe location's display name.
location_timezoneLocation TimezoneThe IANA timezone identifier (e.g., America/New_York).

Time-based conditions

These use the location's timezone, not the server's timezone:

Condition typeLabelValue returned
time_of_dayTime of DayThe current hour (0-23) in the location's timezone.
day_of_weekDay of WeekThe day name (e.g., Monday, Saturday).
is_weekendIs Weekendtrue if today is Saturday or Sunday.

Event data conditions

Any variable name not matching the built-in types above is looked up in the event data dictionary. This lets you write conditions against custom event properties.


Condition operators

Every condition uses an operator to compare the actual value against your configured value:

OperatorLabelBehavior
equalsEqualsCase-insensitive string equality.
not_equalsDoes Not EqualCase-insensitive string inequality.
containsContainsCase-insensitive substring match.
not_containsDoes Not ContainInverse of contains.
greater_thanGreater ThanNumeric or date comparison.
less_thanLess ThanNumeric or date comparison.
greater_than_or_equalGreater Than or EqualNumeric or date comparison.
less_than_or_equalLess Than or EqualNumeric or date comparison.
starts_withStarts WithString prefix match.
ends_withEnds WithString suffix match.
is_emptyIs EmptyTrue if the value is null or empty string.
is_not_emptyIs Not EmptyTrue if the value is not null/empty.

Numeric operators parse both sides as decimals first, then try datetime parsing, and fall back to case-insensitive string comparison.


Action types

Action nodes perform work. Each action type has its own configuration options.

Send Email (send_email)

Sends a custom or template-based email.

Config fieldRequiredDescription
toYesRecipient email. Supports template variables like {{customer.email}}.
subjectConditionalEmail subject line. Required if not using a predefined template.
bodyConditionalHTML email body. Required if not using a predefined template.
templateNoA predefined template name: booking_confirmation, booking_rescheduled, refund_notification, or booking_status_alert.
templateIdNoThe UUID of a custom communication template created in the Marketing section.

When a templateId is provided, the template's subject and body are loaded from the database and variable replacement is applied. When a predefined template is used, the system generates a fully branded email using booking data.

Send SMS (send_sms)

Sends an SMS message via Twilio.

Config fieldRequiredDescription
toYesRecipient phone number. Supports template variables.
messageConditionalThe SMS body text. Required if templateId is not set.
templateIdNoUUID of an SMS communication template.
fromNumberNoOverride the sender phone number. Defaults to the company's configured Twilio number.

Send Template (send_template)

Sends a communication template (email, SMS, or both) with automatic recipient resolution.

Config fieldRequiredDescription
templateIdYesUUID of the communication template to send.
recipientTypeYesOne of: customer (uses the booking's customer email/phone), facilitator (uses the location contact), admin (uses the location contact), or custom.
customRecipientConditionalRequired when recipientType is custom. An email address or phone number. Supports template variables.

The template type (email, SMS, or both) is determined by the template's configuration in the database. For SMS, phone numbers are automatically formatted with country codes.

Send Survey Email (send_survey_email)

Sends a post-booking survey email with a unique, time-limited survey link.

This action requires no manual configuration fields -- it automatically:

  • Loads the location's survey settings and default survey.
  • Generates a cryptographically secure, single-use survey token.
  • Builds a branded email using the survey settings' subject and body with variable replacement.
  • Includes links to Yelp, Google, and TripAdvisor review pages if configured.

Update Booking (update_booking)

Modifies a field on the triggering booking.

Config fieldRequiredDescription
fieldYesThe booking field to update. Currently supports: status.
valueYesThe new value to set (e.g., Confirmed, Canceled).

Status changes are processed through the standard booking status change pipeline, which validates the transition and publishes follow-up events. The workflow system is marked as the change source to prevent re-triggering.

Add Booking Note (add_booking_note)

Adds an internal note to the booking's timeline.

Config fieldRequiredDescription
noteYesThe note text. Supports {{variable}} placeholders. The note is prefixed with [Workflow] automatically.

Create Task (create_task)

Creates a task for follow-up. (This action is currently a placeholder -- the task management system is under development.)

Config fieldRequiredDescription
titleYesTask title. Supports variable replacement.
descriptionNoTask description.
dueInHoursNoHours until the task is due. Defaults to 24.
priorityNoTask priority: low, normal, high. Defaults to normal.

Send Webhook (webhook)

Sends an HTTP request to an external URL.

Config fieldRequiredDescription
urlYesThe target URL. Supports {{variable}} placeholders.
methodNoHTTP method: GET, POST, PUT, DELETE, or PATCH. Defaults to POST.
headersNoA dictionary of HTTP headers. Values support variable replacement.
bodyNoThe request body (for POST/PUT/PATCH). Use {{eventData}} to include the full event payload as JSON.

Webhook requests have a 30-second timeout. The URL is validated against SSRF protections -- requests to localhost, private IP ranges (10.x, 172.16.x, 192.168.x), link-local addresses, and cloud metadata endpoints are blocked.

Add Tag (add_tag)

Tags the booking or customer with a label. (Under development.)

Config fieldRequiredDescription
tagYesThe tag string to apply.

Remove Tag (remove_tag)

Removes a tag from the booking or customer. (Under development.)

Config fieldRequiredDescription
tagYesThe tag string to remove.

Assign Facilitator (assign_facilitator)

Automatically assigns a facilitator (guide, instructor, operator) to the booking.

Config fieldRequiredDescription
facilitatorIdYesThe UUID of the location facilitator to assign.

The action checks for duplicate assignments and verifies that the facilitator belongs to the workflow's location before creating the assignment.

Wait / Delay (wait or delay)

Pauses the workflow for a specified duration or until a time relative to the booking.

Fixed delay:

Config fieldRequiredDescription
delayTypeNoSet to fixed (default) for a fixed duration.
durationYesThe number of time units to wait.
unitYesThe time unit: minute, hour, day, or week.

Relative delay (time-anchored to booking):

Config fieldRequiredDescription
delayTypeYesSet to relative.
referencePointYesThe anchor: booking_start, booking_end, or booking_created.
offsetHoursYesNumber of hours offset from the reference point.
offsetDirectionYesbefore or after the reference point.

Relative delays are booking-aware: if a booking is rescheduled after a relative delay is scheduled, the system automatically recalculates the delay time on the next job execution. If the recalculated time is in the past, the workflow resumes immediately.

Delays are implemented using Hangfire scheduled jobs. The workflow execution is paused and a resumption job is enqueued at the calculated time.


Template variables

Actions that support template variables use the {{variableName}} syntax. Available variables include:

  • All event data fields (e.g., {{bookingId}}, {{totalAmount}}, {{status}}).
  • Customer fields (via TemplateVariableReplacer): {{customer.name}}, {{customer.email}}, etc.
  • Booking fields: {{booking.confirmationCode}}, {{booking.status}}, etc.
  • Activity and location fields from the template context.
  • The special {{eventData}} placeholder (webhook action only) serializes the entire event payload as JSON.

On this page