Customizing the invoice number

Instructions for how to change the invoice number sequence in your documents, to match your accounting invoice numbers.

Bjorn Forsberg avatar
Written by Bjorn Forsberg
Updated over a week ago

Having your invoice numbers different from the default number sequence is needed in some countries, where the number must match an existing sequence.

Note: The following guide is relevant if you are using the template designs that are provided within the Order Printer Pro app.

It is possible to have a custom invoice number sequence in your documents through a small change to the template code. The way to do it would be to find this code in your template:

{{ name }}

And replace it with:

#{{ order_number | minus: xxxx }}

Note: You must replace the xxxx in the above code with the correct number to start your sequence.

You can also change

{{ name }}

to

#{{ order_number | plus: xxxx }}

If what you need instead is to increase your order number.

The order number starts at 1 for your first Shopify order, so you need to do the math and adjust the number to get the correct number series based on your needs.

Add a prefix or suffix to the Invoice number

By default, Shopify offers the option to display a prefix or suffix to your new order numbers. For this, go to your Shopify admin-> Settings -> Store details- > Order ID format. Once this is set up, all new orders will include it, and so will our templates.

However, if you want the suffix or prefix added only on our template without configuring it on your Shopify Admin, it's possible. For this, you need to find this variable in your template:

{{ name }}

And replace it with

{{ order_number}} 

Now, add the characters just before the variable (for prefix) or after ( for suffix). As in

#AB{{order_number}}

Then save, and you'll be all set! Any document you generate, whether the order is old or new, will have the characters added.

Note:💡The invoice number matches the corresponding Shopify order number Thus, the app cannot generate different sequential numbers for different types of orders, such as Online stores vs. POS orders. Since Shopify already assigned them an order number, the app will use that number as the base.

Did this answer your question?