Synchronising Inventory

Synching Inventory Between Xero and Woocommerce

This page discusses how inventory works in Xero and Woocommerce and the issues that can arise in connecting and synchronising them using Xeroom.

How Inventory Works in Xero

By default xero does does not manage inventory.  You can turn it on individually product by product  or do them all in bulk by exporting them all to a CSV file adding the required info and then reuploading it back into Xero.  The whole process is detailed here https://help.xero.com/uk/InventoryTracked. The accounting entries are given here https://help.xero.com/Inventory_Accounting.

You will need two accounts one to track the inventory movements called the Inventory Asset Account (IAA) and another for the cost of inventory purchases – this can be your standard Cost of Goods Sold (COGS) account. The IAA is a special clearing account of type inventory which holds the values for all inventory movements/adjustments. You can set multiple IAAs although Xeroom can only use one.   Adjustments can be manually added in Xero for a product by either adding an opening balance or as a movement.  Depending on how your Xero is set up this will generate a purchase bill which credits creditors and debits the IAA  or a credit to the COGS account and a debit to the IAA. These purchase bills are generated by Xero using the purchase item unit price.   If you are using tracked inventory to link to WooCommerce and don’t wish these purchase bills to hit and clutter up your debtors and related accounts then either set the purchase price to zero or set up a dummy COGS.

Here is the screen you get when editing a product item under inventory.

 

Limitations of the Xero Inventory Process

Very important:  Once inventory is set to be tracked for a product Xero will not permit that product to be sold if there is no inventory for it.  So if a sales invoice is created you are only allowed to use the inventory on hand.  BACK ORDERS ARE NOT PERMITTED.  You are not permitted to Approve any invoice that takes the stock below zero.  Furthermore once you turn inventory tracking on it cannot be turned off for a product.  Why is this?  Since Xero will start tracking inventory for that product and transactions are posted using these two accounts as well as others, history that cannot be deleted since Xero is an accounting system requiring a full audit trail of all transactions and movements using double-entry methods.  The best thing would be for Xero to add an option to turn off tracking for a product but for audit reasons this is very unlikely to happen.  Alternatively it could allow backorders for tracked inventory thus preventing the limitation on sales invoice creation – this is a reasonable request but low on Xero’s priority list.  Is there a way to work around and reset this limitation?  Yes, you can recreate duplicates of all your product codes by exporting them to a CSV and reloading them without tracking.  This will obviously affect your history and the reporting of past transactions.  There are also other workarounds that can be done such as keeping the Xero inventory levels high enough to prevent any theoretical stock outs.

How Does Inventory Work in Woocommerce?

To use inventory in Woocommerce you need to go to the woocommerce/settings/products/inventory tab where you are presented with the options on how to operate inventory.  Note that the situation is different here to Xero in that back-orders ARE allowed here so the inventory can go below zero.

You can now go to each product and set whether you want stock management to be done for it and if so whether you want to allow back orders or not.  Obviously without inventory management then back orders will be permitted.

How Does Xeroom Synchronise Inventory?

Xeroom synchonises inventory in two ways, individually for an SKU only when an order for that SKU is placed in Woocommerce and in the latest version (2.0.5) it has a Global Product Inventory Synch option.

For an individual SKU –  If you are out of stock due to orders taken in other systems that don’t feed in to Woocommerce but Xero directly (eg physical shops, telephone orders etc) then Xeroom will check the inventory in Xero and not permit the order to be placed, if Xero is set to be the Inventory Master.  You can also choose to allow the order to commence creating a back-order situation in Woocommerce.  Xero does not allow back-orders so Xeroom was designed to overcome this big limitation in Xero aiming to give the maximum possible flexibility to users.  This is detailed below.

Inventory Settings in Xeroom

In xeroom you use the same Inventory Asset Account and Cost of Goods Sold Account that you set up in Xero. You then must decide which is going to be the master Xero or Woocommerce as they both cannot be.   Whatever is the master will send its inventory to the other the next time a product is sold.

