Hubhus
ToolsAgent loginSubmit a ticket
All articles

Campaigns & Lead Management / Placeholders

Dynamic resource selection with placeholders

Published 28. sep. 2026, 16.03

TL;DR

Access: Edit booking form → Bookable resources section → "Or, enter bookable resources using placeholders" . Enter an expression that evaluates to: resource IDs (comma-separated), resource names, email addresses, resource tag names, or default (fall back to static selection). Use @if(@select[field,slug] == value){Tag Name}@else{default}@endif for conditional routing. Empty result = no resources bookable (blocks booking). Always include a fallback to prevent accidental lockout.

Dynamic resource selection lets you control which calendar resources are bookable based on customer choices, lead data, or business logic - using placeholder expressions and @if conditions instead of a fixed resource list.

4 things to know

  1. What the expression can return. The placeholder expression must evaluate to one of: comma-separated resource IDs (1, 2, 3), resource emails (["john@example.com"]), resource names (John Smith, Sarah Johnson), resource tag names (Installation Team - North), the word default (use static dropdown), or empty (no resources → blocks booking). The expression overrides the static dropdown selection.
  2. Department/service routing with @if. Route customers to the right resource team based on their form selection: @if(@select[department,slug] == north){Installation Team - North}@endif @if(@select[department,slug] == south){Installation Team - South}@endif. Or service-type specific: @if(@select[service_type,slug] == premium){John Smith}@else{default}@endif. Always include @else{default} so unmatched cases still show valid resources.
  3. Finding resource tag names. Go to Calendar → Calendar settings → Teams and tags → Resource tags to see all tag names. Or use the hh-data.calendar-resource-groups component to retrieve them programmatically: <hh-data.calendar-resource-groups pluck="name,id"/>. Tag names are case-sensitive in expressions - copy exact spelling from the UI.
  4. Combined with transit profiles. Dynamic resource selection and transit profiles work independently and complement each other: dynamic selection controls which resources are eligible, transit profiles control how far those resources can travel. Use both together for precise availability: select the right team, then let transit rules filter by travel distance. To choose the transit profile itself per booking, use the transit profile placeholder - see Managing transit profiles. Test after configuration - if no times show, the combination of rules may be too restrictive.
Read more

Conditional routing examples

Department-based routing - one resource tag per region:

@if(@select[department,slug] == north){Installation Team - North}@endif
@if(@select[department,slug] == south){Installation Team - South}@endif
@if(@select[department,slug] == east){Installation Team - East}@endif

Service-type routing with named resources and default fallback:

@if(@select[service_type,slug] == premium){John Smith, Sarah Johnson}@endif
@if(@select[service_type,slug] == commercial){Mike Davis}@endif
@if(@select[service_type,slug] == standard){default}@endif

@if/@elseif/@else with guaranteed fallback - always include @else to avoid empty results:

@if(@select[department,slug] == team_a){Team A}
@elseif(@select[department,slug] == team_b){Team B}
@else{default}@endif

Routing from a lead custom field (field value must match the tag name exactly):

@if(%lead_customer_type% == business){Commercial Team}@else{Residential Team}@endif

Advanced patterns

Multi-condition with AND (&&) - combine two form fields:

@if(@select[location,slug] == north && @select[service,slug] == installation){Installation - North}@endif
@if(@select[location,slug] == north && @select[service,slug] == service){Service - North}@endif
@if(@select[location,slug] == south && @select[service,slug] == installation){Installation - South}@endif

Blocking bookings conditionally - return an empty result to prevent booking:

@if(%lead_approved% == false){}@else{default}@endif

Useful for blocking bookings for unapproved leads, inactive accounts, or out-of-area customers. No times will be shown if the expression evaluates to empty.

Troubleshooting

No available times showing

  • Temporarily replace expression with default to verify the static resources work
  • Check expression evaluates to valid resource IDs, names, or tag names
  • Verify resources exist and are active in Calendar settings
  • Check browser console for syntax errors

Wrong resources are showing

  • Verify field slugs in @select[field,slug] match exactly - both field name and attribute required
  • Resource tag names are case-sensitive - copy exact spelling from Calendar settings
  • Test each condition branch individually to isolate the issue

Expression not evaluating / syntax not recognized

  • Ensure correct syntax: @select[field,slug] - not @select[field]
  • Simplify the expression to one condition and expand from there
  • Check for missing closing @endif

Fallback to "default" not showing expected resources

  • Confirm resources are selected in the static "Bookable resources" dropdown
  • Verify the word default is lowercase and spelled correctly
  • Ensure the expression reaches the @else{default} branch - add a test with no conditions to confirm
resource
placeholder
dynamic
Didn't find the answer? Submit a ticket and we'll get back to you as soon as possible.