Overview
The Booking Confirmed trigger starts a workflow when a booking is confirmed for the first time in your CaptainBook system.
When It Triggers
A booking transitions to confirmed status
The booking is confirmed for the first time (not on subsequent updates)
Use Cases
Send confirmation emails to customers
Notify staff about new bookings
Create follow-up tasks
Update external systems
Send booking details to partners
Generate invoices or receipts
Configuration
This trigger requires no additional configuration. It automatically triggers when any booking is confirmed in your system.
Available Data
When this trigger fires, it provides a booking object with comprehensive booking information.
Booking Object Structure
The booking object includes:
Basic Information
id- Booking IDquantity- Number of items/guests bookedcreated_at- When the booking was createdconfirmed_at- When the booking was confirmed
Pricing Information
direct_price- Direct pricegross_price- Gross pricenet_price- Net priceretail_price- Retail pricecommission- Commission amounttip- Tip amountapplication_fee- Application fee
Relationships
customer_id- Customer IDcustomer_type- Customer typeprovider_id- Provider IDreseller_id- Reseller ID
Status & Notes
checked_in- Check-in statusthank_you_note- Thank you noteprivate_notes- Private notescomments- Public commentsis_refundable- Whether booking is refundable
Cancellation Information
cancelled_at- Cancellation date (if cancelled)cancelled_reason- Cancellation reasoncancelled_reason_details- Detailed cancellation reason
Accessing Booking Data
In your workflow actions, you can access booking data using variables:
{booking.id}
{booking.customer_id}
{booking.gross_price}
{booking.confirmed_at}Example Workflows
1. Send Confirmation Email
Workflow Steps:
Trigger: Booking Confirmed
Action: Send Notification
To:
{booking.customer.email}Subject: "Booking Confirmed - {booking.product.title}"
Body: Include booking details
2. Notify Team
Workflow Steps:
Trigger: Booking Confirmed
Condition: If
{booking.gross_price}greater than 1000Action (True): Send Notification to team
Action (False): Log booking
3. Create Follow-up Task
Workflow Steps:
Trigger: Booking Confirmed
Action: Delay (24 hours)
Action: Send Notification (follow-up email)
Testing
When testing this trigger:
Select a confirmed booking from your system
The workflow will use that booking's data
Review execution logs to see the booking data used
Test Data
The trigger provides access to the last 20 confirmed bookings for testing purposes.
Best Practices
Filter when needed - Use conditions to only process relevant bookings
Handle edge cases - Check if customer email exists before sending
Use delays - Add delays before follow-up actions
Log important data - Store booking IDs for tracking
