Qeasy Cloud
Get Started

Kingdee Cloud Xingchen V2 Customer Query API: A Field Manual & Practical Tutorial on Qeasy Cloud

· 高金凤· Engineering Best Practices· 7 views· 5 min read

What This API Solves

In retail and supply-chain integration, customer master data is the foundation for sales orders, outbound shipments, and receivables. The /jdy/v2/bd/customer endpoint retrieves customer records from Kingdee Cloud Xingchen ERP by modification time range. Across multiple projects we treat it as the upstream source of truth for syncing WDT (Wangdiantong) members and mapping customers in downstream documents.

Interface Capabilities Overview

  • Auth: Kingdee Cloud Xingchen V2 OpenAPI, Access Token + business-domain scoped headers.
  • Method & Path: GET /jdy/v2/bd/customer.
  • Filters: modify_start_time, modify_end_time in millisecond timestamps for incremental windows.
  • Pagination: page (default 1), page_size (default 50).
  • Detail endpoint: /jdy/v2/bd/customer_detail for second-level lookups by id.
  • Response: list-shaped payload; each record carries id (PK), number (code), name, and extensible invoicing/banking/address/organization fields.
  • Strategy type: QUERY_ONLY — no write-back; configure Target as a no-op.
  • Incremental mode: incremental pull anchored on modify_time, scheduled by crontab such as */35 * * * *.

Typical Field Mapping

FieldTypeMeaningPractical Notes
idstringCustomer PKUnique ID; recommended as cross-system mapping key
numberstringCustomer codeBusiness code, often mapped to WDT member_no
namestringDisplay nameMay differ from invoice name
modify_timestringLast modifiedAnchor for incremental sync
create_timestringCreated timeUseful for audit and initial full-load fallback
invoice_namestringInvoice titleCan differ from name; this is the invoice header
taxpayer_nostringTax IDRequired for B2B invoicing
invoice_typestringInvoice kind0 none / 1 paper special / 2 paper general / 3 e-general / 4 e-special / 5 fully-digital general / 6 fully-digital special
ratestringVAT rate %e.g. 13, 9, 6
bank / bank_account / account_open_addrstringBank infoMind data compliance for sensitive fields
addrstringDetail addressMust be combined with province/city/district
country_/province_/city_/district(id/number/name)string4-level addressHierarchical; preserve both code and name
sale_dept_(id/number/name)stringSales deptDepartment ownership and isolation
saler_(id/number/name)stringSales repOwner of sales documents
c_level_(id/number/name)stringPrice levelDrives pricing strategy
group_(id/number/name)stringCustomer categoryFor tiered operations
enablestringActive flag1 active / 0 inactive; map to boolean downstream
remarkstringRemarkFree text; may need truncation
custom_fieldobjectCustom fieldsSchema depends on config; Qeasy supports nested flattening
bomentityobject/arrayContact listUsually an array of name/phone

Configuring on Qeasy Cloud

On the Qeasy Data Integration Platform, the typical pattern uses a Kingdee Cloud Xingchen V2 adapter plus a no-op write target:

  1. Source: select Kingdee Cloud Xingchen V2, enter tenant, AppKey/AppSecret, business domain, complete OAuth to fetch token.
  2. Request template: GET /jdy/v2/bd/customer; Qeasy's built-in paginator iterates page and page_size automatically.
  3. Incremental strategy: use modify_start_time/modify_end_time as the query window, store the cursor in Qeasy's incremental cursor table and roll forward per schedule.
  4. Field mapper: Qeasy's mapper auto-binds id, number, name to the target master-data model; for the four-level address quartet, an "address concat" operator composes full_address in one step. For custom_field and bomentity nested objects, the platform supports path-based flattening.
  5. Target: write no-op; Qeasy only caches and broadcasts the query result, no write-back to Kingdee.
  6. Schedule: crontab */35 * * * *, matching upstream modification frequency.

Cross-Scenario Best Practices

  1. Use modify_time as the sole incremental anchor. We have seen teams use create_time and miss records that were edited after creation.
  2. Keep id and number as dual keys. id for cross-system PK mapping, number for business code matching — never mix them.
  3. Always assemble the address. Downstream systems (e.g. WDT shipping address) usually need a single full address; ship province/city/district codes and names together.
  4. Model invoicing independently. invoice_name, taxpayer_no, invoice_type, rate are frequently consumed by invoicing flows — split them into a dedicated sub-model in Qeasy.
  5. Treat bomentity as an array. One customer can have multiple contacts; downstream must process it as an array, and Qeasy's splitter handles 1-to-N expansion.
  6. Schedule periodic full-load fallback. Pure incremental can drift due to time-zone or network blips; the safe pattern is a weekly full replay plus daily incremental.

Pitfalls & Lessons

  1. Assuming name equals invoice title. A retail client shipped name as the invoice header; individual customers requesting B2B invoices were rejected. Always distinguish name from invoice_name.
  2. Address truncation. Kingdee's addr only holds the street detail. Downstream WDT records then showed "unknown". Always combine the four-level quartet first.
  3. Invoice-type enum drift. Different Kingdee versions ship slightly different invoice_type dictionaries; legacy 0/1/2 must coexist with new 5/6 fully-digital values.
  4. custom_field stored as raw string. Downstream lost the structure. Flatten it via schema in Qearly before writing.
  5. Millisecond timestamp pitfall. Incremental filters require millisecond precision; passing seconds-level timestamps shifts the window. Qeasy's cursor defaults to milliseconds but verify manually once.

When to Choose

This API is a fit when Kingdee Cloud Xingchen is the customer master-data source of truth and you need to sync to WDT or other downstream systems for code mapping, document customer binding, or invoicing info. Best for retail/distribution scenarios under hundreds of thousands of customers using V2 OpenAPI with time-anchored incremental sync. Beyond millions of records or when near-real-time push is required, evaluate Kingdee's event subscription or DB-tap alternatives.

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

Comments