Illustrative AgenticEcom editorial graphic for order references

Plan Magento order and invoice references without breaking integrations

• 4 min read • 297 views

Can I change the format of Magento order numbers?

Use a readable prefix or counter when your team has a real reconciliation or routing need. Identify which order, invoice or shipment reference an integration consumes and distinguish that visible reference from Magento's internal entity ID.

Try it on staging: Generate an order and two partial invoices in staging. Check for duplicate numbers and confirm that the accounting, fulfilment and email flows accept the format.

View Custom Order Number · Setup guide

Change a reference only when it helps people use it

A recognisable prefix and date can help staff identify a brand or document year. Keep Magento's native increment references if they already work with customers and downstream systems. A formatted reference is not a security boundary, a legal-compliance certificate or a substitute for an ERP mapping.

Custom Order Number formats the visible references for orders, invoices, shipments and credit memos. Those references differ from internal entity IDs used by Magento and integrations. Formatting a document number does not renumber the database's internal identity or migrate historic relationships.

Design each document format separately

The documented template tokens include {COUNTER}, {YYYY}, {YY}, {MM}, {DD}, {STORE_ID}, {country_code} and {rand}. Use the exact case shown in the guide. A random fragment still needs a counter. Set the start, padding, increment and any daily, monthly or yearly reset deliberately.

Orders, invoices, shipments and credit memos have separate formats and consume separate sequences. Two partial invoices for one order need distinct invoice references; do not reuse the order reference as the complete identifier of every invoice or shipment.

Illustrative example: one brand and two partial invoices

This is an unexecuted design. A merchant proposes ORD-{YYYY}-{COUNTER} for orders and INV-{YYYY}-{COUNTER} for invoices, with a five-digit padded counter. An order might appear as ORD-2026-01024 while its two partial invoices have independent invoice references. These are examples of formatting, not predicted next values in an installed store.

Ask the accountant whether separate invoice numbering and the proposed reset meet the business's requirements. Ask the warehouse and gateway owners whether their systems accept the length, characters and store-specific prefixes. Test actual exports and imports; a field described as a string can still face an integration's length or format restriction.

Reset dates require more than a tidy example

If the counter resets yearly, include the year in the format. If it resets monthly, represent the month as well as the year. Test the last and first documents around a boundary, simultaneous checkouts and multiple store views. Without sufficient period and store distinction, restarting a counter can repeat a visible reference.

The documented release uses Magento sales sequences, a per-store/document advisory lock and saved-number checks. These mechanisms do not justify an unconditional uniqueness or throughput promise for every installation. Formatting and checks add database work; measure the workload that matters to your store.

Roll out without rewriting history

Back up configuration and the database. Keep existing documents and their references intact; apply the design to new documents. On staging create an order, partial invoices, shipments and a credit memo, then inspect emails, PDFs, customer pages, search and accounting/fulfilment records. Record the old/new format cutover so support can find both generations.

For accounting exports or API transfer, use the Xero route checks. Confirm the actual reference carried into Xero and how staff reconcile it; changing the visible format does not itself synchronize either system.

Version, fit and next steps

We installed and upgraded Custom Order Number 1.0.10 on Magento Open Source 2.4.9 with PHP 8.5.10. Saving sales records in the test generated a formatted order reference and separate references for two invoices, two shipments and two credit memos. The test recorded saved references. Run a complete order in staging to check your checkout, fulfillment, emails and accounting exports.

Review Custom Order Number product details and the installation and configuration guide before choosing the extension.

The existing Admin walkthrough was recorded on 1.0.8. Use it as orientation alongside the current written guide; it is not evidence of a new end-to-end test.

Sources

Product information reviewed 21 November 2026 by AgenticEcom. Examples marked illustrative show what to check in your own store.