> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://myoperator.crisp.help/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# What Excel/CSV format do I need so template variables map correctly?

|| Info
Quick answer — Create a .CSV or .XLSX file with clear, lowercase headers (e.g., `customer_name`, `amount`, `date`). Clean every value, keep one row per contact, then map each column to its matching template placeholder on the variable-mapping screen. Misformatted files cause blank variables or campaign failure.

## When should I use this guide?
Use it right before you upload an audience file for a personalised WhatsApp campaign. Following these steps prevents mapping errors, blank variables, and template rejections.

---

### 1. How template variables work
Template variables are placeholders that pull real data from your sheet.

Example template:

* `{{1}}` -> Customer name
* `{{2}}` -> Payment amount
* `{{3}}` -> Payment date

---

### 2. Valid vs. invalid Excel formats
| Template Variable | Valid format (header -> value) | Invalid format (what NOT to do) |
| --- | --- | --- |
| `{{1}}` | `customer_name` -> John Doe | `CustomerName` (header mismatch) or blank cell |
| `{{2}}` | `amount` -> 1500 | `1,500 INR` (symbols mixed into value) |
| `{{3}}` | `date` -> 23 July 2025 | `23/7/25` (ambiguous) or blank |

---

### 3. Steps to match variables
1. Prepare your file – create headers that match your variable types mentioned while creating templates (`customer_name`, `amount`, `date`).
2. Check formatting – remove extra spaces & special characters.
3. Upload during campaign setup – choose your `.XLSX` or `.CSV`.
4. Map variables – on the mapping screen, assign each placeholder (e.g., `{{1}}`) to its column.
5. Preview messages – make sure sample messages look correct before launch.

---

### 4. Common issues & fixes
| Issue | Result | Fix |
| --- | --- | --- |
| Missing required column | The file upload will give error | Add the missing header and re-upload |
| Header mismatch (`CustomerName`) | Variables won't be mapped correctly | Rename header to `customer_name` |
| Wrong column order (if positional) | Data maps incorrectly | Use the dropdown mapper or reorder |
| Blank cells in critical fields | The message fails or looks incomplete | Set fallback (e.g., "Customer") |

---

### 5. Best-practices checklist
* Use lowercase headers with underscores (no spaces).
* Standardise data (dates as DD MMM YYYY, amounts as numbers only).
* Set fallback values for critical variables.
* Always preview messages before launching.
* Save and reuse the sample file from the campaign builder to avoid manual errors.

---

Keywords: Excel variable mapping, WhatsApp template, CSV header format, campaign upload