Skip to main content

Resource Attached to Booking Trigger

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.

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

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 to

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

  1. Trigger: Resource Attached to Booking

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

  1. Trigger: Resource Attached to Booking

  2. Action: Send Webhook

    • Include {booking_id} and {resource_id} in payload

    • Notify external system of resource assignment

3. Customer Notification

Workflow Steps:

  1. Trigger: Resource Attached to Booking

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

  1. Trigger: Resource Attached to Booking

  2. Condition: If resource type equals "guide"

  3. Action (True): Update Booking (add note about guide assignment)

  4. Action: Log to external analytics system


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. Verify resource availability - Check resource schedule before assignment

  2. Notify promptly - Send notifications immediately after attachment

  3. Track assignments - Log resource assignments for analytics

  4. Update calendars - Sync resource assignments with external calendars

  5. Handle conflicts - Check for scheduling conflicts before assignment

  6. Maintain records - Keep audit trail of resource assignments


Related Documentation

Did this answer your question?