How to connect an AI agent to Sage Accounting
Connect Sage Accounting to Portal, then add Portal's MCP address in Claude, ChatGPT or Cursor and sign in. The assistant answers from Sage Accounting data synced into Portal, and anything it changes, like a draft Sage Accounting sales invoice, which your team releases in Sage to invoice it, waits for your confirm.
About Sage Accounting.
Sage Accounting, long sold as Sage Business Cloud Accounting, is Sage's online accounting software for sole traders and small businesses. It covers invoicing, online and card payments, debtors, VAT and reporting, and higher tiers add quotes and estimates, purchase invoices, products and services, and inventory.
It comes in three subscription tiers: Accounting Start for sole traders and micro businesses, Accounting Standard for larger small businesses, and Accounting Plus, added in May 2020 for Canada, Ireland and the UK, which brings inventory and multi-currency invoicing. Its API v3.1 serves businesses in Canada, France, Ireland, Spain, the UK and the US.
It runs only in the cloud, so every integration reaches it through the Sage Accounting API with OAuth 2.0, one business at a time.
Portal by Webisoft is a B2B portal for Sage Accounting: customer self-service and team apps on live Sage Accounting data.
Why connecting to Sage Accounting is hard.
An assistant with its own Sage Accounting login would need its own authorization and could land in the wrong business without the X-Business header. Portal holds one connection and gives the assistant scoped tools on synced data.
What the API can do depends on the tier
Sage says not every endpoint is available on Accounting Start or Accounting Standard. Start covers invoicing, payments, debtors and VAT; quotes and estimates and products and services come with Standard; inventory and multi-currency come with Plus, which is only offered in Canada, Ireland and the UK. An integration has to check the tier before it relies on quotes or stock.
No sales order document
The sales documents with a lifecycle are quotes, invoices, credit notes and corrective invoices; there is no sales order. An accepted quote or estimate is converted straight into a sales invoice, and Sage says that conversion cannot be undone. Orders have to be carried as draft or pro-forma invoices, which can only get that status when they are created.
Tokens that expire quickly
Access tokens last five minutes and refresh tokens 31 days. If an integration does not refresh within that window, a person has to sign in and authorize it again, so a connection left idle for a month quietly stops.
The wrong business is one missing header away
A user can have several businesses, and every request should name one in the X-Business header. Without it Sage reads and writes the user's lead business, which can change, so an integration that skips the header can post to the wrong books. Each app is also limited to 1,296,000 requests a day and 150 at a time.
Your options.
| Option | Fits when | Watch out for |
|---|---|---|
| Native Sage Accounting add-ons | You need one narrow function and an add-on covers it. | Each add-on is its own product to license, learn and upgrade. |
| Generic integration platform | You have someone in-house to build and maintain the flows. | You still build the screens, the AI layer and the Sage Accounting write rules yourself. |
| Custom code | The need is unique and you have developers who know Sage Accounting. | Upgrades and staff changes put the integration at risk. |
| Portal by Webisoft | You want customers, your team and AI agents working on live Sage Accounting data. | It works on top of Sage Accounting; it does not replace it. |
How Portal reaches Sage Accounting.
Portal uses the Sage Accounting API v3.1. Your administrator chooses Connect with Sage Accounting in Portal, signs in to Sage and approves access; Portal then stores the business ID and sends it as the X-Business header on every call, so it never falls back to another business. Portal refreshes the five-minute access token as needed and saves each new refresh token Sage returns.
Because the API has no sales orders, a Portal order is written as a draft sales invoice, which your team releases in Sage to invoice it; an accepted quote becomes a draft invoice through Sage's own invoice-from-quote, which marks the quote Invoiced. Quotes, invoices and payments carry Sage's idempotency ID, and quotes and orders also carry a portal reference that Portal searches for before creating, so a retry returns the first document. Credit hold is a marker you choose in the customer notes, since Sage contacts have no hold flag.
What you need.
- A Sage Accounting login that can approve access for the business, on Accounting Standard or Plus if you want quotes
- The Sage Accounting bank account that portal payments should be paid into
- An admin in Portal to turn on AI tools under Setup, MCP
Step by step.
Your Portal team sets up the Sage Accounting connection with you during onboarding, so the first step is done together. The rest is yours to change any time.
Connect Portal to your Sage Accounting business
Under Setup, ERP, ERP system in Portal, choose Sage Accounting and click Connect with Sage Accounting, then sign in to Sage and approve access. Portal takes the first business on that Sage login and sends its ID as the X-Business header on every call; if your login has several businesses, type the right business ID in the settings. Then set the bank account that receives portal payments, the credit hold text and, if you want, the price type used as the list price.
Turn on AI tools
Under Setup, MCP, tick Allow AI tools for internal users, customer users or both, and choose which tools are offered. Customer, item and price data come from the Sage Accounting customer contact, on credit hold when its notes contain the text you choose (CREDIT HOLD by default) and Sage Accounting product sales price types, the list price plus the price type set on each customer.
Decide on changes
Leave Allow actions that change data off for a read-only assistant. Turn it on and a request such as placing an order returns a preview; once confirmed, it becomes a draft Sage Accounting sales invoice, which your team releases in Sage to invoice it, kept from duplicating by Sage's idempotency ID plus a portal marker in the document notes, searched for in the customer's last 7 days of documents before every create.
Add Portal to your AI app
Copy the address from the MCP page, or from Connect an AI tool on the customer site, and add it as a connector or custom integration in Claude, ChatGPT or Cursor. Sign in on the Portal page that opens and choose Allow.
What syncs with Sage Accounting.
| Record | Read | Write back | Note |
|---|---|---|---|
| Customers, contacts and addresses | Yes | Yes | Credit hold from a marker in the customer notes |
| Products and services | Yes | Yes | |
| Prices | Yes | No | One price per price type; no quantity breaks |
| Stock | Yes | No | Accounting Plus only, one location |
| Quotes and estimates | Yes | Yes | Turned into a draft invoice on acceptance |
| Orders | Yes | Yes | Draft sales invoices, released in Sage to invoice |
| Sales invoices and credit notes | Yes | Yes | |
| Customer payments (receipts) | Yes | Yes | Allocated to the invoices paid; a surcharge is not posted |
| Attachments | No | Yes | On customers, quotes and invoices |
| Shipments and returns | No | No | Sage Accounting has no shipment or return document |
What you can do next.
- Which Sage Accounting quotes for this customer are still pending, and when do they expire?
- Which draft invoices from the portal are still waiting to be released in Sage Accounting?
- Which Sage Accounting invoices for this customer are part paid, and how much is outstanding on each?
Sage Accounting questions, answered.
Why do portal orders show up as draft invoices in Sage Accounting?
The Sage Accounting API v3.1 has no sales order, only quotes, estimates and invoices. Portal writes each order as a draft sales invoice, which does not touch your ledger until your team releases it in Sage and it gets its invoice number.
Does the assistant log in to Sage Accounting?
No. It signs in to Portal as the person using it, and Portal holds the single Sage Accounting connection.
Can it see every Sage Accounting record?
It sees what the signed-in user may see in Portal: a customer user sees their own account, and staff see what their role allows.
Keep going.
- Connect an AI agent to your ERP: overview
- B2B portal for Sage Accounting
- Automate order entry from email, Sage Accounting
- Take invoice payments online, Sage Accounting
- Give customers order status, Sage Accounting
- Build a B2B ordering portal, Sage Accounting
- Quotes customers accept online, Sage Accounting
- Triage a shared inbox, Sage Accounting
- Add approval workflows, Sage Accounting
- One REST API for your ERP, Sage Accounting
- Connect an AI agent to your ERP, Sage 100
- Connect an AI agent to your ERP, Sage 300
- Connect an AI agent to your ERP, Sage 50
- Connect an AI agent to your ERP, Sage 500
- Connect an AI agent to your ERP, Sage Intacct
- Connect an AI agent to your ERP, Sage X3
Sources
- Sage Accounting developer guide: differences between Accounting Start, Standard and Plus
- Sage Accounting developer guide: artefact statuses and quote conversion
- Sage Accounting developer guide: authentication and token lifetimes
- Sage Accounting developer guide: multi business and the lead business
- Sage Accounting developer guide: best practices and rate limits