Docschargebeedocs

HomeBillingPaymentsRevRecGrowthReveal
Support

Product Updates


  • Release Notes

Getting Started


  • Overview
  • Chargebee Billing Data Centers
  • Object Relationship Model
  • Understanding Sites
  • Developer Resources
  • Chargebee Tech Glossary
  • Articles and FAQ

Implementing Chargebee


  • Implementation Guide
  • Go-live Checklist
  • Articles and FAQ

AI in Chargebee


  • Chargebee Agents
  • Chargebee Copilot
  • Chargebee MCP Server (Model context protocol)

Product Catalog


  • Product Catalog Overview
  • Coupons
  • Articles and FAQ

Subscriptions


  • Working with Subscriptions
  • Billing
  • Orders
  • Articles and FAQ

Customers


  • Managing Customers
  • Account Hierarchy
  • Email Notifications
    • Email logs
    • SMTP Configuration
    • Mail Merge Usage
    • Sending Manual Emails
    • DMARC Regulation
    • Domain Authentication
  • Branding
  • Configure Multiple Languages
  • Articles and FAQ

Invoices, Credit Notes and Quotes


  • Invoices
  • Credit Notes
  • Quotes [Legacy]
  • Transactions
  • Articles and FAQ

Taxes


  • Overview
  • Configuring Taxes
  • Country-specific Taxes
  • Articles and FAQ

Hosted Capabilities


  • Overview
  • Hosted Checkout
  • Hosted Self-Serve Portal
  • Hosted Pages Features
  • Additional Hosted Pages
  • Payment Components
  • Managing payments with ChargebeeJS
  • Mobile-Optimized Hosted Pages
  • Articles and FAQ

Site Configuration


  • Users & Roles
  • Custom Fields & Metadata
  • Mandatory Fields
  • File Attachments & Comments
  • Advanced Filter Options
  • Multicurrency Pricing
  • Multi-decimal Support
  • Configuring Reason Codes
  • Events and Webhooks
  • API Keys
  • Time Zone
  • Time Machine
  • Transfer Configurations
  • Articles and FAQ

Reports and Analytics


  • RevenueStory
  • Home Dashboard
  • Frequently Asked Questions
  • FAQs for Classic Reports Sunset
  • Articles and FAQ

Integrations


  • Sales
  • Customer Support and Success
  • Finance
  • Tax
  • Marketing
  • Stitch
  • Collaboration
  • Contract Management
  • Order Management
  • Mobile Subscriptions (Legacy)
  • Other Integrations
  • Articles and FAQ

Data Privacy & Security


  • Two Factor Authentication
  • SAML Single Sign-On
  • System for Cross-Domain Identity Management (SCIM)
  • EU-GDPR
  • Consent Management
  • Personal Data Management
  • Compliance Certificates
  • HIPAA Guidelines
  • PCI Recommendations and Integration Types
  • Articles and FAQ

Data Operations


  • Bulk Operations
  • Migration
  • Articles and FAQ
  1. Billing
  2. Customers
  3. Email Notifications
  4. Mail Merge Usage
  1. Billing
  2. Customers
  3. Email Notifications
  4. Mail Merge Usage

Mail Merge Usage

Introduction

Mail Merge fields can be used to personalize content in Chargebee while configuring:

  • Email Notifications
  • Checkout & Portal
  • Invoice & Credit Notes

Mail Merge fields depend on the template selected for a particular email. You can find the list of fields in the Chargebee application as shown below:

image

When currency mergevars are used in conditional statements, the amount should be specified in cents and as an integer (for example, 0 instead of $0.00, 999 instead of $9.99).

You can add mail merge fields as part of your configuration to populate values dynamically.

	 Your current plan is {{plan.name}}.

Result

Your current plan is Basic.

Display Content when Field has a Value

If the field contains a value, the content inside the block will be displayed. '#' indicates that the condition to be checked must be true. '/' indicates the end of the field block.

	Dear Customer,
    {{#plan.setup_cost}}
    Your setup cost is {{plan.setup_cost}}.
    {{/plan.setup_cost}}
    Thank you for your purchase.

Result

Dear Customer, Your setup cost is $12.50. Thank you for your purchase.

If the mail merge field does NOT contain a value, the content will be ignored.

	Dear Customer,
    {{#plan.setup_cost}}
    Your setup cost is {{plan.setup_cost}}.
    {{/plan.setup_cost}}
    Thank you for your purchase.

Result

Dear Customer, Thank you for your purchase.

Display Content when the Field Has a Specific Value

If the field contains a value, the content entered within the block is displayed, such as plan name, addon name, etc. Otherwise, it will be ignored.

	{{#plan.id = BASIC-USD-Monthly}}
	Since you are in basic plan you have only email support.
	{{/plan.id = BASIC-USD-Monthly}}

Result

Since you are in basic plan you have only email support.

Display Content when the Field Does not Have a Specific Value

If the field is empty or does not have a specific value, the content entered within the block is displayed. '^' indicates that the condition specified must be false.

SAMPLE #1

	{{^customer.company}}
    You have not provided the company name
    {{/customer.company}}
    Thank you for your purchase.

Result

You have not provided the company name Thank you for your purchase.

SAMPLE #2

To display content when field does not have the specified value:

	{{^plan.name = enterprise}}
    Upgrade to the enterprise plan and enjoy 24/7 phone support.
    {{/plan.name = enterprise}}

Result

Upgrade to the enterprise plan and enjoy 24/7 phone support.

Enumerated String

Enumerated strings refer to values like subscription statuses (active, canceled, trial, etc.), invoice statuses (paid, not paid, etc.), and more.

SAMPLE #1

	{{#card.status = expiring}}
    Your card is about to expire.
    {{/card.status = expiring}}

Result

Your card is about to expire.

SAMPLE #2

Using an enumerated string with a false condition:

	{{^invoice.status = paid}}
    You have an outstanding invoice.
    {{/invoice.status = paid}}

Result

You have an outstanding invoice.

List Values

Used to display a list of items (objects that may have multiple entries in the subscription), such as addons, coupons, etc.

	{{#addons}}
    Addon Name : {{addon.name}}
    Addon Price : {{addon.price}}
    {{/addons}}

Result

Addon Name : Support Plan Addon Price : $9.99 Addon Name : License Addon Price : $19.99

Reformat Date and Time Values

You can use 'format' and 'timezone' attributes along with timestamp fields, such as subscription.trial_end, to change the default format of the date and time or convert it to a specific timezone. Click here for more details.

SAMPLE #1

	You signed up for your subscription on
    {{ subscription.created_at | format : dd-MMM-yyyy hh:mm:ss z }}

Result

You signed up for your subscription on 14-May-2016 11:07:00 UTC

SAMPLE #2

	Your subscription was activated on
    {{ subscription.activated_at | timezone: EST }} 

Result

Your subscription was activated on 14-May-2016 06:07:00

SAMPLE #3

	Your trial ends on
    {{ subscription.trial_end | format : dd-MMM-yyyy hh:mm:ss z | timezone: EST }}

Result

Your trial ends on 14-May-2016 06:07:00 EST

Mail Merge Fields for Formatting Timestamp

Articles & FAQs

How to change the date format of the mail merge fields in emails?
How to create the Merge(variable) fields in Chargebee?
How to use Merge(variable) Fields in Email notifications?
Renewal reminders mergevar-"Estimated charge on renewal"

Was this article helpful?