Xiaoman OKKICRM Product Query API Field Handbook: A Practical Tutorial from Product Master Data to Sales Order Integration
What Problem Does This Interface Solve
In the integration scenario between Xiaoman OKKICRM and Jushuitan for sales orders, product master data is the cornerstone of order line-item linkage. This interface (/v1/product/list) is used to pull CRM-side product records incrementally, providing a product_no→SKU mapping basis for downstream order writes, and supporting product reconciliation, category statistics, and price completion. Across multiple client implementations, it typically serves as a "read-only strategy" that refreshes the product archive cache on schedule without writing back.
Interface Capability Overview
- Authentication: Xiaoman OKKICRM uses API Key/Access Token header authentication; the request only needs to carry authorization info in the header.
- Request Structure:
POST /v1/product/list, with the body containing pagination (start_index,count), incremental window (start_time,end_time), and filter conditions (removed,product_type). - Response Structure: JSON object, usually containing
data(product list) and pagination metadata (total count, current page, etc.). Each product record includesproduct_id,product_no,name,group_id/group_name,image,cost_with_tax,fob,minimum_order_quantity, etc. - Pagination Mode: Standard page-number pagination,
start_indexstarts from 1, default 20 records per page; in real scenarios, we suggest tuningcountbased on the peer-side rate limit. - Incremental Mode: Pull by update time window.
start_time/end_timesupport date or datetime format, usually cooperating with the platform'sLAST_SYNC_TIMEandCURRENT_TIMEvariables for rolling fetch. - Filtering Capability:
removeddefaults to 0 to query active products; set to 1 to query deleted ones.product_typesupports three filters: 1=non-spec, 2=multi-spec, 3=bundle.
Typical Field Mappings
| Field Name | Type | Meaning | Practical Notes |
|---|---|---|---|
| product_id | string | Unique identifier within Xiaoman | Use as primary key; do not confuse with product_no |
| product_no | string | Product business code | Core key for cross-system reconciliation; mapped to Jushuitan SKU |
| name | string | Product display name | Watch out for special characters and encoding issues |
| group_id | string | Product category ID | Used for category mapping; mind the category hierarchy |
| group_name | string | Product category name | Display only; sensitive to backend renaming |
| image | string | Product main image URL | Verify URL validity to avoid expired links |
| cost_with_tax | object | Tax-inclusive cost | Object structure with amount/currency sub-fields; deconstruct before margin analysis |
| fob | object | Free On Board price | International trade term; mind currency consistency |
| minimum_order_quantity | object | Minimum order quantity (MOQ) | Object structure with quantity/unit; extract inner sub-fields when validating orders |
| product_type | int | Product type (1 non-spec / 2 multi-spec / 3 bundle) | Usually not returned directly; needs the detail API or behavior inference |
How to Configure on Qeasy
On the Qeasy Data Integration Platform, this interface is typically encapsulated as a product query component within the "Xiaoman OKKICRM adapter". Engineers only need to select the corresponding API in the data source configuration page, and the platform automatically provides a paginator, incremental window, and field mapper.
- Adapter Encapsulation: The platform has preset the
/v1/product/listendpoint, eliminating handwritten HTTP requests. Authentication is managed through a unified connector to avoid scattering across multiple strategies. - Incremental Variable Binding: Qeasy's field mapper automatically binds
start_timetoLAST_SYNC_TIMEandend_timetoCURRENT_TIME, so you don't need to manually assemble the time window. - Empty-Operation Target: This strategy is pure read-only; simply select "Write Empty Operation" for the Target, and the platform will not trigger downstream writes, but will land data into the intermediate table or cache layer.
- Field Mapper: Complex fields (
cost_with_tax,fob, MOQ) can be deconstructed with expressions in the mapper, e.g.,cost_with_tax.amountto fetch the amount sub-field directly, avoiding repeated parsing in scripts. - Scheduling Configuration: A typical cron such as
15 7-22 * * *triggers at minute 15 of every hour from 07:00 to 22:59, staggered from the CRM-side update peak to reduce rate-limit risk.
Cross-Scenario Practical Points
- product_no is the cross-system lifeline: Across multiple client projects, we've found that as long as a stable mapping is built between
product_noand Jushuitan SKU, the accuracy of order line-item linkage improves significantly.product_idis only a primary key and should not be used for business reconciliation. - Incremental window should be slightly later than the peer side: We suggest using peer-side time + 1~2 minutes for
end_time, and the last successful sync time forstart_time, to avoid boundary data loss. In real scenarios, we usually widen the window by a few seconds — quite safe. - Pull the three product types separately: Non-spec, multi-spec, and bundle products differ greatly in field structure. The safe way is to call three times by
product_typeand then merge downstream, avoiding messy single-call returns. - Call the detail interface on demand: The list interface returns only base fields. For complete price, spec, MOQ, etc., you need
/v1/product/infowithproduct_noas the key. In Qeasy, you can configure a two-level "list + detail" fetch in the mapper. - Object fields must be deconstructed:
cost_with_tax,fob, and MOQ are all object structures; landing them as a whole will trigger type errors downstream. Using dot paths or expressions in the Qeasy field mapper is the standard practice. - Trade-off on deleted products:
removed=0for active products is mainstream, but some reconciliation scenarios needremoved=1as well to inversely check historical orders of delisted items. This is a place where you can stumble; clarify the business contract first.
Pitfall Review
- Pitfall 1: Boundary data loss in time window —
start_timeis precise to the second, but peer-side time zone is inconsistent, causing some products to be missed. Fix: unify UTC or peer-side time zone, and widen the window by a few seconds on both ends. - Pitfall 2: Landing the whole object field — Writing the entire
cost_with_taxobject to the downstream table causes deserialization errors. Fix: useobj.amountin the Qeasy mapper to extract sub-fields, or land it as a JSON field. - Pitfall 3: Multi-spec product treated as single-spec — Only one record is taken as the complete product. Fix: pull by
product_typein rounds, and complete the SKU matrix in the detail interface. - Pitfall 4: Duplicate product_no — The peer side allows multiple records with the same
product_no(legacy data), causing primary key conflicts downstream. Fix: use a composite key ofproduct_id+product_no, or deduplicate in the mapper. - Pitfall 5: Incremental baseline time drift — The platform's
CURRENT_TIMEdrifts from the peer-side server time, and the window grows larger over long runs. Fix: write backLAST_SYNC_TIMEusing the update timestamp returned by the peer side, not the local time.
When to Use
This interface is suitable for scenarios where Xiaoman OKKICRM product master data needs to be synchronized to Jushuitan or other downstream systems, especially when order line items depend on the CRM-side product archive for mapping. If you only need to query products within the CRM, calling the API directly is enough; if two-way sync is required, configure a separate write strategy and handle product_no idempotency properly.