A common question we get here at Recurly Support is how to customize email content based on a specific customer. Recurly’s emails are global in the sense that there’s no way to fully customize your emails on a per-user basis; by default, the same language/content will be sent to all of your customers. You can use a variety of email parameters to ensure that specific information such as a customer's full name, address, cost of their subscription plan, etc. is only sent to the relevant recipient, but all that's really doing is creating a placeholder that certain customer-specific info can be inserted into.

Using Boolean expressions, you can take things a step further and hide/expose information that may not be relevant to all of your customers.

Take coupons, for example. Most customers who are using coupons want to see some sort of receipt or proof that they're indeed getting their intended discount, so it's a good rule of thumb to include coupon information in your New Subscription and Payment Confirmation emails (both of which include a customer's invoice). But what if some of your customers aren't using coupons? You more than likely don't want to send these folks an email with details about a discount they aren't getting. That's only going to cause confusion (at best).

Using a Boolean expression, you can dictate when it’s appropriate to include coupon language in an email (and when it’s not) with a conditional statement:

Thank you for your payment message in code

The ^ character above tests to see if the expression is false. If the account has a coupon at the time that the invoice is generated, the first block of text with the coupon information will be displayed in the email. If there is no coupon present on the account, the second block of text without the coupon information will be displayed instead.

You can also use Boolean to simply test if an expression is true:

Thank you for payment message on code

In this example, if a coupon is present on the account, all of the above text will be displayed. If a coupon is not present, only the first line (without the coupon information) will be included; everything after the conditional expression will be left out.

Boolean expressions can of course be applied to more scenarios than just coupons. For more information, take a look at our list of Email Parameters that can be used in your Recurly emails.