Thanks to the conditions fields in the workflows, you can choose in which context your workflows are sent :
- a booking confirmation email for each of your rooms
- an English or French version email
- a thank you email with or without social media links
- ....
Below are examples of "turnkey" conditions, namely that the important element will be the ID of the targeted element, which you will find in your browser's search bar on each room / product like the example below :
For the more knowledgeable, a JSON code is used to declare in the "Condition" field of the workflows, 2 possibilities for the general structure:
All the conditions must be met => {"all": []}
One of the conditions must succeed => {"any": []}
Here are some example conditions :
ROOM CONDITIONS
To immerse players from the reservation confirmation with an email specific to a room that contains texts, images and perhaps an index specific to an adventure:
{
"all": [{
"fact": "room",
"path": "._id",
"operator": "inMongoIds",
"value": ["5cfa73ca4a0f120b4212053c"]
}]
}
You can authorize several rooms by separating the IDS by comma, example:
{
"all": [{
"fact": "room",
"path": "._id",
"operator": "inMongoIds",
"value": ["5cfa73ca4a0f120b4212053c", "5cfa73ca4a0f120b4212053c"]
}]
}
PRODUCT CONDITIONS
You want to be informed when a certain product is ordered:
{
"all": [{
"fact": "product",
"path": "._id",
"operator": "inMongoIds",
"value": ["5cfa73ca4a0f120b4212053c"]
}]
}
To add other products, you must add the identifiers in the value property, separating them with commas
{
"all": [{
"fact": "product",
"path": "._id",
"operator": "inMongoIds",
"value": ["5cfa73ca4a0f120b4212053c", "5cfa73ca4a0f120b4212053c"]
}]
}
Triggering of the email if a "gift voucher" type product is ordered:
{
"all": [{
"fact": "product",
"path": ".type",
"operator": "in",
"value": ["gift voucher"]
}]
}
Triggering of the email if an "additional sale" type product is ordered:
{
"all": [{
"fact": "product",
"path": ".type",
"operator": "in",
"value": ["additional sales"]
}]
}
Triggering of the email if a "click & collect" type product is ordered:
{
"all": [{
"fact": "is_shippable",
"operator": "isBoolean",
"value": true
}]
}
Condition 100% satisfied
A game session went perfectly well and you want to send the thank you email with the links from your social networks:
{
"all": [{
"fact": "session",
"path": ".rating_game_master",
"operator": "isBoolean",
"value": true
}]
}
Condition not 100% satisfied
Some players are not really happy with their experience and you worry that the opinions are in your favor. You want to send the thank you email without the links from your social networks:
{
"all": [{
"fact": "session",
"path": ".rating_game_master",
"operator": "isBoolean",
"value": false
}]
}
Condition on sending email in English
Your clientele is English-speaking and you differentiate between French and English emails:
{
"all": [{
"fact": "customer",
"path": ".language",
"operator": "in",
"value": ["in"]
}]
}
Condition on sending email in French
{
"all": [{
"fact": "customer",
"path": ".language",
"operator": "in",
"value": ["fr", "fr-FR"]
}]
}
Condition on the success of the mission
The players have successfully completed the mission and you want to invite them to come back to play the other rooms:
{
"all": [{
"fact": "session",
"path": ".success",
"operator": "isBoolean",
"value": true
}]
}
Condition on mission failure
Did the players not get out on time? Why not create an email inviting them to come and try their luck again?
{
"all": [{
"fact": "session",
"path": ".success",
"operator": "isBoolean",
"value": false
}]
}
TIP
It is of course possible to cumulate conditions by separating them by comma. For example below, I would like to send the email in French for a successful mission and on a specific room:
{
"all": [{
"fact": "session",
"path": ".success",
"operator": "isBoolean",
"value": true
}, {
"fact": "customer",
"path": ".language",
"operator": "in",
"value": ["fr", "fr-FR"]
}, {
"fact": "room",
"path": "._id",
"operator": "inMongoIds",
"value": ["5bfbe990e15b535aab0b1195"]
}]
}