Example
Templates

The six staff notifications (res_people_* and event_people_*) and manually emailing staff are sent to one scheduled person. Two pitfalls: the people array is a loop over all linked people (using {people.LASTNAME} in the salutation shows every name), and {FULLNAME} is the customer of the booking, not the person.

Not like this

<!-- FOUT: {people} is een lus over ALLE gekoppelde personen -->
Beste
<!-- BEGIN people -->
{people.LASTNAME}
<!-- END people -->

The solution: {PERSON_*}

The addressed person is available as standalone {PERSON_*} variables — for example {PERSON_FULLNAME}, {PERSON_LASTNAME}, {PERSON_EMAIL}. Use {PERSON_FULLNAME} for the salutation. The booking or activity variables (such as {BOOKING_NUMBER}, {FROMDATE}, {PROD_DESC}) are simply available, and {COMPANYNAME} gives the environment name. {FULLNAME} remains the customer.

Example template

<p>Beste {PERSON_FULLNAME},</p>

<p>Je bent ingepland. Hieronder de gegevens:</p>

<table>
   <tr><td>Reservering</td><td>{BOOKING_NUMBER}</td></tr>
   <tr><td>Datum</td><td>{FROMDATE} {FROMTIME}</td></tr>
   <tr><td>Product</td><td>{PROD_DESC}</td></tr>
</table>

<p>Met vriendelijke groet,<br />
{COMPANYNAME}</p>

When to still use the loop?

If you want to show an overview of all scheduled people in one email (for example a day overview), then do use the people loop. See People variables for the full field overview and configuring the notifications.

Configuring staff notifications.