Qeasy Cloud
Get Started

Authoritative Field Manual: Query Product Groups API of Xiaoman OKKICRM

· 何金辉· Engineering Best Practices· 27 views· 4 min read

What This Endpoint Solves

The /v1/product/groups endpoint retrieves product + group association data in a single call. In our retail customer projects, typical use cases include product master initialization, mapping to Kingdee Cosmic (Xingchen) or Kingdee Constellation (Xingkong Flagship) item categories, cost/FOB price alignment, and MOQ synchronization. Pulling groups or products separately forces a two-pass join, while this endpoint merges both dimensions and dramatically simplifies downstream alignment.

Capability Overview

  • Authentication: Xiaoman OKKICRM open-platform OAuth/AccessToken (per-tenant credentials).
  • Method: GET /v1/product/groups; supports filters by update time or group.
  • Response: An array; each record carries both product_* and group_* fields, plus three object-typed fields (cost_with_tax, fob, minimum_order_quantity).
  • Pagination / Incremental: Page+pageSize or cursor modes; incremental sync uses update_time as the cursor. Scheduled pulls (e.g., 03:20 daily) are the mainstream pattern.
  • Strategy Type: QUERY_ONLY — Target side is configured as a no-op write.

Typical Field Mapping

FieldTypeMeaningField Notes
product_idstringProduct primary keyCross-system anchor; must be unique
product_nostringProduct codePreferred mapping key to Kingdee item/material codes
namestringProduct nameMarked as the number field in metadata; used for display
group_idstringProduct group IDMaps to Kingdee category/classification IDs
group_namestringProduct group nameUse with DISTINCT to derive a pure group list
imagestringProduct image URLWatch for hotlink protection; consider relay storage
cost_with_taxobjectCost with taxMay be {amount, currency} — parse accordingly
fobobjectFOB pricePreserve currency sub-field in multi-currency cases
minimum_order_quantityobjectMOQEither scalar or compound with unit; target field is usually numeric

Configuring on Qeasy

On the Qeasy Data Integration Platform, this endpoint is normally onboarded via an adapter + QUERY strategy: pick the Xiaoman OKKICRM adapter as the source, fill in tenant credentials and the /v1/product/groups path; in the strategy editor's Field Mapper, Qeasy auto-generates mapping nodes from the response JSON (object fields can be expanded). Choose a no-op target to complete the pure-query configuration. Qeasy also offers a pagination iterator, an incremental cursor setting, and a crontab scheduler, which fit naturally with this endpoint's typical daily 03:20 cadence.

Cross-Project Best Practices

  1. Despite its name, the endpoint returns associations: each row contains both product and group dimensions. To obtain a pure group list, deduplicate by group_id.
  2. Distinguish primary key from code: metadata maps id → product_id, number → name, but cross-system alignment should prefer product_no.
  3. Always expand object fields: the three price/quantity fields are objects; writing them as strings loses currency.
  4. Use update_time as the incremental cursor: register it as an incremental field in the Qeasy adapter to avoid full reloads.
  5. Mappings differ across target systems: against Kingdee Cosmic, group_id maps to "item category"; against Kingdee Constellation Flagship, it often maps to "product classification PK". Codify this in the field mapper.
  6. QUERY_ONLY can still benefit from snapshots: even without writes, Qeasy's data snapshot serves as a reliable intermediate layer for joins and reconciliation.

Pitfalls & Fixes

  • Pitfall 1: Using name as the primary key. Names can collide; use product_no for cross-system code alignment.
  • Pitfall 2: Writing object fields verbatim. One customer dumped cost_with_tax straight into a Kingdee price field, losing the currency and causing price mismatches.
  • Pitfall 3: Missing deduplication. The same group repeats across all its products; downstream group sync produces duplicates if not deduplicated.
  • Pitfall 4: Inconsistent page indexing. Some APIs start at page 1, others at 0; explicitly set the starting page in the Qeasy iterator.
  • Pitfall 5: Schedule misaligned with upstream archive. A 03:20 pull may precede the source system's daily archive; shift to after 04:00 and rely on update_time incrementals.

When to Use

Use this endpoint for one-shot product-group snapshots feeding master-data initialization, price alignment, and category mapping. Avoid it for high-frequency real-time sync (no event stream) or for pure group lists without product context — for the latter, a dedicated group endpoint reduces payload size.

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

Comments