ml-connector
Sage IntacctWooCommerce

Sage Intacct and WooCommerce integration

WooCommerce runs your online storefront. Sage Intacct runs your accounting. Connecting the two keeps your customer and transaction records in sync without re-entry. Customer records from WooCommerce become vendor records in Intacct, and order data flows into AP bills mapped to the correct GL accounts and dimensions. ml-connector handles the XML gateway authentication, session caching, and the structural differences between a commerce platform and an ERP.

How Sage Intacct works

Sage Intacct exposes vendors, AP bills, GL accounts, and dimensions through a single XML gateway endpoint at https://api.intacct.com/ia/xml/xmlgw.phtml. Authentication uses session-based credentials: senderId, senderPassword, companyId, userId, and userPassword are exchanged in an initial getAPISession call for a sessionid cached for 50 minutes. All operations POST as XML to the same gateway endpoint. HTTP responses are always 200 but may contain application-level errors in errormessage tags inside the XML body, and the XML parser must treat forbidden C0 control characters as schema violations and strip them before escaping entity references. Sage Intacct publishes no webhooks, so all data is retrieved by polling.

How WooCommerce works

WooCommerce is a self-hosted WordPress plugin that exposes orders, refunds, customers, products, and coupons through a REST API at https://<customer-domain>/wp-json/wc/v3/. Authentication uses API keys passed as HTTP Basic Auth, where the key pair is a Consumer Key and Consumer Secret. WooCommerce publishes webhooks on topics like order.created, order.updated, customer.created, and customer.updated, but webhooks are disabled after 5 consecutive non-2xx HTTP responses and must be manually re-enabled. WooCommerce has no native ERP features: it cannot store vendors, purchase orders, GL accounts, or accounting dimensions, so all of those concepts must be mapped from Intacct into the order and customer metadata that WooCommerce understands.

What moves between them

The main flow runs from WooCommerce into Sage Intacct. Customer records from WooCommerce trigger a sync that creates or updates vendor records in Intacct. Order records from WooCommerce are mapped into AP bills, with order line items becoming bill detail rows allocated to the GL accounts and cost centers specified in the flow configuration. Refunds are recorded as credit memos or negative bill amounts. The sync is triggered by WooCommerce webhooks when orders or customers change, and can also run on a schedule to catch any records missed if a webhook delivery failed.

How ml-connector handles it

ml-connector authenticates to Sage Intacct by caching the sessionid from getAPISession for up to 50 minutes, refreshing automatically when the session expires or a subsequent call indicates stale credentials. On the WooCommerce side, ml-connector authenticates with the API key pair over HTTP Basic Auth, listening for webhooks on order.created, order.updated, and customer.created. When a customer record arrives from WooCommerce, ml-connector constructs an Intacct VENDOR record with the customer name, email, and billing address mapped to vendor fields. When an order arrives, ml-connector constructs an APBILL with the order number as the bill number, the order date as the bill date, and order line items split across GL accounts based on product category or custom metadata. Before posting any XML to Intacct, ml-connector strips forbidden C0 control characters (preserving tab, newline, and carriage return) to ensure valid XML. All operations include a uniqueid flag for server-side deduplication, so a failed WooCommerce webhook can be retried without duplicating the bill or vendor. If a WooCommerce webhook fails after 5 attempts, an alert notifies the ops team to manually re-enable it in the WordPress admin panel.

A real-world example

A small manufacturing business sells custom parts through a WooCommerce storefront and manages vendor invoices and payments in Sage Intacct. Before the integration, the finance team manually entered customer names and order details into Intacct as vendor and bill records, a task that took 30 minutes per day and introduced re-entry errors. With Sage Intacct and WooCommerce connected, each new customer is automatically registered as a vendor, and each order flows into Intacct as a bill. The finance team approves and pays bills from within Intacct without leaving the system, and month-end reconciliation is faster because customer and order records are already in sync.

What you can do

  • Sync WooCommerce customers into Sage Intacct as vendor records with billing addresses and contact information.
  • Map WooCommerce orders into Intacct AP bills with line items allocated to GL accounts based on product category.
  • Handle Intacct session authentication and caching with automatic refresh after 50 minutes.
  • Strip forbidden XML control characters and use the uniqueid flag to deduplicate retried operations.
  • Receive WooCommerce webhooks on order and customer changes, with alerts if webhook delivery fails.

Questions

Which direction does data move between Sage Intacct and WooCommerce?
The main flow is WooCommerce into Sage Intacct. Customer records and orders flow into Intacct as vendors and AP bills. Reference data such as GL accounts and dimensions live in Intacct and are used to allocate bill line items. WooCommerce has no accounting features, so no data flows back from Intacct to WooCommerce.
How does ml-connector handle Sage Intacct's session-based authentication and XML requirement?
ml-connector calls getAPISession with your senderId, senderPassword, companyId, userId, and userPassword, and caches the returned sessionid for up to 50 minutes. On each subsequent call, ml-connector includes the cached sessionid. If Intacct rejects the sessionid, ml-connector refreshes it automatically. All operations are constructed as valid XML, with forbidden C0 control characters stripped before posting to the XML gateway endpoint.
What happens if a WooCommerce webhook fails to deliver?
ml-connector retries failed webhook deliveries with exponential backoff. After 5 consecutive non-2xx responses, WooCommerce disables the webhook automatically, and an alert is sent to your ops team so the webhook can be manually re-enabled in the WordPress admin panel. Each delivery attempt includes a uniqueid for deduplication on the Intacct side, so re-enablement will not duplicate records.

Related integrations

Connect Sage Intacct and WooCommerce

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

Get started