Sometimes you write messages where you need to refer to an unknown quantity. For example, each customer might have booked a different number of tickets to a performance. It could be one ticket or multiple tickets.
crowdEngage contains a function that lets you specify both the singular and plural versions of a word or phrase. Then, at the time of sending, the system will insert the correct one automatically, depending on the customer's purchase.
The template tag
The template tag is used like this:
{{ pluralise("singular form", "plural form", object_to_count) }}
(Where object_to_count is a valid crowdEngage variable containing a list of items, for example tickets
.) -
This means that crowdEngage can literally count how many tickets the customer has and output the message depending on this.
Example
Your {{ pluralise("ticket is", "tickets are", tickets) }} here:
For a message with just a single ticket, this templating code would output:
Your ticket is here:
However, if the message was for multiple tickets, it would output:
Your tickets are here:
Objects with which the pluralise tag can be used
Primarily, this can be used with the list of tickets ( tickets
). There are various other lists (for example membership subscriptions) with which you can also use this tag. Please contact support at support@crowdengage.com for more information and help.