ml-connector
Sage X3UPS

Sage X3 and UPS integration

Sage X3 manages your orders and inventory. UPS manages your shipments. Connecting the two keeps your fulfillment pipeline synchronized and transparent. Sales orders and purchase orders in Sage X3 flow into UPS as shipments, where they are rated and dispatched, and tracking events flow back to Sage X3 so you see delivery status and exceptions in the same system where the order lives.

How Sage X3 works

Sage X3 is an on-premise and cloud ERP that covers finance, procurement, inventory, manufacturing, and project management. It exposes purchase orders, sales invoices, customers, suppliers, and inventory items through a REST API (api1) with HTTP Basic Authentication, or through GraphQL (Xtrem) with OAuth2 Client Credentials. Sage X3 publishes no native webhooks or event push notifications, so orders and shipments are discovered by polling, using the updatedDate or modifiedDateTime fields on records to detect changes since the last poll. The REST api1 endpoint requires a customer-specific server URL and port, and GraphQL (Xtrem) is available on Sage X3 V12 or later. Access tokens expire in 5 minutes, and refresh tokens are valid for 30 days.

How UPS works

UPS provides a REST API for shipment creation, rating, tracking, address validation, and pickup scheduling. Authentication is OAuth 2.0 Client Credentials, with a client_id, client_secret, and optional x-merchant-id header for account identification. Tokens are valid for approximately 4 hours, with a limit of approximately 250 token requests per day. UPS supports both webhook delivery via the Track Alert API, which can monitor up to 100 tracking numbers per subscription with a 14-day validity window, and polling via Quantum View, a subscription-based shipment visibility feed. UPS has no billing or invoice API, and XML/SOAP legacy authentication was decommissioned on June 3, 2024, making OAuth 2.0 mandatory.

What moves between them

Sales orders and purchase orders flow from Sage X3 into UPS as shipments. ml-connector reads the purchase orders and sales orders from Sage X3 on a schedule tied to your fulfillment cycle, creates shipments in UPS with address and line-item detail, and retrieves shipment ratings and carrier options. Tracking events and delivery status flow back from UPS into Sage X3, where they update the order status and exception flags. Because Sage X3 does not support webhooks, ml-connector polls Sage X3 for order changes every cycle; UPS tracking events are pushed via Track Alert subscriptions when available, falling back to Quantum View polling when needed.

How ml-connector handles it

ml-connector stores Sage X3 credentials (server URL, port, folder, client ID and secret, or Basic credentials) and UPS OAuth2 credentials (client_id, client_secret, merchant_id) both encrypted. On the Sage X3 side, it polls the purchase order and sales order entities every sync cycle, checking the updatedDate field to discover new or changed orders since the last run. For each new order, it transforms the ship-to customer address, line items, and weight into a UPS shipment create request, handling both weight-based and dimension-based rating. ml-connector then subscribes to UPS Track Alerts for the shipment tracking number, with renewal every 13 days to stay ahead of the 14-day expiry window. As delivery milestones arrive, UPS pushes tracking events to ml-connector, which maps them back to the original Sage X3 order and updates the order status and delivery exception flags. If Track Alert subscriptions are unavailable, ml-connector falls back to polling the Quantum View feed. Rate limiting is handled per UPS OAuth token endpoint restrictions, and re-authentication happens before token expiry.

A real-world example

A mid-market distributor runs Sage X3 for inventory management and order processing across three warehouses. Shipments are currently created in UPS by hand, with shipping staff re-entering customer addresses and line item weights from Sage X3 orders into the UPS website, and then re-entering tracking numbers back into Sage X3 when packages are dispatched. With Sage X3 and UPS connected, each new order in Sage X3 flows automatically into UPS as a shipment, rated and picked up on schedule, and tracking updates push back to Sage X3 so the order fulfillment team and customers can see status without manual lookups or re-keying.

What you can do

  • Read sales orders and purchase orders from Sage X3 on a scheduled poll cycle and create shipments in UPS.
  • Transform Sage X3 order addresses, line items, and weights into UPS shipment requests with dimension and weight rating.
  • Subscribe to UPS Track Alert webhooks for shipment tracking events and update order status in Sage X3 as packages move.
  • Authenticate Sage X3 with OAuth2 or HTTP Basic Authentication and UPS with OAuth 2.0 Client Credentials.
  • Handle polling for order discovery in Sage X3 and webhook or polling-based tracking subscriptions in UPS with automatic token renewal and expiry management.

Questions

How does the integration handle Sage X3 having no webhooks while UPS has Track Alert webhooks?
ml-connector polls Sage X3 for new and updated purchase orders and sales orders on a schedule you define, using the updatedDate field to detect changes efficiently. For UPS tracking, ml-connector uses Track Alert subscriptions to receive shipment events as webhooks, which is more efficient than polling Quantum View. If Track Alert is unavailable, ml-connector falls back to polling Quantum View instead.
What authentication credentials does the integration require on each side?
Sage X3 requires either OAuth2 credentials (client_id, client_secret for GraphQL/Xtrem) or HTTP Basic Authentication (username, password for REST api1), plus the server URL and port specific to your instance. UPS requires OAuth2 Client Credentials (client_id, client_secret) and optionally a merchant ID (x-merchant-id header) to scope billing to a specific account.
What order details are transformed into UPS shipments?
ml-connector reads the ship-to address, recipient name and contact, line items with quantities, and package weight or dimensions from Sage X3 orders. These are mapped into UPS shipment create requests, which UPS uses to calculate rates, select a carrier, and assign a tracking number. ml-connector then stores that tracking number and subscribes to delivery milestones.

Related integrations

Connect Sage X3 and UPS

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

Get started