Reply Delivery Date Write-Back in Practice: A Single-Strategy Rollout for MOM Sales Orders into Kingdee Cloud Cosmos
What This Strategy Solves (Scenario and Value)
In factories where MOM (Manufacturing Operations Management) coexists with Kingdee Cloud Cosmos, the real promise date for a sales order is calculated by Kingdee's production/procurement chain, not by MOM. Sales reps sit in MOM, so the computed date has to be written back onto the MOM sales order so the rep can answer the customer from one screen.
The strategy we rolled out on the customer site is a very narrow one: do not move the whole order around, only write back the delivery date that Kingdee Cloud Cosmos has already produced, by calling the F_DATESYNC API.
The value of isolating this into its own strategy is that it turns "promise date reply" from manual Excel exports and chat screenshots into a schedulable, traceable, rerunnable flow. A one-time effort, ongoing savings.
Data Flow and Field Mapping (Source -> Middle Layer -> Target)
The flow has two legs. The first leg is a query inside Qeasy that produces the input for the write-back. The second leg is the actual write-back call to Kingdee Cloud Cosmos F_DATESYNC.
| Role | System / Platform | Key Field | Description |
|---|---|---|---|
| Source (query) | Qeasy integration platform | FBillNo (bill number) | Used to locate the sales order in Kingdee Cloud Cosmos |
| Source (query) | Qeasy integration platform | formId (form ID) | Distinguishes sales order, production order, etc. |
| Source (query) | Qeasy integration platform | rowsid (row ID) | Pinpoints the exact line to avoid overwriting the whole order |
| Target (write-back) | Kingdee Cloud Cosmos | FormId | Assembled from FBillNo + formId as the request parameter |
| Target (write-back) | Kingdee Cloud Cosmos | rowsid | Uniquely identifies the line to write back |
| Target (write-back) | Kingdee Cloud Cosmos | F_DATESYNC (API) | Executes the delivery date write-back |
Notice that formId and rowsid appear on both sides, but with different semantics: on the source side they are "the identifiers I will look up by", on the target side they are "the parameters I will write with". The middle layer uses a template expression to assemble them into a Kingdee Cloud Cosmos JSON body, similar to _function CONCAT('{"JSON": {"formId": "','{{formId}}','","model": [{"rowsid": "','{{rowsid}}','"}]}}').
How to Configure It on Qeasy
On the Qeasy data integration platform, this strategy is split into two WebAPI nodes on the same flow:
-
Source node (no-op query, effect=QUERY)
- Platform: Qeasy itself.
- Role: not a real external query, it acts as a "parameter source node" that exposes the FBillNo / formId / rowsid of the orders we want to write back, so the next step can reference them.
- autoFillResponse is set to true, so downstream nodes can reference the fields directly via
{{field}}.
-
Target node (effect=EXECUTE)
- Platform: Kingdee Cloud Cosmos.
- Role: calls F_DATESYNC, taking the formId / rowsid from the previous node and assembling the request body, completing the write-back.
- The
_function CONCAT(...)in the request body is the Qeasy expression template; it interpolates the context variables at runtime.
-
Linkage
- The source node's response fields (FBillNo / formId / rowsid) feed straight into the target node's request fields, no custom script glue needed.
-
Idempotency in metadata
- The target node uses number and id for idempotency (idCheck=true), so reruns do not produce duplicate write-backs.
Implementation Steps (Phased Scheduling: Incremental Start / Full Trigger / Frequency)
The rollout cadence we agreed with the customer is in three stages:
Stage 1: Align the incremental start point
- Before the first go-live, confirm with the customer's IT the "incremental start": from which day onward, only sales order lines that have actually changed get written back.
- In Qeasy, add
modify_time >= incremental_startto the source node's query, run it manually first, and reconcile the numbers on both sides.
Stage 2: One cold-start full trigger
- After the incremental reconciliation is clean, widen the time range and do one full write-back to top up all historical un-answered orders.
- This round must not be put on a schedule yet. Trigger it manually and watch the logs for success rate and abnormal orders.
Stage 3: Attach the schedule, run in steady state
- After the full run is clean, switch to steady state: the target node runs at
*/2 * * * *(every 2 minutes). - The source query node runs at
1 1 1 1 1(1:01 AM on the 1st of every month) as a backstop full-reconciliation trigger, not the main path, just a monthly safety net. - After one to two weeks, fine-tune: high-frequency nodes tighten to every 2 minutes, low-frequency ones relax to hourly, based on actual backlog.
Pitfalls We Have Hit
-
Wrong type for formId formId for sales order, production order and purchase order in Kingdee Cloud Cosmos are different strings. If formId is declared as a number in Qeasy, the serializer drops the quotes and the API rejects the parameter. Safe rule: formId and rowsid are always declared as string, never int for convenience.
-
Confusing whole-order vs single-line write-back Classic mistake: rowsid is omitted because "I only want one line", and the whole order's delivery dates get rewritten. Always carry rowsid, and at least one test case must cover "change only one line, all other lines keep their original date".
-
Misreading effect=QUERY on the source node as "query a database" In this strategy the source node is internal to Qeasy, it does not hit MySQL. Its job is only to organise the context variables. Newcomers tend to add a pile of request parameters here, which then interferes with the template assembly.
-
Treating a string like JSON when assembling the template If the template forgets the quotes around
{{formId}}, the runtime output is invalid JSON. Kingdee Cloud Cosmos may still return 200, but the write-back silently does nothing, and the debugging cost is huge. Quote every placeholder, and eyeball the request body preview in Qeasy once before saving. -
Schedule frequency does not match business volume
*/2 * * * *is reasonable for a normal factory. For a customer that just went live with a lot of historical backlog, a 2-minute cadence can pile up and time out. Safe approach: start the first week at 10 minutes, then tighten to 2 minutes as the backlog drains.
When to Use and When Not to Use
Use when: MOM and Kingdee Cloud Cosmos coexist, sales orders must stay consistent on the promise date across both systems, the date is computed by Kingdee's production/procurement chain and needs to be reflected in MOM, and the write-back granularity is line-level.
Do not use when: you actually need the whole sales order (header + lines) synchronised, because this strategy does not move order master data, it only handles the delivery date write-back; or when the target environment does not expose the Kingdee Cloud Cosmos F_DATESYNC API.