When does a grouping rule need a line ordering rule?

Assign an AutoInvoice line ordering rule to an AutoInvoice grouping rule when you want to organize the transaction lines belonging to a transaction created by the grouping rule in a specific order.

Use the Order By Type to specify whether to order the values belonging to a transaction attribute from least to greatest (Ascending) or greatest to least (Descending).

For example, when importing transactions from Distributed Order Orchestration, you can define a line ordering rule with the attribute SALES_ORDER_LINE to list the items on the invoice in the same order as they appear on the sales order.

Or, you can define a line ordering rule with the attribute AMOUNT and an Order By Type of Descending to ensure that the highest invoice line amounts are listed first on the transactions created by the grouping rule.