Overview
The Resource Attached to Booking trigger starts a workflow when a resource (guide, asset, or equipment) is attached to a booking in your CaptainBook system.
When It Triggers
A resource is attached to a booking
Works for all resource types (guides, assets, equipment)
Triggers immediately upon attachment
Use Cases
Send notifications to resource users
Update external systems with resource assignments
Notify customers about their assigned guide or equipment
Track resource utilization
Generate resource assignment reports
Update external availability calendars
Send welcome messages to resources
Create task assignments for resources
Configuration
This trigger requires no additional configuration. It automatically triggers when any resource is attached to a booking.
Available Data
When this trigger fires, it provides booking_id and resource_id that you can use to access booking and resource information in your workflow actions.
Context Variables
The trigger provides the following context variables:
booking_id- The ID of the booking that the resource was attached toresource_id- The ID of the resource that was attached
Accessing Context Data
{booking_id}
{resource_id}Using Context in Actions
You can use these IDs to:
Query booking details using
{booking_id}Query resource details using
{resource_id}Access booking customer information
Access resource user information
Get resource type and category
Example Workflows
1. Notify Resource User
Workflow Steps:
Trigger: Resource Attached to Booking
Action: Send Notification
To: Resource user email (query using
{resource_id})Subject: "New Booking Assignment"
Body: Include booking details and customer information
2. Update External System
Workflow Steps:
Trigger: Resource Attached to Booking
Action: Send Webhook
Include
{booking_id}and{resource_id}in payloadNotify external system of resource assignment
3. Customer Notification
Workflow Steps:
Trigger: Resource Attached to Booking
Action: Send Notification
To: Booking customer email (query using
{booking_id})Subject: "Your Guide/Equipment Assignment"
Body: Include resource details and contact information
4. Resource Assignment Tracking
Workflow Steps:
Trigger: Resource Attached to Booking
Condition: If resource type equals "guide"
Action (True): Update Booking (add note about guide assignment)
Action: Log to external analytics system
Testing
When testing this trigger:
Select a booking that has resources attached
Select a specific resource from that booking
The workflow will use that booking and resource data
Review execution logs to verify resource and booking information
Test Data
The trigger provides access to the last 20 bookings with resources attached for testing. You can select any booking and then choose from its attached resources.
Best Practices
Verify resource availability - Check resource schedule before assignment
Notify promptly - Send notifications immediately after attachment
Track assignments - Log resource assignments for analytics
Update calendars - Sync resource assignments with external calendars
Handle conflicts - Check for scheduling conflicts before assignment
Maintain records - Keep audit trail of resource assignments
