Audience filters decide who gets a campaign. Twig decides what each person sees inside it. Instead of building one campaign for guests with parking and another for guests without, you build one campaign whose content adapts per guest.
What Twig is
Twig is a templating language you can use inside your campaign messages. With it you can:
Show or hide text depending on booking data.
Adapt the message to services such as parking or breakfast.
Adjust language and formality to the guest's profile.
Generate door codes dynamically.
These examples show what is possible. Each one adapts the content to what the guest booked, or to who the guest is.
Show parking instructions only to guests who booked parking
{% if 'parking' in orders.numbers_list|lower or 'parken' in orders.numbers_list|lower %}
<p>Parking is available on the street behind the hotel. Spaces are limited and offered on a first-come, first-served basis. Please contact reception for assistance or alternative parking options.</p>
{% endif %}
Give a different door code depending on the parking package
{% set hasParking = false %}
{% for item in orders.numbers_list|split(',') %}
{% if item in ['PRODUCT_PARKING_PACK1', 'PRODUCT_PARKING_PACK2'] %}
{% set hasParking = true %}
{% endif %}
{% endfor %}
{% if hasParking %}
{% set door_code = doorcode('your_doorcode_key_here', 985, true) %}
{% else %}
{% set door_code = doorcode('your_doorcode_key_here', 763, true) %}
{% endif %}
<strong>{{ door_code }}</strong>
Use the right German salutation
Bookboost takes titles from your PMS, and most systems store them in English only. This converts them to the correct German form, which matters for formality in German-language messages.
{% if primary_guest.title == 'Mr.' %}
Sehr geehrter Herr {{ primary_guest.full_name }}
{% elseif primary_guest.title == 'Mrs.' %}
Sehr geehrte Frau {{ primary_guest.full_name }}
{% else %}
Sehr geehrte/r {{ primary_guest.full_name }}
{% endif %}
Add a breakfast message only when breakfast is in the rate
{% if 'breakfast' in rate_plan.name|lower %}
<p>Start your day with our complimentary breakfast, served daily from 6:30 AM to 10:00 AM. Indulge in a delicious variety of hot and cold options, including freshly baked pastries, scrambled eggs, bacon, and waffles. Enjoy fresh coffee, juice, and more.</p>
{% endif %}
What to do next
Twig blocks you use repeatedly are worth saving. See Save Time with Content Blocks.
Always preview a Twig campaign against a real booking before sending. Logic that looks right can still resolve to nothing if the field it reads is empty for that guest. See Test your campaigns.
Getting help
Open Talk to Us in the left menu of the platform, or email support@bookboost.io. Tell us the campaign name and paste the Twig you are using.