How we match a Shopify customer to a Xero contact

When an order syncs, the app has to decide which Xero contact the invoice belongs to. It works through the following in order, and stops at the first match. The point of the order is to avoid creating a second contact for someone you already have.



The order it checks in


  • A saved link. If that Shopify customer has synced before, we already know which Xero contact they map to, and we reuse it. This is why an existing customer keeps their contact even after you change your contact settings.
  • Email address. The usual match for a new customer.
  • Name, where the situation calls for it.
  • The Shopify customer ID, if it has been stored on the Xero contact.

If none of those find anything, a new Xero contact is created.



Why you might still see a duplicate


The commonest cause is the same person ordering twice with different email addresses. To Shopify they are two customers, so to Xero they become two contacts.


Merge them in Xero. The saved link then points at the archived one for a while, so if an order fails after a merge, email us and we'll re-point it.



B2B stores


If you sell to businesses, you can match on the company rather than the person, so a trade customer has one contact however many of their staff order. There is also a version that matches on the company's location, for customers with several sites.


See Use the company name as the Xero contact.



Forcing a particular contact


Two ways to override all of the above: tag the Shopify customer with a Xero contact ID, or send every invoice to a single contact using Customer on invoice.


Seeing duplicates you can't explain? Email us at help@hyvelabs.co with your shop URL and two order numbers that went to different contacts.

Still need help? Contact Us Contact Us