Qeasy Cloud
Get Started

Sales Order Sync from MES to Yonyou U8: A Single-Strategy Integration Tutorial

· 尹春锐· Integration Solutions· 6 views· 4 min read

What This Strategy Solves

In a supply chain integration project for a manufacturing enterprise, the sales order is the bridge connecting the front line: orders are entered in MES, and the order header and line details must quickly land in Yonyou U8 to drive finished-goods outbound, receivables, and planning. It looks like "just placing one order," but MES order numbers, customer codes, and inventory codes usually do not match U8's. Without proper mapping and a well-tuned trigger cadence, the numbers on both sides drift apart within a month or two. We use the Qeasy Data Integration Platform to host this MES → U8 sales order sync strategy and push orders from the source system in a stable way.

Data Flow and Field Mapping

The overall flow is: Source (MES WebAPI) → Qeasy middle layer → Target (Yonyou U8 sales order interface). The source side calls a common/search-style query API, paging through results (100 records per page) to pull order headers and lines; the target side invokes a U8 sales-order creation interface (such as XSDDAdd) and writes orders one by one.

Key field mapping:

SemanticSource fieldMiddle-layer handlingTarget field
Order numberbomNoPass-throughcSOCode
Order datecreateTimeFormatted to U8 datedDate
Customer codeMES customer codeLookup in mapping tablecCusCode
Business type—Constant fillcBusType (Normal Sales)
Auto-audit—Constant trueAutoAudit
Add type—Constant 0AddType
Line inventory/qtySource line itemsMapping + aggregationU8 line fields

The mapping dictionary is the lifeblood of this table. A common pattern among Qeasy customers is to maintain MES customer codes, inventory codes, and warehouse codes in one shared mapping table that downstream strategies can reuse, rather than writing a separate mapping inside every interface.

How to Configure on Qeasy

On the Qeasy Data Integration Platform, this strategy is represented as a single "integration strategy" card. Typical configuration points are:

  1. Source connector: Choose the MES platform. Pick common/search as the API, method POST, disable automatic model building, and fill in fields such as params, pageNum=1, pageSize=100. Enable idCheck and use bomNo as the dedup key.
  2. Target connector: Choose the U8 platform. Pick a sales-order API such as XSDDAdd, method POST, disable buildModel, and fill in fields like AddType, AutoAudit, cBusType, dDate, cSOCode, and cCusCode.
  3. Field mapping: Use variable expressions in the middle layer to reference source return values. For example, cSOCode = {{bomNo}}, dDate = {{createTime}} formatted to U8 requirements. Customer codes go through a lookup component: hit the mapping table first, then write to U8; misses go to an exception queue for manual mapping.
  4. Dedup and idempotency: Use source bomNo as the business key in the middle layer to deduplicate and prevent duplicate order creation.
  5. Exception handling: Orders that fail to land in U8 enter a retry queue; after exceeding the limit, they go to manual handling. The unified log dashboard in Qeasy lets you pinpoint exactly which line is stuck.

Implementation Steps

We usually recommend a three-stage rollout: "get it running, then stress-test, then put it into normal operation."

  1. Preparation: Check whether MES and U8 master data for customers, inventory, and warehouses have already been synced (this typically depends on an earlier "material sync" strategy in the same plan); prepare the mapping table and confirm that bomNo is reliably returned in pagination.
  2. Incremental starting point: On go-live day, take a specific timestamp as the watermark. First, run a one-time full backfill for historical orders; then switch to incremental mode, pulling by the source update time window.
  3. Schedule frequency: In production, set source polling to */7 7-22 * * * (every 7 minutes during business hours) and target writing to 2-59/7 7-22 * * *, offset by half a beat to avoid the next source poll firing before the previous U8 write completes.
  4. Go-live verification: During the first week after launch, reconcile daily—compare U8 order totals and amounts with MES—and trace every exception through Qeasy logs.
  5. Steady state: Once the reconciliation difference drops below the threshold, switch to weekly spot-checks.

Lessons Learned

This strategy looks like just "one order," but there are several places where it tends to fail in practice:

  1. Typical mistake: treating source bomNo as a line-item number. It is actually an order header number. If you use it to deduplicate line items, lines from the same order will collapse together. The safer approach is to dedupe in the middle layer using a composite key of "order number + line number."
  2. Passing customer codes through directly. MES and U8 customer primary keys follow different rules; without a mapping, collisions are inevitable. A common Qeasy customer pattern is to centralize mappings in a dictionary table, requiring any new customer to be mapped before orders are placed.
  3. Leaving AutoAudit=true on by default. It feels convenient, but once a sales order is auto-audited, downstream processes begin preparation immediately. If upstream data is wrong, fixing it becomes costly. The safer path is to keep it false for the first two weeks and only enable it after the data is confirmed stable.
  4. Schedule collisions causing missed orders. When source polling and target writing share the same cadence and U8 writes are slow, the next source round may already have paged forward with no buffering. The recommended pattern is to offset the two schedules and let the middle layer provide message backpressure.
  5. Missing the last pagination page. With pageSize=100 and a pageNum loop, the final page with fewer than 100 records is easy to mistake as "no data." The robust approach is to compute total pages strictly based on the returned total count, and only stop paging once pageNum exceeds it.

Applicable and Non-Applicable Scenarios

Applicable: Single organization, daily order volume at the ten-thousand level or below, relatively stable encoding systems between MES and U8, and sales order sync that does not require cross-legal-entity handling. Not applicable: Multi-organization distribution, orders that need manual review and approval before landing in U8, or complex distribution scenarios where a single order must be split into multiple U8 documents.

Boundary Notes (Supplement)

If MES-side orders are still being revised frequently, it is recommended to filter for "approved" orders using a status field before syncing, so that invalid orders do not impact U8.

Original content. Please credit the source when reposting: https://www.qeasy.cloud/insights/solutions/strat-mes-web-u8-0201-mes-u8u8-0301633c

Comments