ml-connector
Sage X3Basware

Sage X3 and Basware integration

Sage X3 runs manufacturing and procurement. Basware runs accounts payable and e-invoicing. Connecting the two keeps purchase orders in sync with AP and ensures approved Basware invoices post into X3's general ledger without re-keying. New purchase orders from X3 flow into Basware for processing, and accepted invoices flow back into X3's GL with the correct cost centers and account codes. ml-connector handles the different authentication schemes on each side and keeps both systems aligned on a schedule you control.

How Sage X3 works

Sage X3 is an on-premise and cloud ERP that exposes purchase orders, supplier invoice records, GL accounts, cost centers, and suppliers through REST api1 or GraphQL endpoints. REST api1 uses HTTP Basic Authentication and publishes data with default page size of 20 records. GraphQL requires Connected Application OAuth2 bearer token authentication and is available in Sage X3 V12 or later. Access tokens expire in 5 minutes and refresh tokens are valid for 30 days. Sage X3 does not support outbound webhooks or event push notifications, so invoice records and purchase order changes are detected by polling with updatedDate and modifiedDateTime fields to find changes since the last sync.

How Basware works

Basware is an AP automation and e-invoicing platform deployed in four regional instances: EU, US, AU, and CA. It exposes purchase orders, purchase requisitions, accounting documents, vendors, and GL dimension mappings through REST APIs secured with OAuth2 client credentials. Network API calls require a unique X-BW-REQUEST-ID header (UUID v4 format) on every request. Basware supports push webhooks on purchase requisitions and exported purchase orders, but invoice reads and dimension lookups are pull-only and require polling. OAuth2 tokens default to 1 hour validity. Manual vendor or dimension edits in the Basware UI are overwritten on the next API import, so dimension syncing must happen via API calls.

What moves between them

Purchase orders flow from Sage X3 into Basware for AP processing and approval. Approved Basware accounting documents flow back into Sage X3 as GL journal entries, mapped to the X3 GL accounts and cost centers that match the supplier and product dimensions in Basware. Supplier master data and GL dimensions are aligned in both directions to ensure invoices land on valid X3 accounts. Because both systems are pull-only on the read side, ml-connector polls on a schedule aligned with your AP close cycle and purchase order frequency.

How ml-connector handles it

ml-connector stores credentials for both systems encrypted and routes Basware requests to the correct regional API base URL per customer (EU, US, AU, or CA). On the Sage X3 side it issues HTTP Basic or OAuth2 bearer tokens (refreshing the bearer token every 4 minutes to stay within the 5-minute expiry window) and polls for purchase order and invoice changes using the updatedDate filter. On the Basware side it generates a fresh UUID v4 for each Network API request as the X-BW-REQUEST-ID header and uses OAuth2 bearer tokens for the P2P API. Purchase order sync maps X3 product codes and supplier IDs to Basware purchase requisition line items. Invoice sync reads Basware accounting documents and creates GL entries in X3, allocating to the cost center from the Basware purchase order reference. Basware manual dimension edits in the UI are never overwritten because ml-connector syncs dimensions only to align GL allocations, not to import arbitrary Basware dimension changes. Retries follow exponential backoff when either system returns rate limits or transient errors.

A real-world example

A mid-sized distributor runs Sage X3 for inventory and procurement and uses Basware for AP automation and supplier e-invoicing across a European operation. Before the integration, procurement staff entered approved purchase orders from Basware manually into X3, and the AP team re-keyed matched invoices from Basware into X3 GL at month-end close, then reconciled supplier balances by hand. With X3 and Basware connected, each new purchase order flows into Basware automatically, moves through approval and matching, and approved invoices post into X3's GL with the correct cost center and GL account. The manual keying step is eliminated and month-end close begins with all invoice GL entries already recorded.

What you can do

  • Sync purchase orders from Sage X3 into Basware with supplier and product dimensions mapped correctly.
  • Read approved Basware invoices and post them into Sage X3 as GL journal entries allocated to the matching cost centers.
  • Map Basware GL dimensions and vendors back to Sage X3 accounts so invoice allocations land on valid GL codes.
  • Refresh Sage X3 OAuth2 bearer tokens every 4 minutes to avoid expiry, and generate a unique request ID for every Basware Network API call.
  • Poll on a schedule aligned with your purchase order and AP approval frequency, with full audit trails and error replay on every record.

Questions

How does ml-connector handle Sage X3 tokens that expire in just 5 minutes?
ml-connector refreshes X3 OAuth2 bearer tokens every 4 minutes to stay within the 5-minute expiry window and prevent mid-sync authentication failures. For REST api1 Basic Authentication, no token refresh is needed. The integration tracks refresh token validity (30 days) and surfaces alerts if a refresh token is about to expire so it can be renewed before the next sync run.
Does Basware's regional deployment require special setup?
Yes. Basware credentials are provisioned by the Basware delivery consultant to a specific region (EU, US, AU, or CA), and ml-connector routes all API calls to the matching regional base URL. The region must be confirmed during integration setup and is stored in the customer configuration so requests route automatically.
What happens if a Basware dimension is edited manually in the Basware UI?
Manual edits in the Basware UI are never overwritten by ml-connector because the integration syncs dimensions only to align GL allocations for invoices, not to import or enforce Basware dimension changes. Invoices are always posted to the GL account and cost center from the Basware purchase order reference, so manual dimension changes in Basware do not interfere with invoice posting into Sage X3.

Related integrations

Connect Sage X3 and Basware

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

Get started