Show Xero data in Salesforce
Connect Xero and Salesforce to Portal. Xero customers and contacts become Salesforce accounts and contacts, each account can show balance, open orders and credit hold, and every a draft Xero quote, with its expiry date can be tracked as an opportunity.
What reaches Salesforce from Xero.
| Salesforce | From Xero | Direction |
|---|---|---|
| Account | Each Xero customer, the Xero contact, on credit hold when it belongs to the Credit Hold contact group: name, phone and the website from the email domain, matched on a Portal ID field | Portal writes; unmatched Salesforce accounts come in as company leads |
| Contact | The Xero contacts of each linked customer | Portal writes; contacts made only in Salesforce come into Portal, and an edit to a Xero contact becomes a change for your team to approve |
| Account summary fields (optional) | The customer's open balance and customer number, the count of open orders, the last five orders with status, and credit hold | Portal writes, as text fields on the account |
| Opportunity | One per a draft Xero quote, with its expiry date or order, with its total and close date | Portal writes; Salesforce changes to it are not read back |
| Product (optional) | Item code, quantity on hand and available of the Xero items tracked as inventory, in one location as on hand and available, and the base price | Portal writes |
| Lead, Task, Note | Salesforce leads, tasks and notes | Portal reads them; workflows, agents and staff can create new ones |
Connect Xero and Salesforce.
Connect with Xero and pick the organisation
Under Setup, ERP, ERP system, choose Xero and click Connect with Xero, sign in and pick the organisation to connect; Portal fills in its name and organisation ID. Then name the contact group that marks credit hold, Credit Hold by default, and enter the code of the Xero bank account that receives portal payments. Nothing is installed, and Xero notifies Portal on its own when contacts and invoices change.
Connect Salesforce
In Connect, Integrations, Salesforce, choose Connect Salesforce and sign in as a Salesforce administrator. Portal adds a Portal ID field to accounts, contacts and opportunities, the account summary and product stock fields, and a Portal integration permission set, then runs a first sync of your Xero customers and contacts.
Choose what Portal writes
Tick Also write balance, open orders, recent orders and credit hold on each Salesforce account so reps see the Xero numbers on the account page. Turn on Products and stock to send item stock and base prices. Accounts Portal cannot match with confidence wait under Companies to check for staff to approve.
Track quotes as opportunities
Add the Create CRM deal action to a workflow that runs when a quote is sent, and Change CRM deal when it is won or lost. Each a draft Xero quote, with its expiry date becomes an opportunity at Proposal/Price Quote and moves to Closed Won when Portal creates a draft Xero sales invoice from the quote's lines with the quote number in its Reference, then steps the quote through sent and accepted to invoiced.
Give reps the rest in the rep portal
Reps sign in to their own Portal site and see only their assigned customers with balance, credit limit and credit hold. They can open each customer's approved Xero sales invoices, with the amount still due on each and place orders, quotes and returns on the customer's behalf, logged under their name.
How Portal reads Xero.
Your administrator clicks Connect with Xero, signs in and picks the organisation; Portal then works through the Xero Accounting API with OAuth 2.0 and granular scopes. Changes are found with If-Modified-Since, and Xero also notifies Portal when contacts and invoices change, so nothing has to be set up on the Xero side. Portal keeps to 3 calls at a time, under the 5 Xero allows.
Because Xero has no sales order, an order placed in Portal is written as a draft sales invoice and a quote as a draft Xero quote; accepting a quote creates the draft invoice from its lines and marks the quote invoiced. Every create carries an Idempotency-Key and a portal reference, and Portal looks for that reference before creating, so a retried order or payment is never entered twice. Credit hold is a Xero contact group, Credit Hold by default, since Xero has no credit hold flag.
| Xero record | Read | Write back | Note |
|---|---|---|---|
| Contacts (customers, contact persons, addresses) | Yes | Yes | Create, update and archive; credit hold from a contact group; balance from Xero |
| Items | Yes | Yes | An item no longer sold is inactive |
| Prices | Yes | No | Item sales price only: Xero has no price levels or customer prices |
| Stock | Yes | No | Quantity on hand of tracked items, one location |
| Quotes | Yes | Yes | An accepted quote becomes a draft invoice |
| Orders | Yes | Yes | Draft sales invoices, since Xero has no sales order |
| Invoices | Yes | Yes | An order's draft invoice is approved when you bill it |
| Credit notes | No | Yes | Allocated to the invoice they credit |
| Payments | Yes | Yes | One Xero payment per invoice paid, into the bank account you choose |
| Purchase orders | Yes | Yes | Create, and change line quantities |
| Bills and supplier payments | No | Yes |
What it does not do.
- Invoice lines, payment status and credit limits from Xero are not written to Salesforce; reps see them in the rep portal.
- Portal syncs with Salesforce every 15 minutes, and soon after customers or contacts change in the ERP. It is not instant.
- Changes made to opportunities in Salesforce are not read back, so winning one there does not start a workflow in Portal.
- The Salesforce connection is tested against a Salesforce stand-in so far, so your Portal team sets it up with you on your org.
Xero and Salesforce, answered.
Can reps see Xero payment status in Salesforce?
Not invoice by invoice. With the account summary turned on, each Salesforce account shows the customer's open balance, open and recent orders and credit hold. Reps open approved Xero sales invoices, with the amount still due on each themselves in the rep portal.
Does Salesforce write anything back into Xero?
No. Xero owns customers and their contacts. A Salesforce edit to a Xero contact becomes a proposed change that staff approve in Portal, and nothing is written into Xero from Salesforce.
What stops duplicates?
Every account, contact and opportunity carries a Portal ID that Portal upserts on, and orders reaching Xero carry an Idempotency-Key on every create and a portal marker in the Xero Reference field, searched for first.
Xero has no sales orders. What does a portal order become?
A draft Xero sales invoice carrying the portal reference. When you bill the order, Portal approves that same draft and adds a freight line, so the order and its invoice stay one document in Xero.