Skip to content

Creating Invoice from a Record

Conduit for Xero includes a Xero Invoice Capture component that lets your users create a Xero invoice directly from a Salesforce® record. Added to a record page, it shows a Xero Invoices card listing the invoices linked to the record, with a Create Invoice button that walks users through raising a new one, either from a predefined mapping or from scratch.

The examples below use the Opportunity object and the Standard Sales mapping, but the same steps apply to any standard or custom object.

An administrator adds the component to the object’s Lightning record page once.

Open a record of the object, click the gear icon and select Edit Page.

The Setup menu on a record page with Edit Page highlighted

In Lightning App Builder, search the Components list for Xero, then drag Xero Invoice Capture onto the page. We recommend placing it in the side column, near the top.

Lightning App Builder with Xero Invoice Capture in the Components list and the Xero Invoices card placed in the side column

Select the component on the page to set its properties:

Property Description
Card Title The heading shown on the card. Defaults to Xero Invoices.
Card Icon The SLDS icon shown next to the title, for example standard:partner_marketing_budget.
Show Related Xero Invoices When selected, the card lists the Xero invoices linked to the record, with their status, total and amount due. Clear it to show only the Create Invoice button.

The Xero Invoice Capture properties panel showing Card Title, Card Icon and Show Related Xero Invoices

Click Save. If this is the first time you’ve customised the page, click Activation to assign it to your org, app or profiles.

Navigate to the record you want to invoice, for example the Acme Corp – 2027 Opportunity. The Xero Invoices card shows any invoices already linked to the record.

The Acme Corp – 2027 Opportunity record page with the Xero Invoices card outlined

Click Create Invoice.

The Create Invoice button on the Xero Invoices card

If you have more than one Xero organisation connected, first select the one to create the invoice in on the Select Xero Organization step. With a single organisation, this step is skipped.

Select how to populate the invoice:

  • Use Predefined Mapping (recommended) — fill the invoice from the record using a mapping. See Configure Xero Mappings for how to set these up.
  • Create from Scratch — enter all of the invoice details yourself.

The Configure Invoice Mapping step with Use Predefined Mapping highlighted

Select the mapping to apply. Each mapping shows the description it was given, to help you choose.

The Select a Mapping step with the Standard Sales mapping highlighted

Select the Xero Contact the invoice is raised against. Where more than one Xero Contact matches the record’s Account, each is offered with its address or currency and when it was last updated in Xero. To use a different contact, search by name or email. If the customer isn’t in Xero yet, add them. See Add a New Xero Contact.

The Select Xero Contact step with three matched contacts, the 132 Collins contact highlighted, and the Add Contact tile below

Click Add Contact.

The Select Xero Contact step with the Add Contact tile highlighted

The New Xero Contact form opens. Enter the contact’s details:

  • Contact — Contact name is required. It’s the name used on invoices and must be unique in Xero. Optionally add the First name, Last name, Email and Phone of the person you deal with.
  • Financial — the Account number, Tax number (ABN, GST or VAT number), Company number and Default currency.
  • Billing Address — the Attention, Street, City, State / Region, Postal code and Country for invoices.

The New Xero Contact form with the Contact name field highlighted and the contact, financial and billing address details filled in

Scroll down to Delivery Address. Same as billing address is selected by default; clear it to enter a different delivery address. Then click Create Contact.

The Delivery Address section with Same as billing address selected, and the Create Contact button outlined

The contact is created in Xero and selected for the invoice, and the wizard moves on to the Create Invoice screen. If the record maps to a Salesforce® Account, the new Xero Contact is also linked to that Account, so it’s offered as a match the next time you invoice the Account.

The Create Invoice screen with the new Acme Corp Pty Ltd contact highlighted under Xero Contact

The Create Invoice screen shows the Xero organisation, contact and mapping at the top. Click the × on the contact or mapping to choose a different one.

If you used a mapping, the Invoice Details and Line Items are filled in from the record. Review them and make any changes:

  • Invoice Details — Branding Theme, Invoice Number, Invoice Date, Due Date, Currency, Line Amount Types and Reference. Leave Invoice Number blank to have Xero number the invoice.
  • Line Items — the Description, Qty, Unit Price and Tax Rate for each line. Click Add Line Item to add a line, or the delete icon to remove one. The subtotal, tax and total update as you go.

Click the button for the status the invoice should have in Xero: Create Draft Invoice, Create Submitted Invoice or Create Authorised Invoice.

The Create Invoice screen filled in from the Standard Sales mapping, with the Create Authorised Invoice button outlined

The new invoice appears on the Xero Invoices card with its status, total and amount due. The card header shows the total still owed on the record. Click View Invoice to open the invoice.

The Xero Invoices card listing invoice ORC1050 as Authorised with $66.00 due, and the View Invoice button outlined

The Xero Invoice record shows the invoice synced from Xero, with its lines. Use View in Xero to open it in Xero, or View Public URL to open the online invoice your customer sees.

The Xero Invoice record for ORC1050 showing its Authorised status, dates, total and invoice line