Qeasy Cloud
Get Started

Authoritative Tutorial: Kingdee Cloud Employee Position Query Interface Field Manual

· 谢锴斌· Engineering Best Practices· 8 views· 4 min read
JushuitanKingdee Cloud员工任岗executeBillQuery轻易云字段手册Incremental Sync

What This Interface Solves

In supply-chain integration between Jushuitan and Kingdee Cloud, the ownership of "people"—sales reps, document creators, handlers—must be aligned first. The Employee Position master data (BD_NEWSTAFF) in Kingdee Cloud records the assignment between employees and positions/organizations, serving as the source of truth for "salesperson" fields on sales orders and outbound documents. This interface lets us incrementally pull that master data in a standardized way, without touching Kingdee's back end, as the baseline for cross-system salesperson mapping.

Interface Capability Overview

  • Authentication: OAuth / account-set authorization under Kingdee Cloud's private deployment, managed uniformly in the Qeasy adapter's connection config, eliminating manual token stitching.
  • Request structure: POST /k3cloud/.../executeBillQuery, with form ID fixed to BD_NEWSTAFF; the body contains FilterString (default FAuditDate>='{{LAST_SYNC_TIME|dateTime}}'), Limit, StartRow, FormId, and optional conditions on FNumber, FSTAFFID, FName, FStaffNumber, FUseOrgId.FNumber, and F_POKM_ZZTXXSY.
  • Response structure: A two-dimensional table is returned; the row-level primary key is FSTAFFID. Base-data fields such as FUseOrgId are nested objects, and the actual value should be taken from FUseOrgId.FNumber.
  • Pagination / Incremental mode: Pagination via StartRow + Limit; increment by FAuditDate. Qeasy injects {{PAGINATION_START_ROW}} and {{PAGINATION_PAGE_SIZE}} into the request, and {{LAST_SYNC_TIME|dateTime}} into the filter, achieving a rolling sync every 5 minutes.

Typical Field Mapping

FieldTypeMeaningPractical Notes
FSTAFFIDstringEmployee Position primary key, basis for cross-system join and dedupmetadata.id must be set to this field, otherwise incremental dedup fails
FNumberstringBusiness codeCurrent metadata.number points to FName; recommend changing to FStaffNumber to avoid name conflicts
FNamestringEmployee name / display nameWatch encoding and whitespace for Chinese names; unify trim before cross-system comparison
FStaffNumberstringEmployee Position codeThe truly stable business identifier; primary key for Jushuitan salesperson mapping
FUseOrgId.FNumberstringUsing-organization codeIn multi-org setups, always take .FNumber; otherwise you get an object hash
F_POKM_ZZTXXSYstringSalesperson name in Zhizheng Tianxia (CRM)Third-party extension field used for CRM mapping; fallback to FName when empty

How to Configure on Qeasy

In the Qeasy Data Integration Platform, this interface is encapsulated as the "Kingdee Cloud – Employee Position Query" standard adapter. When creating a strategy, choose the QUERY type and set the target to "Write Empty Operation." The platform pre-fills parameters like StartRow, Limit, and FormId; you only need to confirm the primary key as FSTAFFID in metadata, and keep the FAuditDate>= incremental template in the filter. The field mapper automatically recognizes compound fields such as FUseOrgId and expands the .FNumber sub-node, then performs a one-to-one mapping to the Jushuitan salesperson field when pushing downstream. For scheduling, the platform provides a built-in 7:00–23:00 every-5-minutes template (3-59/5 7-23 * * *), which you can enable directly.

Cross-Scenario Practice Highlights

  1. Anchor on audit date for increment: FAuditDate fits increment better than FModifyDate, avoiding missed or duplicated records when documents are un-audited.
  2. Separate primary key and code: Use FSTAFFID as the primary key and FStaffNumber as the business code; only then will cross-system matching survive a name change.
  3. Take the sub-node on org fields: FUseOrgId must be read with .FNumber, otherwise downstream receives an unrecognizable object structure.
  4. Allow fallback for third-party extensions: F_POKM_ZZTXXSY is often empty; configure fallback to FName so the mapping chain does not break.
  5. Don't be greedy on page size: Kingdee private deployments cap rows per response; keep PAGINATION_PAGE_SIZE under 1000 to drastically reduce timeouts.
  6. Disable writes on pure-query strategies: Setting Target to "Write Empty Operation" is the standard pattern for this kind of strategy—produce data only, never write to target.

Pitfall Recap

  • Pitfall 1: Using modify date for increment. A retailer used FModifyDate as the increment anchor; after un-auditing a document, the master data reverted, causing the same row to be pulled repeatedly. The safe approach is to anchor on the audit date.
  • Pitfall 2: Mapping FUseOrgId directly as a string. It is a nested object in the response; Qeasy's field mapper will flag a type mismatch—common gotcha. Always expand the sub-field when mapping.
  • Pitfall 3: Scheduler gap crossing midnight. After writing the crontab as 3-59/5 7-23 * * *, the increment between 23:00 and 07:00 the next day is compensated in the first run, which can time out when volume is high. Evaluate whether a 24-hour schedule is needed based on volume.
  • Pitfall 4: Insufficient private account-set permissions. executeBillQuery requires metadata-read permission on the form; one project only granted business-object permission, not base-data permission, and the interface returned empty. Verify BD_NEWSTAFF metadata permission up front.
  • Pitfall 5: Naming variance on third-party extension fields. The POKM prefix maps to different third-party systems across customers; when reusing across projects, confirm the extension-field ownership before deciding on the mapping strategy.

When to Choose

This interface is the right pick when Jushuitan ↔ Kingdee Cloud supply-chain integration needs salesperson/creator mapping, cross-CRM personnel mapping, or an employee master-data baseline for sales/outbound documents. If your goal is to write into Kingdee or pull business documents themselves (rather than master data), switch to Kingdee's save-form interfaces or business-document query interfaces. For pure query scenarios, this interface is the stable, controllable first choice.

Original content. Please credit the source when reposting: https://www.qeasy.cloud/insights/engineering/hb-p2-357-0095

Comments