How to Set Custom Numbering for Order-Related Documents in Magento 2?

Magento 2 Order Number Functionality | MageWorx Magento Blog
Reading Time: 5 minutes

Merchants who run their websites on Magento 2 might find that basic order management tools are not enough for efficient store operation. If there is a need to set a custom numbering for order-related documents, the default version of the eCommerce platform doesn’t provide such ability. For this reason, you will need to install a third-party module with the corresponding functionality.

In this post, we cover the main issues of the order numbering in Magento 2 and shed light on the Magento 2 Custom Order Number extension by MageWorx. The module helps merchants overcome the obstacles to creating custom numbers of orders, invoices, shipments, and credit memos.

Magento 2 Order Number Functionality

In default Magento 2, order numbers look like a 9-digit string that starts from 000000001. The first digit shows a store ID, and other symbols are displayed in the numerical order. The number counter increases by one step when a new order is placed. The default platform doesn’t provide any possibility to change the automatically generated number. Due to the lack of support for custom order numbers in the out-of-the-box Magento 2 version, eCommerce business owners might face difficulties when they have specific requirements to the numbering of order-related documentation.

The first thing to keep in mind about order numbers is that they show information about your business. With the default numbering scheme, your competitors can find out how many orders have been placed on your online store. With these figures revealed, it is possible to understand your business turnover during a particular time interval. For keeping your sales data confidential and ensuring business privacy, it is necessary to change the native orders numbering. Unfortunately, such functionality is not available with default Magento 2.

Another reason for customizing numbering scheme is the convenience of store administrators and customers. Automatically generated order and invoice numbers don’t let to understand the type of documentation. By specifying custom numbers, you can help admin users identify each document they are dealing with. As for customers, long strings of numbers in the order documents don’t look user-friendly.

Furthermore, the structure of document numbers is subject to legal requirements. Some countries impose quite strict rules to invoices numbering. So, if you are working with clients from such regions, inability to comply with local regulations might create legal problems for your business.

The mentioned above necessities can’t be satisfied by the default Magento 2 functionality. Luckily, there is a solution to your order numbering headache – the Magento 2 Custom Order Number extension by MageWorx. The module provides sufficient tools for setting custom numbers in order docs and streamlining the order management by creating templates for each document type. Below, we look closer at the functions of the Magento 2 custom invoice number module.

Magento 2 Custom Order Number by MageWorx: Features Overview

  • Custom numbers for orders, invoices, shipments, and credit memos;
  • Personalized order number format;
  • Custom templates for each document type;
  • Option to use order number in all related documents;
  • Dynamic variables in the number;
  • Possibility to change the counter increments step;
  • Specified prefixes and suffixes in the order number;
  • Custom value for the starting number of the counter;
  • Ability to modify the order number length;
  • Invoice numbering adjusted to local requirements.

The Magento 2 custom order number extension allows eCommerce store owners to customize numbers of orders, invoices, shipments, and credit memos using flexible templates. With the module, you can set a number format in line with your business requirements using various combinations of letters and numbers, custom prefixes and suffixes, and multiple variables.

Magento 2 Order Number Functionality | MageWorx Magento Blog

Ability to create different templates for each type of sales documentation provides merchants with extended possibilities in the order management process. This way, you can apply various settings to your order, invoice, shipping, and credit memo documents based on specific requirements. With the Magento 2 custom order number extension, you can add custom elements to the order number of each type of your sales docs. At the same time, you can utilize a relevant order ID template for invoices, credit memos, and shipment documents. This way, you will be able to quickly detect related documents and use the same number in all transactions.

Magento 2 Order Number Functionality | MageWorx Magento Blog

Using dynamic variables, you can indicate the date and time when an order was placed, or another sales document was issued. Also, you can specify an ID of a store where an order was placed, generate a random number or letter string, as well as include the counter variable in your document number. By adding dynamic elements to the order numbers, you will provide your store admins with more meaningful information on each document.

For the counter variable, you can set a custom value that will define the increment step. By customizing standard digit succession in the order number, you can protect your store data from being revealed by competitors. The Magento custom invoice number module allows setting custom number increments to change the count of consecutive orders, thus hiding real turnover statistics.

Another prominent feature of the Magento custom order numbers extension is the possibility to change the prefix in the document number. Besides, you can replace a specified part in the number string by adding a custom suffix. This way, you can arrange your sales documents in a more efficient way and streamline the order processing routine. By modifying prefixes and starting numbers and adding text to a specific order number part, you also make it easier for your store managers to identify a type of the document.

Magento 2 Order Number Functionality | MageWorx Magento Blog

Furthermore, the Magento 2 custom order/invoice number module allows users to set a custom value for the number counter padding. With this feature, you can specify a total number of digits that should be included in the document number. Thus, you can cut the length of native order numbers and improve perception and user-friendliness of your documents.

In addition to protecting confidential sales data and improving user experience, the Magento 2 order number module helps online store owners make their order documents compliant with the legal requirements of particular regions. Rules on the format of sales documents vary from country to country. For example, in the US, there are no specific regulations on the invoices number format, while the European Union applies particular legal rules to businesses operating in the EU countries. Thus, to be considered as a legal document, all invoices for the goods or services supply generated in the EU must have a unique number. The invoice number must have a sequential order and include the year when the document was issued. Since Custom Order Number for Magento 2 gives you freedom in setting the required invoice number structure, you can easily prepare documents in compliance with the local regulations of a country you are dealing with.


MageWorx Custom Order Number for Magento 2 is a reliable module for customizing numbering scheme of order documents. The extension equips online merchants with flexible tools for setting unique numbers of all documents generated during order processing. It makes the Magento 2 order number customizer a universal solution for all eCommerce merchants who want to get rid of order and invoice numbering limitations of the default platform. By leveraging settings available with the module, you will increase the loyalty of your clients by making documents more perceivable. Also, you can easily hide the business data that you don’t want to be exposed to competitors by tweaking a few options in your Magento Admin. So, if you need a reliable solution for changing the default Magento 2 numbering scheme, don’t hesitate to give a go to the Magento 2 Custom Order (Invoice) Number extension.

Anna is a content creator mostly involved in the exploration of Magento 2 functionality and extensions. Passionate about the constant development of her writing and content marketing skills and always ready for new opportunities and changes in her professional and social life.


Please enter your comment!
Please enter your name here