ml-connector
Sage X3Toast

Sage X3 and Toast integration

Sage X3 runs finance and inventory for restaurants with multiple locations. Toast runs the point of sale, orders, and payments. Connecting the two keeps your GL in sync with daily sales and payments from the POS, eliminating manual journal entries and the cash reconciliation delays that come with them. Revenue and tips post into X3 on the business date they occurred, mapped to the correct GL accounts and sales categories, so month-end close starts with cash and sales already aligned.

How Sage X3 works

Sage X3 exposes suppliers, customers, purchase orders, sales invoices, GL accounts, and GL entries through REST api1 at a customer-specific server URL and port, and through GraphQL (Xtrem) for cloud deployments of V12 or later. Authentication is either HTTP Basic for REST legacy paths or OAuth2 client credentials for GraphQL, with access tokens expiring in 5 minutes. X3 does not support webhooks or outbound events, so all integrations pull data by polling against updatedDate and modifiedDateTime fields to detect changes since the last run. Server URLs, ports, and X3 folder names are unique per customer, and analytical dimensions on GL entries vary by configuration.

How Toast works

Toast exposes sales orders, checks, payments, employees, shifts, menu items, and configuration through REST APIs at https://ws-api.toasttab.com or a partner-provided environment hostname. Every request requires OAuth2 bearer token authentication via client credentials and the Toast-Restaurant-External-ID header with the location's restaurant GUID. Toast supports both webhooks for events like order_updated and stock changes, with HMAC-SHA256 signature verification, and polling for operations like payments and labor where webhooks are not available. Multi-location deployments require separate restaurant IDs per location. Voided orders are still returned and must be filtered out. Pagination uses cursor tokens for configuration APIs and fixed-size pages for orders, and reconciliation polling uses business date filters accounting for each location's configurable close-out hour.

What moves between them

The flow runs from Toast into Sage X3. Daily sales orders, checks, and payments from Toast are read via a combination of webhooks for real-time events and nightly reconciliation polls for each restaurant's business date, since Toast webhooks are not guaranteed. Itemized revenue by sales category and payment method is posted into X3's GL accounts and sales dimension accounts on the business date the transaction occurred. Menu items and service charges are mapped to X3 product and revenue GL dimensions so revenue lands on the correct accounts. Voided orders and fundraising items are filtered out before posting. The flow is one-way into X3; no write-back to Toast occurs.

How ml-connector handles it

ml-connector stores OAuth2 credentials for both sides encrypted and caches Toast bearer tokens to avoid re-authentication on every request, which would hit Toast's auth rate limit. It manages X3's 5-minute access token refresh by re-authenticating and storing the new token before the old one expires. For multi-location Toast deployments, it stores the restaurant GUID for each location and uses the correct Toast-Restaurant-External-ID header on every call. It polls Toast at the end of each business day using Toast's business date parameter, accounting for that location's configured close-out hour so transactions are dated correctly. Webhooks from Toast are processed in real-time when enabled, with HMAC-SHA256 signature verification, but nightly polling serves as a safety net since Toast webhooks are not guaranteed delivery. Voided orders, voided checks, and fundraising items flagged in selections are filtered out before posting revenue to X3. GL postings are batched by date and GL account to minimize journal entry line count. Every transaction carries a full audit trail with the original Toast order ID and receipt number so disputes can be traced back to the POS.

A real-world example

A fast-casual restaurant group runs Sage X3 for multi-location accounting and inventory control, and Toast for POS and order management across 12 locations. Before the integration, each location manager exported daily sales and payment reconciliation from Toast and sent it to the back office, where an accountant manually created GL journal entries to record the day's revenue and payments in X3. On busy days, reconciliation was delayed, and month-end close required 2-3 days of chasing exceptions between systems. With Toast and X3 connected, revenue and payment records from each POS post into X3 each morning, allocated to the correct GL accounts and sales categories by menu item. Cash reconciliation is instant, and the back office can close the books immediately after the last location's reconciliation pull.

What you can do

  • Read Toast sales orders, checks, and payments via webhook and nightly reconciliation poll, posting itemized revenue and payment records into Sage X3 GL on the correct business date.
  • Map Toast menu items, sales categories, and service charges to Sage X3 GL revenue accounts and product dimensions so every transaction lands on the correct account.
  • Handle multi-location Toast deployments by storing and using the correct restaurant ID per location on every API call.
  • Filter voided orders, voided checks, and fundraising items flagged in selections before posting revenue to X3, preventing reversals from appearing as duplicate entries.
  • Manage OAuth2 authentication on both sides, including X3's 5-minute token expiry and Toast's auth rate limit with token caching and nightly business-date accounting for Toast close-out hour.

Questions

How does the integration handle Toast's multi-location architecture?
ml-connector stores the Toast restaurant GUID for each location and includes the correct Toast-Restaurant-External-ID header on every API call. It reconciles each location's transactions independently at the end of that location's business day, accounting for that restaurant's configured close-out hour so transactions are dated correctly in X3. A single configured flow can sync all locations by iterating through the restaurant list on each poll cycle.
Which Toast transactions post to Sage X3 GL, and which are filtered out?
Sales orders, checks, and payments from Toast all post revenue and payment records into X3. Voided orders, voided checks, and transactions flagged as voided are filtered out. Fundraising items flagged in menu selections are excluded from net revenue. Service charges classified as gratuity are excluded from taxable sales. Discounts and payment method breakdowns are posted to their mapped GL accounts.
How does ml-connector reconcile Toast's webhook delivery limitations with accounting accuracy?
Toast webhooks push order and stock events in real-time when enabled, but Toast does not guarantee webhook delivery. ml-connector implements nightly reconciliation polling at the end of each business date as a safety net, using Toast's businessDate filter to retrieve all transactions for that day. If a webhook was missed during the day, the nightly poll will catch and post the transaction. Every transaction carries its Toast order ID and receipt number for full traceability back to the POS.

Related integrations

Connect Sage X3 and Toast

Free to use. Add your credentials, ping your real systems, and see if we fit.

Get started