How to Send Invoices Through Xero from Salesforce

How to Send Invoices Through Xero from Salesforce

This article explains how to send an invoice from Salesforce to Xero using an automated flow and the SFX Apex action. Once triggered, the invoice will be sent through Xero, and the “Sent to Contact” status will be updated back in Salesforce automatically.

Steps to Configure and Use

1. Create a Flow in Salesforce

You can use a Screen Flow or Record-Triggered Flow based on your use case.
Example criteria could include:

  • Invoice record created

  • Invoice status changed to "Ready to Send"

  • Manual trigger from button or UI

2. Add Apex Action to the Flow

Use the following Apex Action:

  • Apex Action Name: SFX-SendInvoicefromXero

  • Input Parameter:

    • parameterid: Provide the Salesforce Invoice record Id (Invoice__c.Id)

This Apex action will:

  • Trigger the Xero functionality to send the invoice.

  • Use the Contact and Email from the Xero Contact linked to that invoice.

  • Update the "Sent to Contact" field on the invoice record in Salesforce.

Screenshot Reference