Format customer IDs
Customer ID uses PHP-style integer formatting. The template must contain an integer placeholder; the most useful forms are %d and a zero-padded form such as %05d.
| Template | Number | Result |
|---|---|---|
%d |
42 | 42 |
%05d |
42 | 00042 |
CUST-%05d |
42 | CUST-00042 |
B2B-%06d-EU |
42 | B2B-000042-EU |
What is supported
- Literal prefixes and suffixes.
- Decimal integer substitution with
%d. - Minimum width and zero padding, for example
%04d.
Only one numeric sequence is generated. Placeholders such as {year}, {month}, {store} and {group} are not supported, and there are no separate padding settings outside the template.
Changing an existing format
Changing the template affects newly generated values. Existing values remain as stored unless Apply template also to already existing IDs is enabled and the Admin form can extract a numeric part.
Before changing a live format:
- Check whether customers use their IDs to sign in.
- Check ERP, CRM, exports and custom email templates.
- Try examples with and without leading zeros.
- Keep the old value unchanged when another system treats it as a permanent key.
Customer numbers are identifiers, not presentation-only labels. A cosmetic format change can break lookups in another system.