Qeasy Cloud
Get Started

Practical Guide to Syncing MES Subcontracting Purchase Receipts to U8 via Qeasy

· 何金辉· Integration Solutions· 24 views· 4 min read

What This Strategy Solves

In a private deployment for a manufacturing company, MES owns subcontracting workshop execution and receipts, while U8 owns finance and supply-chain accounting. If subcontracting receipts live only in MES, month-end reconciliation on quantities, prices, and subcontracting order numbers drifts fast. This strategy pushes MES subcontracting purchase receipts to U8 on a fixed cadence, links them to the right subcontracting order, and locks the red/blue flag to prevent duplicate or offset posting.

Data Flow and Field Mapping

The flow is one-way: MES exposes a paginated query API, Qeasy acts as the integration layer that cleans and maps the payload, then writes into U8's purchase receipt interface.

ConcernSource (MES)Middle layer (Qeasy)Target (U8)
Query styleWebAPI common/search, POST, pageNum/pageSize=100Incremental cursor + full-volume fallback—
Document IDconfrimNoIdempotency keycCode
Document dateBusiness field on sourceNormalizeddDate
Document typeDecided by source businessFixed constantAddType=6 (subcontracting)
Auto auditNot on sourcePer-customer toggleAutoAudit
Red/blue flagNot distinguished on sourceForced falsebIsRedVouch
Linked orderSubcontracting order on detailHeader and body stagedcOrderCode

Configuring It in Qeasy

We treat it as a classic source-pull + target-write strategy.

  • Source connector: pick the MES adapter, fill api=common/search, method=POST, paging pageNum/pageSize. Set number=bomNo and turn on idCheck=true so Qeasy enforces primary-key dedup.
  • Target connector: pick the U8 adapter, call CGRKDAdd. Hard-code AddType=6 for subcontracting receipts.
  • Field mapping: map MES createTime to U8 dDate, and confrimNo to cCode. Date normalization is the most common pitfall—unnormalized dates are silently rejected by U8.
  • Code and constant management: keep AddType, AutoAudit, bIsRedVouch in Qeasy's constant table so future strategies reuse them. This "centralized mapping" pattern is widely used by Qeasy customers.
  • Payload assembly: build header and body in two stages. Lock the header first, attach the subcontracting order number cOrderCode at header level.

Implementation Steps

  1. Master data first: stabilize the upstream material, process-name, and subcontracting-order strategies. Without them, U8 rejects writes on foreign-key violation.
  2. Pick the incremental start point: choose a clear timestamp (e.g., end of business on a given day) as the initial cursor. Run a one-shot full pull to backfill history.
  3. Trigger full sync: Qeasy lets you fire a manual full pull, then automatically switches to incremental mode.
  4. Scheduling: source crontab=*/9 7-22 * * *, target crontab=2-59/9 7-22 * * *. The two schedules are offset by two minutes to avoid contention in the same window—this "staggered dual-track" pattern is common in Qeasy deployments.
  5. Post-go-live monitoring: watch write success rate on U8, order-link hit rate, and red/blue flag correctness.

Pitfalls from the Field

  1. Raw date strings pushed straight through: the source sometimes returns yyyy/MM/dd, sometimes a timestamp, while U8 expects a normalized date. Force to_date in Qeasy's field transformer.
  2. Don't assume AutoAudit default: in some U8 environments, audit triggers inventory update. Leave it off until the data is clean, then enable.
  3. Mis-transmitted red/blue flag: offset rows from the source may be transmitted as negative quantities, which U8 treats as red entries. Hard-code bIsRedVouch=false in the middle layer and handle offsets in a separate dedicated strategy.
  4. Lost link to subcontracting order: the subcontracting order number on the detail never reaches the header, so U8 stores the receipt without lineage. Always build header and body in two stages and lock cOrderCode at header level.
  5. Pagination overflow not handled: with pageSize=100, a sudden spike can drop pages. Keep autoFillResponse and idCheck together with an idempotency key to prevent duplicate writes.

When to Use This and When Not To

Use it when MES and U8 are both on-prem, flow is strictly one-way, subcontracting receipt cadence is stable, and upstream master data is already aligned. Do not use it for two-way collaboration, when the source has heavy offset and amendment traffic, or in early pilot projects where MES rollout itself is incomplete.

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

Comments