Synch Inventory Master set to None

Use this setting if no stock synchronisation is wanted.  Leave this set to None and don’t turn on inventory tracking on in Xero.  If a product in xero is not set to have its inventory tracked then no automatic adjustments are made in xero, no purchase bills created and no orders held up and not posted to Xero due to stock reasons.

Please note this will not turn off any Inventory Tracking of products that have been previously turned on in Xero.  If you were using tracking in Xero and now wish to stop then you have to also reset all your products in Xero to be untracked.  Why?  Because Xero will not allow inventory to go below 0 which would in turn prevent Xeroom from creating an invoice.  You would then get orders placed in Woocommerce but not appearing in Xero. To get around this Xeroom will automatically force the creation of  an inventory movement by the amount of the order and create a purchase bill.

This means that back orders can be handled in woocommerce and allow the invoices to be created in Xero but a manual check will need to be kept on the purchase invoices that are created by this process.  Part processing is not permitted eg if you have 2 items in stock and the order is for 3 then it will add and subtract 3 items permitting the invoice to be created, leaving 2 as this setting is for no inventory master.

The inventory purchase bills  will effect the COGS and bank balances and so have to be voided or credited.  To avoid this then don’t make a product trackable in the first place which means that the xero inventory control will never to set for that product.  If you have already turned it on then it cannot be set to off as transactions will exist and so the only option is to post any movements to dummy COGS and inventory tracking accounts or to rename and reset the products in Xero to be untracked.

Synch Inventory Master set to Xero

With Xero set to be the inventory master any orders placed in WooCommerce will reduce the stock shown in Xero when the invoices are posted.  The new stock balance is then backflushed into WooCommerce.   The stock level in Xero can run down to 0 and no automatic repurchasing takes place in Xero.  At that point stock control in Woocommerce will not allow any further purchases and show out-of-stock messages unless back-orders are allowed (set at product level).  Xero being out-of-stock it does not permit the creation an invoice and an error message stating this is fed back to debug referencing that particular WooCommerce order number.  Note that the order is still taken in WooCommerce if back-orders are allowed, but just not created in xero.  If back-orders are not allowed in WooCommerce then an out-of-stock message is given to the user and no order can be taken.  For invoice creation in Xero to be resumed requires a stock movement or purchase to be made in Xero.  However orders in WooCommerce that have not been posted due to being out-of-stock in Xero will not then be posted once the stock level is back above 0.  Invoices affected need to be manually created in Xero or if it is more than a few can be loaded with the Xeroom bulk data load tool.

Synch Inventory Master set to Woocommerce

With Woocommerce set to be the master then the stock figure is taken into Xero.  When this happens the product is set to be tracked and the necessary inventory movement is made and purchase bill created to reflect the change.  No invoice will be created in Xero if the order would take the inventory below 0 and a message given in the debug page as before.

Global Scheduled Synch of All Products

This new powerful feature has now been added to version 2.0.5.  This enables inventory for ALL the products being tracked in Xero to be synchronised on a daily or hourly basis.  You can elect for either Woo or Xero to the inventory master.  Up until now this feature has only been possible with far more expensive dedicated Xero inventory control services and apps costing thousands of dollars a year.

 

 

 

 

 

 

 

 

 

 

Who should be the Global Inventory Master – Woo or Xero?

The answer to this question depends on the following considerations:

  1. Do you take orders and create invoices in Xero independently of your website?  – eg a physical retail store or by telephone?  If so then Xero should be the master.
  2. Do you wish to be able to create back orders once you are out of stock? – If so then make Woo your master.
  3. Do orders flow into Xero from other external systems or ecommerce shops such as ebay? – Then make Xero your master.
  4. Do all orders flow via your WooCommerce site? – Then make Woo your master.
  5. Do you not want inventory to be tracked in Xero at all but just held in Woo? – Then don’t use this feature and set the synch to None.
  6. Are you doing an initial install? – Then use the “Synch Now” button for a one off manual copy of your inventory from Woo to Xero or vice versa.