Overview
The Resource Detached from Booking trigger starts a workflow when a resource (guide, asset, or equipment) is detached from a booking in your CaptainBook system.
When It Triggers
A resource is detached from a booking
Works for all resource types (guides, assets, equipment)
Triggers immediately upon detachment
Use Cases
Notify resource users about removal
Update external systems with resource removals
Release resource availability
Update availability calendars
Send notifications to customers about changes
Track resource utilization changes
Create reassignment workflows
Log resource detachment for audit purposes
Configuration
This trigger requires no additional configuration. It automatically triggers when any resource is detached from 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 detached fromresource_id- The ID of the resource that was detached
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 Detached from Booking
Action: Send Notification
To: Resource user email (query using
{resource_id})Subject: "Booking Assignment Removed"
Body: Include booking details and reason for removal
2. Release Availability
Workflow Steps:
Trigger: Resource Detached from Booking
Action: Update Availability
Release resource slots for the booking period
Make resource available for other bookings
3. Customer Notification
Workflow Steps:
Trigger: Resource Detached from Booking
Action: Send Notification
To: Booking customer email (query using
{booking_id})Subject: "Booking Update - Resource Change"
Body: Inform customer about resource change and next steps
4. Audit Logging
Workflow Steps:
Trigger: Resource Detached from Booking
Action: Send Webhook
Include
{booking_id}and{resource_id}in payloadLog detachment to external audit system
Action: Update Booking (add note about resource removal)
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
Notify promptly - Send notifications immediately after detachment
Release availability - Update resource availability calendars
Update customers - Inform customers about resource changes
Maintain audit trail - Log all resource detachments
Handle reassignments - Consider workflows for automatic reassignment
Sync external systems - Update external calendars and systems
