Skip to main content

How to separate Shopify sales in Xero by source when imported via Mirakl

If you're using the Mirakl Marketplaces App to import orders into Shopify and you want to see the source breakdown, this article is for you.

Written by Kaylie Worbey

This feature needs to be switched on by our support team. Get in touch via the chat or at [email protected] and we'll enable it on your account.

Mirakl allows you to sell your products across hundreds of marketplaces from one central dashboard. They also integrate with Shopify so that you can import those orders and fulfil them via your Shopify Admin.

Link My books now has built in functionality to be able to separate your Mirakl orders that are imported to Shopify and separate them by the marketplace source.

How does it work?

With this feature enabled, Link My Books will automatically group your Mirakl settlement summaries by marketplace source.

We'll automatically create tracking codes in Xero for each of the different marketplace sources and then we'll apply those to the relevant lines of the settlement invoice we send to Xero.

Your current account mappings can remain the same, meaning you can still have all Shopify Sales assigned to your chosen sales account etc. as the tracking codes will be doing all the hard work for you.

Hers is what a settlement summary for Shopify would look like:

A screenshot of a Link My Books invoice summary for Shopify. The invoice date is February 1, 2023, covering the period from February 1 to February 28, 2023. The invoice status shows it was sent on March 7, 2023, with a total amount of £0.00. The breakdown includes six line items: Sales to Sephora UK – £309.00, posted to

If we hone in on the detail here you can see that the sales to Sephora UK, Debenhams and Superdrug are all on separate lines in the summary invoice:

A screenshot of a Shopify invoice summary from Link My Books. The invoice is dated February 1, 2023, covering the period from February 1 to February 28, 2023. The invoice includes six line items: Shopify Sales – Principal – Sales shipped to UK – Sephora UK, Invoice Amount: £309.00 Shopify Sales – Principal – Sales shipped to UK – Debenhams, Invoice Amount: £269.00 Shopify Sales – Principal – Sales shipped to UK – Superdrug, Invoice Amount: £76.00 Shopify Sales – Principal Discount – Sales shipped to UK – Superdrug, Invoice Amount: –£10.36 Shopify Refunds – Refunded Principal – Sales shipped to UK – Debenhams, Invoice Amount: –£235.00 Shopify Gateway Clearing (Mirakl), Invoice Amount: –£408.64 No total or VAT details are visible in this cropped version.

The real magic happens when you send the settlement to Xero as then we add a tracking code to each of these lines with the name of the marketplace.

A screenshot of a Xero draft invoice entry screen for Shopify, dated 28 February 2023, with invoice number INV-0178. The invoice includes six line items with LMB tracking codes applied per marketplace.

If we punch in we can see that the tracking codes are being applied to each of the different marketplace sources accordingly:

A cropped screenshot of a Xero invoice table showing five line items. The columns displayed are Description, Qty, Unit Price, Account, Tax Rate, and LMB Tracking.

How does it look in your P&L report?

If you run a P&L in Xero, by default it will show all your data together (not split by tracking category).

To run a P&L split by tracking category, follow these steps:

  1. From the Accounting menu, select Profit & Loss in the Accounting Reports section

  2. Select Compare LMB Tracking Codes format from the Common formats menu on the left menu

  3. Choose a Date range for your report and click Update

A screenshot of the Profit and Loss report page in Xero with Compare LMB Tracking Codes highlighted under Common formats.

You should end up with something that looks like this:

A Profit and Loss report in Xero broken down by tracking categories: Debenhams, Sephora UK, and Superdrug.

Now you can see your figures from each of the different Mirakl Marketplaces shown in their own column.

How do I set up this feature?

To switch this on, get in touch with our support team and ask us to enable the Shopify channel split on your account. Once we've done that, no further action is needed on your side.

Your Mirakl sales will be automatically separated by marketplace source and the tracking codes will be automatically created in your Xero account.

You do not need to select the marketplace tracking codes yourself. Once the feature is enabled, Link My Books applies the correct marketplace code (e.g. B&Q, Tesco UK) to each line automatically when the settlement is sent. Leave the Primary Tracking Code for the Shopify gateway set to No tracking code under Settings → Settlement Settings → Tracking Codes so the automatic marketplace code can be applied.

What happens to settlements you've already sent?

Enabling the split applies to settlements sitting in "Ready to Send" status. Those will come through split by marketplace source, with the tracking codes created automatically in Xero.

Settlements you have already sent to Xero will not show the split. If you want it applied to those too, you can roll them back and resend them:

  1. Select the settlements on your dashboard (hold Cmd on Mac or Ctrl on PC to pick more than one).

  2. Choose Rollback from the Bulk Action menu.

  3. Once they return to "Ready to Send", send them again.

Note that rolled back settlements always need sending manually, even if you have auto-posting switched on. For more detail, see Rollback Feature: How It Works.

Troubleshooting: my P&L only shows "Shopify" and "Unassigned"

If your settlement lines in Xero are already split by marketplace in the description (e.g. "Sales shipped to UK - B&Q", "Sales shipped to UK - Tesco UK") but every line carries the tracking option Shopify instead of the marketplace name, the feature is enabled and working, and a manual tracking code is overriding it.

Xero only allows one tracking option per category on each invoice line. If the Shopify gateway has a Primary Tracking Code set (for example LMB Tracking Codes : Shopify), that manual code takes the slot the automatic marketplace code would use, so the marketplace split cannot be applied.

To fix this:

  1. In Link My Books, go to Settings → Settlement Settings → Tracking Codes.

  2. Under Tracking Code Assignments, open the Primary Tracking Code dropdown for Shopify and select No tracking code, then save.

  3. Roll back the affected settlements and send them again (see the steps above).

  4. Re-run the Compare LMB Tracking Codes P&L in Xero.

You will see the marketplace options (e.g. B&Q, Tesco UK) listed in the tracking code dropdown once Link My Books has created them in Xero. This is expected. Do not select them manually; they are applied automatically per line when the setting is left as No tracking code.

If you also use a second tracking category, see Use Two Xero Tracking Codes Per Marketplace.

Did this answer your question?