> ## Documentation Index
> Fetch the complete documentation index at: https://print.app/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Mail Merge

> How to configure Mail Merge module to allow for project variations

Mail Merge lets your customers create a batch of print pages that are personalized for each person.
For example, a company can personalize a single business card with each staff's details and submit it as a single project.

On your end, you get to download a single PDF file with each page showing the same design but with different staff details.

<Frame caption="Creating 3 Business cards with a CSV datasource">
  <img src="https://mintcdn.com/printapp/IX5EDu7QSq3aP3fy/images/mm-sample.png?fit=max&auto=format&n=IX5EDu7QSq3aP3fy&q=85&s=9fc945658caff03d650f7db6fcc71f51" width="1898" height="1226" data-path="images/mm-sample.png" />
</Frame>

Mail Merge has two modes:

1. **List** (shown as **CSV Upload** in the classic editor) - Your customer fills one row per copy: typed in, pasted from a spreadsheet, or imported from a CSV file
2. **Range Mode** - Records are generated by your customer specifying a number range with a starting value
   <br />This is useful for generating products like Marathon Bib numbers.

### How to create Mail Merge Designs

* To get started, load a Design or open one for edit from your [Admin Designs page](https://admin.print.app/designs)

* Click the Design tab on the left panel and then click the `Add Module` button and click Mail Merge from the list.
  <img width="320" src="https://mintcdn.com/printapp/ECKpksPfnecehQ8M/images/add-mailmerge.png?fit=max&auto=format&n=ECKpksPfnecehQ8M&q=85&s=372b5ade50322ee35894bced655641a4" data-path="images/add-mailmerge.png" />

* Next, you will see the Mail Merge configuration form as shown below:
  <img width="320" src="https://mintcdn.com/printapp/IX5EDu7QSq3aP3fy/images/form-mailmerge.png?fit=max&auto=format&n=IX5EDu7QSq3aP3fy&q=85&s=d5e76d92679e27146161a80f2bf2ba6f" data-path="images/form-mailmerge.png" />

* All you have to do is select the mode and add the Text placeholders to your designs. The Text placeholders are described below

### Range Mode Text Placeholders

The Range Mode generates records using numbers. It presents your customers option to set a starting number and quantity.

To create a placeholder, just add a text with double hash. Anywhere the double hash is encountered, the index number will be inserted.

Eg: `00-##`. The number 234 will replace the ## and render: `00-234`

<img width="420" src="https://mintcdn.com/printapp/IX5EDu7QSq3aP3fy/images/mailmerge-run.png?fit=max&auto=format&n=IX5EDu7QSq3aP3fy&q=85&s=1b144183c7a1501e94f69b1e8f9d779e" data-path="images/mailmerge-run.png" />

### List Mode (PrintFX editor)

In the PrintFX editor, the CSV Upload mode is a list your customer fills in, one row per copy:

* **The fields come from your design.** Every Smart Text is a field: a Smart Text with a title is filled as a whole (title `Name`), and a template with placeholders fills each placeholder (`Dear {Name},`). Texts that share a title, on any page, all take the same value.
* **One field** (for example place cards with a name): the customer types straight into the rows. Enter adds the next row, and pasting a list (one name per line) fills as many rows as it has lines.
* **Several fields** (for example business cards): each row shows its first field, with a pencil to edit the whole row in a small form next to the list. A range copied from Excel or Google Sheets can be pasted into the first field of a row.
* **CSV import** adds the file's rows to the list. Columns are matched to the field names (not case sensitive); columns nobody uses are ignored and reported.
* **The canvas shows the selected row**, so your customer sees each name fit as it is typed. A row with nothing typed yet shows your design's sample text; once anything is typed, the row looks exactly as it will print, empty fields included. A row selector above the canvas pages through the rows, in the preview as well.
* **Required fields** (`{!Name}`) are checked on every row before the customer can submit.
* Lists are limited to 250 rows per order.

**Each row is one copy.** With this option on (the default), the number of rows and the Print Options quantity on the product page follow each other: a quantity of 20 opens the editor with 20 rows, and adding or removing rows changes the quantity. Rows the customer already filled are never removed; if they outnumber the quantity, the quantity goes up instead. Turn the option off when rows are versions and the quantity means copies of each (for example 250 business cards for each of 5 people).

When the customer submits, every row is saved as its own set of pages, and the PDF prints them in order: row 1's pages, then row 2's, and so on. The storefront preview shows the first row.

### CSV Upload Mode Text Placeholders

The CSV Upload mode uses the same template a Datasource does.
You basically create a Smart Text with a title. The title corresponds to a column name in the CSV file.

For example a Text titled `email` will have its content replaced with the corresponding email address value in the CSV record for that row

[Here's a detailed article on how to create Smart Texts](/docs/guides/designs/objects/smart)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.