Purchase orders: from Shopify to Xero, bills and stock

Purchase order sync copies the purchase orders you create in Shopify into Xero, so you do not have to type the supplier, products, quantities and costs again. It sends the purchase order only. You still approve it in Xero, create the bill from it, and Xero updates your stock when that bill is approved.



How it Works

The steps below are the full path from ordering stock to seeing it in Xero. Steps 1, 3, 4 and 5 are yours. Step 2 happens in the app and step 6 in Xero.


  1. Create the purchase order in Shopify. Add the supplier, the products (give each one a SKU), the quantities and the cost per item. Enter the cost without tax and set the tax rate on the line.
  2. The app sends it to Xero. A draft purchase order in Shopify arrives as a draft in Xero. An ordered one arrives as Awaiting Approval.
  3. Wait until the purchase order shows in Xero. When the goods arrive, create a transfer from the purchase order in Shopify and receive the delivery through it. This updates your Shopify stock only.
  4. In Xero, check the purchase order and approve it.
  5. When the supplier invoice arrives, create a bill from the approved purchase order in Xero. Check the supplier invoice number, the quantities, the prices and the tax, keep the item codes on the lines, then approve the bill. Do this promptly. Until the bill is approved, Xero does not count the stock, and orders that sell those items can fail with a stock error if Xero has run out.
  6. Xero adds the billed quantities to its stock for each tracked item when you approve the bill.


How to Turn it On

Two things turn this on. You allow the Shopify permission, and we switch it on for your store. Do them in this order:


  1. In the Post to Xero app, open Setup - Advanced and find Optional permissions. Under Purchase orders, click Allow purchase orders. Shopify asks you to approve it, and the store owner, or a staff member who can manage apps, needs to approve it. This lets the app read your purchase orders.
  2. Email us at help@hyvelabs.co with your store URL and the Xero tax rate you use for purchases at each rate on your purchase orders, for example 10% and 0%. We will turn it on and set those rates for you.

Purchase orders created before we turn purchase order sync on are not sent to Xero, so create new ones after we confirm it is on. If you need an older one sent, ask us.


The app checks your store for new and changed purchase orders about once an hour, so a purchase order can take up to an hour to reach Xero. It sends Draft and Ordered purchase orders only. Received and closed ones are not sent.



What Xero Shows

Each Shopify purchase order becomes one Xero purchase order. The purchase order number is the one Shopify shows. The Reference field holds Shopify's purchase order ID, so leave it as it is. The date is the day you created it in Shopify, in your store's time zone, and the currency is the one on the Shopify purchase order. If your Xero organisation does not use that currency, Xero refuses the purchase order and you should email us.


The supplier becomes a Xero contact with the same name. If Xero has no contact with that name, the app creates one. If the contact exists but is archived in Xero, the purchase order is not sent until you restore it.


Each line carries the product name and variant, the quantity and the cost per item. When the SKU matches the code of an item in Xero, the line uses that item and Xero takes its purchase account from the item. Otherwise the line goes across without an item, and it uses the purchase account we set up for you.



Tax and GST

Amounts go to Xero before tax, and the tax comes from the rate on each line in Shopify. For example, a line of 24 at $7.50 with 10% tax shows in Xero as $180.00 plus $18.00 GST. Many Xero organisations, Australian ones included, have more than one purchase tax rate at the same percentage, such as two at 10% or several at 0%. The app picks the Xero rate for each percentage by itself when only one active Xero purchase rate has that percentage. If it cannot pick one, we set it for you when we turn purchase order sync on. If a rate has no match and we have not set a default rate for your store, the purchase order is not sent until we add one, so email us. If you ever see a total or tax in Xero that differs from Shopify, email us as well.


If your supplier's prices already include GST, Shopify has no way to say so. A line entered with the invoice total at 0% tax usually reaches Xero with no GST, so check the purchase order before you approve it. You have two ways to handle it:


  1. Leave the purchase order as it is. When you create the bill in Xero, change the tax rate on each line that includes GST to your tax rate for purchases (GST on Expenses in Australia), leave any GST-free lines as they are, and set the bill amounts to tax inclusive. A $180.00 invoice at 10% then comes out as $163.64 plus $16.36 GST.
  2. Ask us to treat that supplier as tax inclusive. Use this only if every product you buy from that supplier includes GST. If some of their products are GST-free, use the first way instead, or GST is claimed on items that have none. Every line on their purchase orders must have 0% tax, and the purchase order then reaches Xero with the GST already split out.

