Parsing Errors
If you create or edit a template and it generates a "parsing error" when being sent it means you've set something up incorrectly and Caterbook doesn't know what you want to do.
Check whether you have a non-bookingRoom variable within your ForEach loop, or a bookingRoom variable outside of one of those loops. Another cause can be accidentally deleting one of the curly brackets around the Room variables.
We recommend reading the following article to further understand how the Room variables work within the loop.
https://support.caterbook.net/hc/en-gb/articles/360020780012-Email-SMS-Message-Templates
Here are some examples:
Good:
{foreach}:{bookingRoom}
{
Room Type: {bookingRoom.roomTypeName} Rateplan: {bookingRoom.ratePlanName} Arrival: {bookingRoom.arrivalDate} Departure: {bookingRoom.departureDate} Price: £{bookingRoom.price}
}
Bad:
Example 1
{foreach}:{bookingRoom}
{
Room Type: {bookingRoom.roomTypeName} Rateplan: {bookingRoom.ratePlanName} Arrival: {bookingRoom.arrivalDate} Departure: {bookingRoom.departureDate} Price: £{bookingRoom.price}
(Reason : Missing final "}")
Example 2
{foreach}:{bookingRoom}
{
Room Type: {bookingRoom.roomTypeName} Rateplan: {bookingRoom.ratePlanName} Arrival: {bookingRoom.arrivalDate} Departure: {bookingRoom.departureDate}
}
Your booking total is Price: £{bookingRoom.price}
(Reason : bookingRoom variable outside of loop, here the room price has been used instead of the {bookingTotalValue} placeholder)