Create Xero bills from scheduled Salesforce invoices

CRMMarketingAccounting

What it does

When a scheduled search runs a SOQL query in Salesforce to find invoices, this automation creates a bill with a single line item in Xero for each one. Salesforce invoices are then updated to mark them as synced.

Who it's for

Accounting teams who need invoices from Salesforce automatically converted to bills in Xero.

How teams use this

Sync invoices to accounting daily

Run the scheduled search each morning to find invoices created since yesterday, create bills in Xero, and update Salesforce records. The team sees what synced without manual work.

Bill only invoices above a threshold

Add a condition to the SOQL query so only invoices over a certain amount are synced to Xero. Smaller invoices stay in Salesforce until they meet the threshold.

Include invoice details on the line item

Map additional fields from the Salesforce invoice to the Xero bill line item, such as account code or tax type, so accounting has full context without opening Salesforce.

Route bills by customer type

Split the automation so invoices for different customer types create bills in separate Xero accounts or with different line item codes. Each team gets the bills they need.

How it works

  1. Search invoices on a schedule. A scheduled search runs a SOQL query in Salesforce to find invoices that match your criteria, such as those ready to bill or created since the last sync.
  2. Create a bill for each invoice. For each invoice found, this automation creates a bill in Xero with a single line item so the amount and description are captured in your accounting system.
  3. Mark invoices as synced. Each Salesforce invoice is updated after the bill is created in Xero so someone can see which invoices have already been sent to accounting.