The bill is what posts to your books, so always check its tax against the supplier invoice before you approve it.



Items and Stock

A purchase order does not change stock in Xero. Shopify counts the delivery when you receive it there, and Xero counts it when you approve the bill, for each tracked item. Other stock changes, such as a stock take, do not reach Xero on their own. See Does inventory sync from Shopify to Xero? for how that works.


This only works when Xero has not already counted the delivery. It is counted twice if you add the delivered quantity to the Xero item yourself, for example with an inventory adjustment, if you set an opening quantity that already includes the delivery, or if we have set up stock correction for your store, which brings Xero's quantity up to Shopify's. Email us before you bill your first purchase order and we will check your setup.


Between receiving a delivery in Shopify and approving its bill in Xero, Dashboard - Products shows those items as Inventory mismatch. That is expected, so do not correct the quantity in Xero. Approving the bill closes the gap. When you set an item's opening quantity in Xero yourself, leave out any delivery that is still waiting on its bill, because the bill adds it.


A line is matched to a Xero item by its SKU. If your store tracks stock in Xero, capital letters do not matter for purchase orders. If it does not, the SKU and the item code must match exactly. Your orders always need the SKU and the Xero item code to match exactly, so keep them the same. If the SKU is not an item in Xero, or the line has no SKU, what happens depends on how your store is set up. If your store tracks stock in Xero, the whole purchase order waits until the item exists. If it does not, the line goes across without an item, and billing it adds no stock. We can also set it up so the app creates the missing items for you with zero stock, using the account codes from your Products setup. This needs SKU matching on, and a line with no SKU is still held. That applies to purchase orders only, and the stock arrives when you approve the bill. See Match product SKUs to Xero items and Item code (SKU) does not exist in Xero for how items work in general.


If only part of an order arrives, bill what you received:


  1. Create the bill from the purchase order in Xero.
  2. Change the quantities to match what you received and what the supplier invoiced.
  3. Approve the bill.


Changes to a Purchase Order

Make your changes in Shopify until you approve the purchase order in Xero. Each time the Shopify purchase order changes, the app sends the new version to Xero, replacing its lines, status and date. Any change you made in Xero to its supplier, date or lines before approving is replaced.


Once you approve the purchase order in Xero, the app stops updating it. Later changes in Shopify do not reach Xero, so make them in Xero instead, for example by adding a freight line. Xero still lets you edit an approved purchase order. A purchase order you delete in Xero stays deleted, and the app does not send it again.



Why a Purchase Order is Held

Sometimes a purchase order waits instead of arriving in Xero. The app shows no message for this, so if one has not appeared in Xero, email us. Some causes you can fix yourself and for others we change your setup:


  • The purchase order has no supplier, or no products. Add them in Shopify.
  • Your store is set to wait for items, and a line has no SKU or its SKU is not an item in Xero. Add the SKU in Shopify or create the item in Xero.
  • The tax rate on a line does not match one Xero tax rate. We add the match.
  • Some lines have tax and some do not, for a supplier we treat as tax inclusive. Make every line taxed or untaxed.
  • The supplier is archived in Xero. Restore the contact.
  • The purchase order has too many lines to send, or Xero refuses it. We look into it.
  • You have not allowed purchase orders under Optional permissions in Setup - Advanced yet. Nothing is sent until you do.
  • The purchase order is archived in Shopify, or you created it before we turned purchase order sync on. It is not sent. Ask us if you need it.

Once the cause is fixed, the purchase order goes across the next time purchase orders are sent.



What to Avoid

  • Do not edit the purchase order in Xero before you approve it. The next change in Shopify replaces them.
  • Do not add the delivered quantity to the Xero item yourself, for example with an inventory adjustment, and do not correct an Inventory mismatch for a delivery that is waiting on its bill. The bill does that.
  • Do not remove the item codes from the bill lines. A line without an item adds no stock.
  • Do not create a second bill for the same supplier invoice.
  • Do not change the Reference on the purchase order.


What this Does Not Do

Purchase order sync does not create bills, record supplier payments or receive stock in Xero. It does not copy anything from Xero back into Shopify, so Xero never changes your Shopify stock.


If something does not look right, email us at help@hyvelabs.co with your store URL, the purchase order number and what you see in Xero, and we will take a look.



Learn More

Still need help? Contact Us Contact Us