Work

Order Number Generator

Build purchase order number formats. Great for ecommerce, operations, corporate purchasing and traceability.

⚡Instant🔒In your browser✓No signup
Live

Order vs. invoice: a distinction often missed

The purchase order (PO) is the internal ID your team uses to identify an operation: what the customer bought, what you'll deliver. The invoice is the fiscal document issued when billing. One PO can spawn several invoices (partial deliveries) or none (if cancelled). That's why independent numbering is best — and why serious CRMs split the two flows.

Recommended format by industry

ContextExampleAdvantageRisk
EcommerceORD-20260805-0042Visible dateExposes daily volume
B2BPO-2026-01042Easy to dictateSequence must be stored
Multi-countryORD-US-2026-1042Shows originLonger format
Public referenceORD-2026-583104Hides volumeUniqueness must be checked
  • Ecommerce. ORD-YYYYMMDD-#### is most useful: tells you at a glance when the order was placed without DB lookups.
  • B2B / corporate. PO-YYYY-#### with a 5-6 digit sequence. More anonymous, better for long-running processes.
  • SaaS / subscriptions. SUB-{CustomerID}-#### ties the order to the customer right in the ID.
  • Logistics / dropshipping. Often add origin prefix: ORD-US-2026-####, ORD-UK-2026-####.

Why include date in the ID

Embedding the date offers two operational wins: chronological sorting without an extra column, and fast debugging when a customer calls about a purchase from "two months ago". If you handle 100+ orders per day, consider dropping the date and ordering by DB — the ID gets unwieldy.

Sequential vs. random

Sequential is preferable for internal management and audits. Random is used when you don't want to expose how many orders you have (e.g. on a new store: customer sees "ORD-2026-0003" and knows you're brand new). A common shortcut is to start the sequence high (10001 instead of 1) — keeps order, hides volume.

Traceability: what to store with the ID

  1. Creation timestamp. Even if the date is in the ID, store the exact time.
  2. Status. Pending, paid, picking, shipped, delivered, returned, cancelled.
  3. Customer and payment method. For reconciliation.
  4. Status change logs. Who moved it and when. This saves you in disputes.

Common mistakes

  • Reusing IDs. If an order is cancelled, do NOT reassign that ID — historical confusion guaranteed.
  • Changing format mid-year. Keep it stable; switch only at fiscal-year transitions.
  • Ultra-long IDs. Over 20 characters becomes painful on phone and chat.
  • Lookalike characters. Avoid O vs 0, I vs 1 in confusing positions.

What this generator does —and does not do

Genfy creates copy-ready references but is not a database: it does not remember the last sequence, check collisions against your store, or reserve numbers across users. In production, persist the counter in an atomic transaction or enforce a UNIQUE constraint. For a globally unique technical ID, use the UUID generator; for inventory codes, use the SKU generator.

FAQ

Order vs invoice?

Order is internal; invoice is fiscal. Use separate numbering.

What format?

Ecommerce: ORD-YYYYMMDD-####. B2B: PO-YYYY-####.

Sequential?

Not legally required, but helps audits and traceability.

Does Genfy store the sequence?

No. It runs locally; copy the output and persist the last sequence in your system.

Can random numbers be unique IDs?

They work as public references, but your database must handle collisions. Use UUIDs for technical IDs.

Should I restart each year?

Only if the year is part of the format and the procedure is documented.

Is it a fiscal document?

No. It is an operational reference, separate from the legally required invoice.

Was this generator useful?