Querying Goods from Wangdiantong: A Practical Guide to Pulling Product Records from the CRM Side
What This Strategy Solves
In projects where CRM and ERP/WMS collaborate, the product master is the foundation for orders, inventory, and shipping. In one of our real projects, sales placed orders in the CRM, but warehouse fulfillment depended on Wangdiantong's product codes and specifications. Once the encoding rules diverged, everything stalled.
The core purpose of the "Querying Goods from Wangdiantong" strategy is to look up product master data on demand from the CRM side, using Wangdiantong's goods_id / goods_no as the canonical encoding, so the two systems don't drift after each maintaining their own SKU records. It is essentially a read-only, paginated query strategy, while the write side is a "no-op write"—all product data only lands in the Qeasy data integration platform's intermediate layer, to be referenced by other write strategies (sales orders, real-time inventory, etc.) by code.
Data Flow and Field Mapping
The data flow is: Wangdiantong Flagship Edition (source) → Qeasy Integration Platform (intermediate layer) → Xiaoman OKKICRM consumer (target is a no-op).
The source invokes goods.Goods.queryWithSpec (POST). The key request structure consists of pager (pagination parameters) and params (business parameters). The response uses goods_id as the internal ID and goods_no as the business number, and returns specification details (queryWithSpec literally means query with specifications).
The intermediate layer is responsible for receiving and standardizing three groups of key fields:
| Dimension | Source (Wangdiantong) Field | Intermediate Unified Field | Notes |
|---|---|---|---|
| Business key | goods_no | prod_code | Cross-strategy unified code |
| Internal key | goods_id | prod_id | Used by subsequent write strategies |
| Name/spec | goods_name + spec details | prod_name / spec_text | Spec needs to be assembled in the intermediate layer |
The target metadata.api is "no-op write", effect: EXECUTE, with idCheck: true. This means this strategy does not write directly to the target system, but only pulls data into the Qeasy platform's interior, for other write strategies to reference—this is the typical pattern of a "pull-type prerequisite strategy".
How to Configure on Qeasy
When configuring on the Qeasy data integration platform, we recommend landing it according to the following points:
- Register the source platform: Select the Wangdiantong Flagship Edition driver, pick the API
goods.Goods.queryWithSpec, method POST, and expose thepagerparameter as a visual field to control how many records are pulled per page. - Configure the target platform: A no-op write doesn't need field mapping, but keep
idCheck: trueso the platform validates the primary key at the scheduling entry, preventing downstream strategies from referencing empty values. - Centralize code mapping: Maintain a "Wangdiantong product → CRM product" mapping table in Qeasy's code-mapping module, and have all write strategies reference it uniformly. New SKUs are then maintained in one place, avoiding drift between an "order strategy mapping" and an "inventory strategy mapping".
- Phased header/body rollout: Product master data is header-level. Bring it online before body-level strategies like sales orders and real-time inventory; otherwise the downstream write strategies will fail because they can't find the canonical codes.
Implementation Steps
We split this strategy into a three-phase schedule. The pitfalls we hit are recapped in the next section.
- Full trigger (first go-live): Manually trigger a full pull, paginated in ascending
goods_noorder, written into the intermediate layer. The source schedule is recommended for off-peak early morning (the material gives47 3 * * *, i.e. 03:47), to avoid the downstream order-writing window. - Incremental starting point: Use "the last successful pull time" as the starting point and request only products with
update_time > last_time. The Qeasy scheduler automatically persists the previous timestamp, so you don't need to write persistence into a script. - Schedule frequency: Stagger at least one hour from the target no-op write's
23 2 * * *(02:23), so that by the time downstream write strategies run, this round's products are stable. A typical combination is "source pulls at 03:47 → target no-op validates at 02:23 → downstream business strategies start at 04:30".
Pitfall Recap
- A typical mistake is using
goods_nameas the join key. In one implementation, the customer tried to save effort by treating the product name as the primary key; three months later the same item was renamed, the numbers on both sides stopped matching, and stocktaking fell apart. The safe approach is to consistently usegoods_noas the business key andgoods_idas the internal key. - The specs returned by
queryWithSpecare a nested structure. Many engineers dump the whole thing into one field, and downstream JSON parsing fails. We recommend explicitly expanding the spec array in Qeasy's field mapping and landing it into a dedicatedspec_textfield. - Don't omit
autoFillResponse: true. Skipping it makes response fields invisible in the Qeasy platform; during debugging it looks like the API returned nothing, but it's actually that the metadata wasn't declared. - Always set an upper bound on pagination. When Wangdiantong returns too many records per page, Qeasy slows down. Keep each page between 200 and 500, and combine it with source-side rate limiting.
- The target no-op is not "doing nothing". With
idCheck: true, the primary key is validated; if the source pull returns nothing and we proceed straight into this strategy, it gets blocked at the entry point. Don't disable this safeguard.
When It Applies and When It Doesn't
Applies: Projects where CRM and ERP/WMS need unified product master data, where subsequent write strategies (orders, inventory) depend on product codes, and where you don't want to maintain SKUs bidirectionally. Doesn't apply: Scenarios where product master is owned exclusively by one side, where the source system doesn't support spec-returning queries like queryWithSpec, or where the business volume is so small that an intermediate mapping layer isn't worth it.