Sync Infusionsoft orders to Xero with line items
CRMMarketingUtilitiesAccounting
What it does
When an order is created in Infusionsoft and marked for transfer, this automation searches Xero for the invoice and contact. It creates missing contacts and invoices, adds line items and payments, or updates existing invoices when authorised.
Who it's for
Accounting teams who need to sync Infusionsoft orders to Xero without manual data entry.
Apps used
How teams use this
Sync a new order to Xero
Create an invoice in Xero from an Infusionsoft order marked for transfer, including the contact, line items, and payments in one flow. The team no longer enters data twice.
Add payments to an existing invoice
When an order is marked for transfer but the invoice already exists in Xero with authorised status, add the payments from Infusionsoft without recreating the invoice. This keeps payment records in sync.
Stop orders missing customer email
Check if the customer has an email before syncing. If email is missing, send a notification and stop the job so incomplete records are not created in Xero. Only orders with valid contact data proceed.
Set currency and tax by customer country
Add logic to set the invoice currency code, payment account, and sales tax rate based on the customer's country or shipping address. This removes hard-coded values and scales to multiple regions.
How it works
- Order created in Infusionsoft. A new order is created in Infusionsoft with the transfer to Xero flag enabled on the order record.
- Search for the contact in Xero. Search Xero for a contact matching the customer. If not found, create the contact using the customer details from Infusionsoft.
- Search for the invoice in Xero. Search Xero for an invoice matching the Infusionsoft order. If found and authorised, add payments only. If not found, create the invoice with line items and payments.
- Create products and line items. For each item on the order, search Xero for the product. Create the product if it does not exist in Xero, then add the line item to the invoice.
- Update the order with Xero invoice ID. Write the Xero invoice number back to the Infusionsoft order so both systems reference the same invoice.