Pushing Kingdee Payment Vouchers to DingTalk Group: A Single Strategy for Finance Notifications
What This Strategy Solves
In one retail group's shared finance center, payment vouchers are approved in Kingdee Cloud Cosmic, and downstream business units, vendor contacts, and regional finance leads rely on someone manually pinging the right DingTalk group. That routine is easy to miss and easy to misdirect. The on-site requirement was simple: once a payment voucher is approved, automatically push the key fields—document number, amount, payer, payee, and description—into the matching group's custom bot. We delivered this as a single lightweight strategy on the Qeasy data integration platform: a Kingdee status event triggers a payload, the platform assembles it, and a DingTalk group bot receives a text card. Nothing is persisted in the middle layer, so storage cost is negligible. It is a textbook event-to-message integration.
Data Flow and Field Mapping
The flow is strictly one-way: Kingdee Cloud Cosmic (voucher approved event) → Qeasy integration platform (intermediate layer for cleaning and assembly) → DingTalk group custom bot (receives a JSON text card).
The intermediate layer does not persist business data; assembly happens in memory. The table below captures the most important fields. In practice, we recommend placing mappings in Qeasy's centralized mapping management so the rules are not scattered across strategies.
| Business meaning | Kingdee source field | Intermediate handling | DingTalk target field |
|---|---|---|---|
| Document number | FBillNo | Pass-through | Card title prefix "Payment Voucher" |
| Approval status | FDocumentStatus | Enum to label (Approved/Pending) | First line of card body |
| Payment amount | FPayAmount | Two decimals, thousands separator | Bold line in card body |
| Payee | FReceiver.Name | Matched against vendor master | One line in card body |
| Description | FDescription | Truncate to 60 chars | Tail of card body |
| Trigger time | FAuditTime | Format yyyy-MM-dd HH:mm | Card footer |
| Target group | Business department on header | Routed via bot webhook config | Resolved webhook URL |
Note the lightweight department-to-bot routing: the business department on the voucher header decides which group receives the notification. New departments only require a new entry in the mapping table; the strategy itself does not change.
How to Configure on Qeasy
Step one, create a strategy in Qeasy with Kingdee Cloud Cosmic as the source and DingTalk as the target, choosing "event trigger + message push." Configure the trigger on the voucher status transition from Created to Approved. Do not use scheduled polling—approval timing is unpredictable, and polling duplicates or misses events.
Step two, build field mappings. Most Kingdee fields can be read directly. The real work is three things: amount formatting, enum localization, and description truncation. Qeasy's field mapping node has built-in string functions for these. Existing scripts from prior projects can be migrated as-is.
Step three, configure the DingTalk group custom bot. Strongly recommend storing webhook URLs in Qeasy's centralized credential vault instead of hardcoding them in scripts. When DingTalk updates its signing scheme, only one place needs editing. Store the signing secret alongside the URL and let the platform attach it to the request header at push time.
Step four, handle failures. DingTalk bots occasionally return 4xx due to transient network issues. In Qeasy, configure retries as "up to 3 attempts, 30 seconds apart." After three failures, route to the platform's built-in alert channel rather than blocking upstream approval—the approval already happened in Kingdee; the notification is just a notification.
Implementation Steps
We run this in three phases on-site.
Phase one, baseline rehearsal with a full pull: in Qeasy, manually pick a batch of vouchers approved yesterday and run the strategy once. Compare each card received in the DingTalk group against the source record, checking for truncated or misplaced fields. The goal is not to send real messages but to exercise every edge case in the mapping table: zero amounts, empty payee, oversized descriptions, and so on.
Phase two, switch to incremental mode. Set the increment start point to "vouchers approved after midnight of the rehearsal day" and let the strategy enter observation. Qeasy's event source continuously pulls increments from Kingdee's status change stream without manual intervention.
Phase three, define scheduling and on-call conventions. Pure event-to-message strategies usually have no fixed crontab, but we recommend attaching a 5-minute heartbeat check in Qeasy. The heartbeat does not resend messages; it checks whether any events from the previous window were missed and, if so, pushes them and logs the catch-up. This has proven reliable across multiple customer sites and protects against occasional status stream delays on the Kingdee side.
Lessons Learned
Pitfall one: hardcoding webhooks in scripts. We saw this in a manufacturing project—DingTalk upgraded its signing scheme overnight and every strategy failed simultaneously. The safe pattern is to keep webhooks and signing secrets in Qeasy's credential vault.
Pitfall two: replacing event triggers with scheduled polling. A typical mistake is "pull approved vouchers every 5 minutes," which results in duplicate pushes because the status field does not distinguish first approval from subsequent reads. The event source from Kingdee's status change stream is the correct answer.
Pitfall three: not truncating descriptions. DingTalk group bot cards have body length limits. Long descriptions either get cut into garbled text or fail the entire send. Force truncation to 60 characters with an ellipsis at the mapping node.
Pitfall four: inconsistent amount formatting. Kingdee fields sometimes carry currency symbols, sometimes not; precision varies between documents. Centralize the format at the mapping node—two decimals, thousands separator—so downstream reports stay clean.
Pitfall five: tying push failures to upstream approval. This is the most common rookie error—coupling DingTalk push failure back to the Kingdee approval flow. Event-style integration is, by nature, notification; failed notifications should not roll back business transactions. Qeasy defaults to asynchronous push plus independent alerts; do not manually switch to synchronous blocking.
When to Use and When Not to Use
Use this pattern for approval results, status changes, and key document milestones—an event-to-notification scenario where stakeholders prefer to subscribe in a DingTalk group rather than log in to a system. Suitable when push volume is bounded between a few dozen and a few hundred per day. Do not use it when you need acknowledgments, dual writes, or downstream artifact generation such as accounting entries or reports; those need a full data sync pipeline from Kingdee through Qeasy into a target business system, not a group message.