Authoritative Tutorial on the Kingdee Cloud Customer Contact Query API Field Manual
What Problem This API Solves
In retail, wholesale, and service industries, customer contacts are scattered across CRM systems (e.g., Xiaoman OKKICRM) and ERP systems (Kingdee Cloud). We need a unified "contact archive" on both sides: pull contact master data from Kingdee incrementally into the CRM, or vice versa to reconcile contacts between CRM and ERP. This API is purpose-built for that scenario. It uses Kingdee's executeBillQuery WebAPI to fetch BD_CommonContact (Common Contact) master data in pages, filtered incrementally by approval date, providing a data foundation for subsequent sync, reconciliation, and relationship maintenance.
API Capability Overview
- System: Kingdee Cloud (Kingdee.Cloud), master data domain.
- Endpoint:
executeBillQueryWebAPI (POST). - Form ID:
BD_CommonContact(Common Contact). - Request parameters: Limit (page size), StartRow (start row), TopRowCount (total row count, default 0), FilterString (filter condition), FieldKeys (returned field set), FormId (fixed as
BD_CommonContact). - Response structure: Kingdee standard ListView containing rows whose columns are defined by FieldKeys.
- Pagination: classic StartRow + Limit pagination, driven by
{{PAGINATION_START_ROW}}and{{PAGINATION_PAGE_SIZE}}placeholders. - Incremental mode: default filter
FApproveDate >= '{{LAST_SYNC_TIME|dateTime}}', scheduled every 10 minutes during working hours 08:00–20:00. - Strategy type: QUERY_ONLY, Target side is a "null write operation", pure query.
Typical Field Mapping
| Field | Type | Meaning | Practical Notes |
|---|---|---|---|
| FCUSTID | string | Kingdee internal primary key, unique contact identifier | configured as the id field in metadata; critical for cross-system primary key reconciliation |
| FNumber | string | Contact business code | configured as the number field; the stable anchor for cross-system mapping |
| FName | string | Contact name | main display field on CRM side |
| FCreateOrgId_FNumber | string | Creating organization code | distinguishes originator in multi-org scenarios |
| FUseOrgId_FNumber | string | Using organization code | actual owning organization; may differ from creator |
| FDescription | string | Remark / description | often empty; length typically ≤ 200 |
| FIsTrade | string | Whether a trading customer | True/False or 1/0; can be filtered out per business rules |
| FCustTypeId_FNumber | string | Related customer category code | comes from the related customer, not the contact itself |
| FGroup_FNumber / FGroup_FName | string | Customer group code / name | supports tree hierarchy; use code for cross-system mapping |
| FSALDEPTID_FNumber | string | Sales department code | used for performance attribution |
| FSELLER_FNumber | string | Salesperson code | used for binding contact owner in CRM |
| FCURRENCYID_FNumber | string | Currency code | comes from related customer; pay attention in multi-currency scenarios |
How to Configure on Qeasy
On the Qeasy Data Integration Platform, this API is wrapped as a "Query Strategy" template within the Kingdee Cloud adapter. Configuration typically follows these steps:
- Select source: Kingdee Cloud, pick the
executeBillQueryadapter. - Set FormId:
BD_CommonContact; the platform prefills the default field set. - Choose FieldKeys: in Qeasy's field mapper, tick the fields you need; the platform automatically assembles them into the
FieldKeysrequest body. - Configure FilterString: the default template already includes
FApproveDateincremental filtering; replace it with the platform's{{LAST_SYNC_TIME|dateTime}}placeholder. - Set pagination: bind StartRow and Limit to
{{PAGINATION_START_ROW}}and{{PAGINATION_PAGE_SIZE}}respectively; the Qeasy scheduler auto-paginates until an empty result is returned. - Target side: select "null write operation"; this strategy only produces a data snapshot, no real target write.
- Scheduling: crontab
*/10 8-20 * * *, pulls every 10 minutes during working hours.
Cross-Solution Practical Tips
- Use FNumber as the anchor for cross-system reconciliation: FCUSTID is Kingdee's internal primary key and may break after migration; FNumber as a business code is more stable.
- Prefer approval date over modification date for incremental filtering:
FApproveDatebetter reflects business-effective state thanFModifyDate, avoiding "draft-state" contacts. - Always carry UseOrgId in multi-org scenarios: different using orgs see different contact lists; omitting it leads to missing data.
- Pull both code and name for FGroup: code is stable but not human-readable; name is readable but mutable; combining both gives stability and debuggability.
- Don't be greedy on page size: oversized pages often time out in Kingdee WebAPI; PageSize around 500–1000 is safer in real projects.
- Don't accidentally turn null-write into a real target: this strategy is a "query snapshot"; attaching a real target write causes duplicate landings.
Pitfall Recap
- FilterString time format issue: Kingdee expects
yyyy-MM-dd HH:mm:ss; UTC or timezone-bearing ISO strings return empty results. The safe approach is to use the Qeasy variable{{LAST_SYNC_TIME|dateTime}}which is uniformly formatted by the platform. - Related customer filter confusion: contacts have no direct "customer code" field;
FCustTypeId,FGroup, etc., come through relationships. To filter contacts under a specific customer, use aFCUSTID IN (...)subquery in FilterString rather than a directFCUST='xxx'. - Pagination infinite loop: when StartRow is out of range, some Kingdee versions return empty while others return errors. Qeasy auto-detects termination via row count, but if a custom script treats empty results as exceptions, it falls into a loop.
- FIsTrade type drift: across Kingdee versions we have seen
true/false,1/0,True/False; the integration layer must normalize. - FName encoding in multilingual environments: when the customer switches to Traditional Chinese or English, FName may contain emoji or fullwidth characters; CRM ingestion must validate UTF-8 to avoid mojibake.
When to Use It
Best suited for unidirectional pull, reconciliation, or mirroring of customer contacts between CRM and Kingdee Cloud — scenarios such as CRM contact archive enrichment, ERP contact change notifications, and contact–customer relationship rebuilding. Not suitable for writing contacts back into Kingdee, bidirectional real-time sync (which requires a paired write strategy), or contact integration with non-Kingdee ERP systems.