Skip to main content

Resource Detached from Booking Trigger

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.

Jerome Bajou avatar
Written by Jerome Bajou
Updated over a week ago

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 from

  • resource_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:

  1. Trigger: Resource Detached from Booking

  2. 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:

  1. Trigger: Resource Detached from Booking

  2. Action: Update Availability

    • Release resource slots for the booking period

    • Make resource available for other bookings

3. Customer Notification

Workflow Steps:

  1. Trigger: Resource Detached from Booking

  2. 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:

  1. Trigger: Resource Detached from Booking

  2. Action: Send Webhook

    • Include {booking_id} and {resource_id} in payload

    • Log detachment to external audit system

  3. Action: Update Booking (add note about resource removal)


Testing

When testing this trigger:

  1. Select a booking that has resources attached

  2. Select a specific resource from that booking

  3. The workflow will use that booking and resource data

  4. 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

  1. Notify promptly - Send notifications immediately after detachment

  2. Release availability - Update resource availability calendars

  3. Update customers - Inform customers about resource changes

  4. Maintain audit trail - Log all resource detachments

  5. Handle reassignments - Consider workflows for automatic reassignment

  6. Sync external systems - Update external calendars and systems


Related Documentation

Did this answer your question?