The Auto Invoice system can be used to automatically create invoices from orders. That is, a single order can automatically be used to create a new invoice where the newly created invoice contains all relevant information from the originating order plus additional information.
One example use case where this is particular useful is when you import order from different sources and want (or must) export invoices to another system. In that case you can't simply import orders and export orders, the orders must be "transformed" into invoices first. But not neccessarily invoices from all orders in the system, you might want only certain orders to be invoiced. Thats where Auto Invoice and Rules comes into the picture.
This is an illustration of a very simple setup just to give a glimps of what is possible on how to use Auto Invoice. Concider two sales channels where orders come in. There is a connected accounting system where you want to send invoices to. In this case you can use Auto Invoice to automatically handle this between your configured Connections.
You can find the Auto Invoice settings by navigating to (given its included in your license):
Settings > Sales > Order
and there you have the Auto invoicing section.
The switch Auto invoicing enabled is used to turn of the feature altogether. If enabled the system will continously scan for created or modified orders within the system and run configured rules. More about this further down in this article. You can now add your first rule to get started.
Anatomy of a rule
A rule can be enabled or disabled state. By default new rules are disabled until you explicitly enable them. Only enabled rules are used within the Auto Invoicing system when matching orders. A rule has two major sections; Conditions & Actions. These are key concept when working with rules.
Conditions are fine grained possibility for you to define which orders to match this rule on. You can select from a pre-definied set of fields and tweak the value for these. Only fields with value will be subject for matching and all configured conditions must match in order for rule to be applied.
The action part of the rule gives you the possibility to tweak how soem of the invoice content should be handled. All fields on order will be copied into the new invoice where there is a common denominator. There are also settings for fields not available on the order and thus important to define how to treat them.
Multiple rules for flexibility
You can configure an arbitrary number of rules and sort them as you like. Remember that the first rule matching the order will be used, none of the following rules after that. You can take advantage of this and structure your rules in a way to minimize the need to make lots of them.
In the list view you will see the configured actions for each rule unless you have written a Note on the rule, then that will be displayed instead. There is also an indicator if the rule is enabled or not.
Best practises and advanced features
Give your rules an understandable and meaningful Note, this will save time in the future when you or someone else within your organization needs to understand the configurations and its purpose.
Since you have the possibility to work with order type as Condition and Invoice type as Action you can setup flows to have refunds turned into credit invoices for example. In order to work with both Sales and Refund flows between E-commerce and ERP systems for instance.