Amazon Sales Order Invoice Batching

Modified on Thu, 11 Jan 2024 at 04:46 PM

Amazon generally deposits Seller disbursements every two weeks.  


The deposits correspond to Amazon Financial Event Groups.


Thus if Sales Order Invoice Batching is enabled (it is by default and strongly encouraged), the Sales Order Invoice gets created when a Financial Event Group status becomes “Closed”.  

The “Closed” status signifies that all the transactions for a given Financial Event Group are finalized. 


The Financial Event Group is comprised of detail lines that are retrieved from Amazon’s Settlement Data.


The Settlement Data can be viewed in the Event Group Drawer:


To translate the Financial Event Group and its Settlement Data to a Sales Order Invoice, the Settlement Data is grouped by combined composite field of Transaction Type, Amount Type, and Amount Description (let’s call this Financial Code) and summed up.


On a separate workflow, a User maps each Financial Code to a desired Nominal Code so that the Sales Order Invoice can properly be constructed.


What are the key relationships?

  • Sales Order Invoice (Accounting Transaction) → Sales Order → Amazon Order → Settlement Data

  • Sales Order Invoice (Accounting Transaction) → Batch Sales Order Invoice (Accounting Transaction) → Financial Event Group
  • Settlement Data → Financial Event Group

Marking Sales Order Invoice Accounting Transactions as Batchable

There is no guarantee that any related records will be in when the Sales Order Invoice gets in, so at the very least the accounting transaction should be marked as is_batchable so that it doesn’t get synced to the Accounting integration.


When generating a sales order invoice, there must be a method to check if it qualifies as a batchable Accounting Transaction, and if so, mark it as such.  The check should look up the sales channel, then the integration instance, and check if the integration_settings['batch_sales_invoices'] is set to true.

Generating Batchable Sales Order Invoice Accounting Transactions

A Batchable Sales Order Invoice is generated for a given Financial Event Group.

The Financial Event Groups must be queries to see which ones qualify for accounting transaction creation.  The conditions for qualification are:

  • Does not already have an associated accounting transaction
  • ProcessingStatus is Closed
  • Has Settlement Data Lines and for each line:
    • If the line has an order_id, that Amazon Order exists, the Sales Order exists, and the Accounting Transaction exists and is_batchable
    • The Settlement Data Line must have a Settlement Type Mapping and the Nominal Code of that mapping must exist

If any of these conditions fail, the Accounting Transaction will not be generated.  For Closed Financial Event Groups without Accounting Transactions, the reason why the Accounting Transaction is not generated should be set in an “accounting_status” field so that the User is aware of any needed action.


The Batch Sales Order Invoice can use the link_id and link_type to associate to the Amazon Financial Event Group.


When the Batchable Sales Order Invoice Accounting Transaction is created, any sales order invoices that are part of the batch should be associated it using the parent_id so that a User can filter by Sales Order Invoices that belong to a specified Batch Sale Order Invoice in the Accounting Transactions data table.


No updates are needed to Batchable Sales Order Invoice Accounting Transactions … unless the Settlement Type Mapping gets updated to a different Nominal Code, in which case a User can always delete the Accounting Transaction and regenerate it from the Financial Event Group drawer.


The Batch Sales Order Invoice should be added as a new Accounting Transaction Type


Batch Sales Order Invoice Accounting Transaction Lines will not utilize a link_id and link_type.  Instead link_id will simply be the line #, and link_type will be “summarized”

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article