Return Approval Closed-Loop: Bridging Seeyon A8+ Flow State and Kingdee Cloud Return Notice Audit with Qeasy
What This Strategy Solves
In a retail enterprise's return scenario, the business side needs a closed loop: Kingdee Cloud generates a return notice → Seeyon A8+ initiates a return-and-exchange approval form → once approved, Kingdee automatically audits the document. If the last step relies on a human logging into ERP and ticking "Audit", frontline finance staff must switch between two systems all day, and missed or delayed audits become the norm.
The core value of this strategy is to make "OA flow ended" automatically drive "ERP document audit". We use the Qeasy data integration platform as the carrier: the source side polls A8+ for flow state, the target side calls Kingdee Cloud's Audit interface, with no human in the loop.
Data Flow and Field Mapping
The overall flow is: Seeyon A8+ → Qeasy → Kingdee Cloud. The source performs a query, the target performs an audit execution.
| Stage | Key Field | Description |
|---|---|---|
| Source (Seeyon A8+) | templateCode | A8 flow template identifier, used to locate the return-and-exchange approval template |
| Source (Seeyon A8+) | workflowIdList | Flow instance intermediate scheme, identifies this specific return flow |
| Source (Seeyon A8+) | flow_state_string | Flow state value; this strategy watches the "ended" state |
| Middle Layer (Qeasy) | strategyId, order number | _autoFillResponse auto-fills, acting as a bridge between flow and document |
| Target (Kingdee Cloud) | FormId | Business document type, fixed as SAL_RETURNNOTICE in this scenario |
| Target (Kingdee Cloud) | Ids | Reverse-lookup FID via _findCollection using order number |
| Target (Kingdee Cloud) | InterationFlags / IgnoreInterationFlag | Audit interaction flags, commonly STK_InvCheckResult to control negative inventory check |
| Target (Kingdee Cloud) | NetworkCtrl / IsVerifyProcInst | Network throttling and process instance verification switches, enabled as needed |
There are two key design points. First, the order number is passed through from OA to Kingdee as the unique locator, avoiding inconsistent definitions between the two sides. Second, code mapping is maintained centrally in Qeasy — source fields do not land directly on the target, so later field changes or added validation bits only touch one place.
How to Configure in Qeasy
In the Qeasy data integration platform, this is a "source QUERY + target EXECUTE" composite strategy. Typical configuration points: pick Seeyon A8+ as the source with RESTful and a query action; pick Kingdee Cloud as the target with WebAPI and an execute action. The source reads the ended flow state, then passes the order number as context to the target's Ids expression, which reverse-looks up the Kingdee document FID and triggers Audit.
The source request's template ID and flow scheme ID are configured as constants, avoiding injection from outside on every call. The target's FormId (SAL_RETURNNOTICE) is a business constant, kept consistent with other return-related strategies for centralized maintenance in Qeasy later.
Implementation Steps
Step 1: first stabilize the prerequisite strategy that syncs Kingdee return notices to A8+ return-and-exchange approval forms, confirming the order number can be passed back reliably. Step 2: in Qeasy, configure this strategy's source — set high-frequency polling during business hours, e.g., every 2 minutes between 08:00 and 23:00 on weekdays, watching for the "flow ended" state. Step 3: configure the target — splice the order number into the _findCollection expression, query the FID, then call Audit; set InterationFlags and IgnoreInterationFlag per business requirements. Step 4: schedule orchestration in Qeasy — use a one-shot script for full trigger to backfill historical documents, while daily operations only run incremental, with new flow ends automatically closed by this strategy. Step 5: before going live, run a 30-minute window on a test ledger, confirming no duplicate audits and no missed audits, then cut over to production.
Lessons Learned
- State value misread. A8+ flow state is a string, and "ended" is not necessarily a fixed code. The safe approach is to make the state value configurable in Qeasy rather than hard-coding it in scripts.
- Order numbers inconsistent between OA and ERP. This is a classic pitfall. Always normalize by order number on the source side, then use _findCollection on the target to reverse-lookup — do not use the OA flow number directly as the ERP document number.
- Duplicate audits triggered. If the "ended" state is repeatedly pushed, audits will repeat. Recommend adding deduplication in Qeasy: the same order number is allowed only one Audit within the window, and failures go to alerts rather than auto-retry.
- Misconfigured InterationFlags causing audit failure. For example, STK_InvCheckResult may block in some inventory scenarios. The safe approach is to set IgnoreInterationFlag=true first to get things running, then open it up as the business requires.
- Network jitter in on-premise environments. Qeasy's polling and execution are naturally decoupled, so source failures don't pollute the target; but ensure the local intermediate database's connection pool is large enough to avoid filling up audit logs.
Suitable and Unsuitable Scenarios
Suitable for return, purchase, and reimbursement documents where both OA and ERP need to participate in approval and the flow end needs to write back to ERP state. Unsuitable for scenarios where flow state changes constantly and OA repeatedly sends things back for re-approval, or where neither side has a stable order number pass-through convention.