Auto-Create Xero Invoices from New Shopify Orders | MESA
Create Xero Invoices for New Shopify Orders
15 min setup
No coding required
Runs automatically
Whenever a new order is placed in your Shopify store, this workflow automatically creates a matching invoice in Xero, complete with customer details and line items. If the customer isn’t already in Xero, the workflow adds them first, then generates the invoice. This eliminates manual data entry and ensures your ecommerce orders flow directly into your accounting system, keeping your financial records accurate and up to date.
Order Created
Retrieve Shop
Get List of Contacts
Get List of Accounts
Shopify Customer Exists in Xero
Create Invoice
Shopify Customer Does Not Exist in Xero
Create or Update Contacts
How it works
9 steps to automatically create Xero invoices from Shopify orders while managing customer contacts
Order Created
App connector: [Shopify](/content/apps/shopify/integrate "View Shopify integration page"/index.html)• Time to complete: 0 minutes (Auto-configured)
Why this matters: This monitors your Shopify store for new orders and initiates the invoice creation process in Xero the moment a customer completes checkout.
Retrieve Shop
App connector: [Shopify](/content/apps/shopify/integrate "View Shopify integration page"/index.html)• Time to complete: 0 minutes (Auto-configured)
Why this matters: This fetches your Shopify store domain and settings needed to construct proper links back to orders in your Xero invoices.
Get List of Contacts
App connector: [Xero](/content/apps/xero/integrate "View Xero integration page"/index.html)• Time to complete: 0 minutes (Auto-configured)
Why this matters: This checks if the Shopify customer already exists in your Xero contacts database, preventing duplicate contact creation.
Get List of Accounts
App connector: [Xero](/content/apps/xero/integrate "View Xero integration page"/index.html)• Time to complete: 2 minutes
Why this matters: This fetches your Xero chart of accounts to properly categorize invoice line items according to your accounting structure.
Shopify Customer Exists in Xero
App connector: [Paths](/content/apps/paths/integrate "View Paths integration page"/index.html)• Time to complete: 0 minutes (Auto-configured)
Why this matters: This creates two processing routes based on whether the customer exists in Xero, ensuring the correct invoice creation method for each scenario.
Create Invoice
App connector: [Xero](/content/apps/xero/integrate "View Xero integration page"/index.html)• Time to complete: 3 minutes
Why this matters: When the customer already exists in Xero, this creates an invoice linked to their existing contact record, maintaining clean accounting relationships.
Shopify Customer Does Not Exist in Xero
App connector: [Paths](/content/apps/paths/integrate "View Paths integration page"/index.html)• Time to complete: 0 minutes (Auto-configured)
Why this matters: This identifies orders from customers who don't exist in Xero yet, triggering contact creation before invoice generation.
Create or Update Contacts
App connector: [Xero](/content/apps/xero/integrate "View Xero integration page"/index.html)• Time to complete: 3 minutes
Why this matters: For first-time customers, this creates a complete Xero contact record with billing information before generating the invoice.
Create Invoice
App connector: [Xero](/content/apps/xero/integrate "View Xero integration page"/index.html)• Time to complete: 2 minutes
Why this matters: After creating the new contact, this generates the invoice and links it to the freshly created Xero contact record.
Frequently asked questions
What happens if a customer's email changes between orders?
If a customer uses a different email address for a new order, the workflow treats them as a new customer and creates a separate Xero contact. This can result in duplicate contacts for the same person with different email addresses.
Can I create invoices in draft status instead of automatically approving them?
Yes, you can modify the invoice creation steps to set the invoice status to "DRAFT" instead of defaulting to submitted.
How are line items handled for orders with multiple products?
The workflow uses Liquid array syntax to iterate through all products in an order. Each product becomes a separate line item in the Xero invoice with its own description, quantity, and unit price.
Make this template your own!
Customize this workflow even further by adding additional context and controls to your invoices.