---
title: "Naming Series"
space: "Frappe Framework"
url: "https://www.prilk.com/docs/frappe-framework/naming-series"
updated: "2026-05-14"
---

## Naming Series

Every document needs a unique name (its primary key). Frappe gives you several strategies; pick one per DocType.

### Strategies

| Strategy | Example | When to use |
|---|---|---|
| **Naming Series** | SO-2026-0001 | Sequential with prefix — most ERPNext docs |
| **By field value** | The customer's email is the name | When one field uniquely identifies the record |
| **Random hash** | tab8xq3p2 | For internal-only records (Wiki Page uses this) |
| **User-picked series** | User chooses at save | Multiple parallel sequences in one DocType |

### Configuring a series
For DocType-wide defaults: developer mode → **DocType → Auto Name** field. For user-configurable series: **Setup → Naming Series**.

Format syntax:

| Token | Meaning |
|---|---|
| `.YYYY.` | Current year (2026) |
| `.MM.` | Current month (05) |
| `.fy.` | Fiscal year code |
| `.####` | 4-digit zero-padded counter |
| `.#####` | 5-digit counter |

Examples:
- `INV-.YYYY.-.MM.-####` → `INV-2026-05-0042`
- `SO-.fy.-####` → `SO-2526-0001` (FY 2025-26)
- `Q-.YYYY.-####` → `Q-2026-0001`

### Updating counters
**Setup → Settings → Naming Series** shows all current counters and lets a System Manager update them. Useful for year-end resets.

### Customer-facing impact
The naming series is visible on invoices, orders, quotations — it's what customers see and reference. Pick a format that aligns with your accounting conventions and any tax-authority requirements.

### Caution
Changing a naming series doesn't rename existing records — only new ones use the new format. Mixed-format histories confuse auditors. Plan the migration if you must change mid-year.
