Qeasy Cloud
Get Started

Practical Tutorial: Querying Customer Master Data from XiaoMan OKKI CRM to the Integration Platform

· 王浩宇· Integration Solutions· 14 views· 4 min read
小满OKKICRM金蝶云·星空旗舰版基础资料同步客户主数据轻易云数据集成平台QUERY_ONLY增量与全量双轨

What This Strategy Solves

In a real retail integration project, we ran into a very common pain point: customer master data in the CRM lives inside XiaoMan OKKI CRM, while the downstream ERP (illustrated here with Kingdee Cloud · Cosmic flagship edition as an example) needs a clean, structurally unified customer profile as a prerequisite for order placement and settlement.

The reality is: XiaoMan's customer API uses pagination, has colloquial field names, and exposes multiple filter switches such as "private pool / public pool", "deleted", and "group-based filtering". If you try to do the mapping directly on the ERP side, three months later you will see mismatched codes, misaligned owners, and deactivated customers still receiving orders — all classic failure modes.

The core value of the "Query XiaoMan Customers" strategy is to use the Qeasy Data Integration Platform (轻易云) to first pull source-side customer data into a middle layer, perform filtering, cleansing, and field standardization, then hand the result over to downstream write strategies. It is a QUERY_ONLY strategy that is only responsible for "fetching data"; it does not write to the target system directly.

Data Flow and Field Mapping

The data flow can be simplified into three segments:

Source (XiaoMan OKKI CRM) → Middle Layer (Qeasy Integration Platform) → Target (consumed by downstream write strategies)

The source side calls /v1/company/list via GET, with pagination parameters start_index (default 1) and count (default 20). There are four key filter switches:

  • removed: 0 = include deleted, 1 = filter deleted out (default behavior varies — confirm per project).
  • all: 1 = query all customers, 0 = query only private pool customers.
  • group_id: filter by customer group.
  • date: incremental start time, used for incremental pulls.

When the middle layer receives the data, colloquial field names need to be renamed. A typical mapping is:

Source Field (XiaoMan)Middle Layer Standard FieldMeaning
company_idcustomer_idUnique customer code, cross-system primary key
serial_idcustomer_serialSource-side serial, used for idempotent deduplication
namecustomer_nameCustomer name
owner_user_idowner_idOwner, needs mapping to ERP user profile
group_idcustomer_groupCustomer group
update_timelast_modifiedIncremental watermark field
deletedis_deletedSoft-delete flag

In this strategy the target is a "write empty operation" (POST to Qeasy's internal receiving endpoint). Its purpose is to land the data in the platform's middle database so that downstream strategies such as "write customer to Kingdee" can consume it. This segment does not require complex mapping; the key is to ensure that the idempotency field (customer_id) and the incremental watermark (last_modified) are passed through intact.

How to Configure on Qeasy

On the Qeasy Data Integration Platform, there are four configuration essentials for this strategy:

  1. Register the data source: Register XiaoMan OKKI CRM as Platform A; credentials are managed by Qeasy's credential center, not embedded in the strategy.
  2. Model the API: Import /v1/company/list as a QUERY-type API. Declare each request parameter per the source material, with defaults fixed at start_index=1, count=20, removed=0, all=0.
  3. Field mapping: In Qeasy's "Field Mapping" panel, perform source-to-middle-layer mapping. A common pattern among Qeasy customers is "centralized code mapping management" — abstract mappings such as owner_user_id → ERP user ID and group_id → ERP customer group code into a single mapping table rather than embedding them into every strategy. This minimizes long-term maintenance cost.
  4. Write empty operation: Configure the target as the platform's internal receiving WebAPI (POST), with number=0 and id=0 indicating this is an internal platform node, primarily used to trigger downstream strategies and record logs.

Implementation Steps

We recommend splitting the go-live into three phases:

Phase 1: Full Initialization Hard-code all=1, removed=0, start_index=1, count=20, trigger it manually once, iterate through all pages, and complete the initial full load. This phase does not connect scheduling; it only validates whether the code mapping is correct.

Phase 2: Incremental Starting Point Once the full load is confirmed, record the current maximum update_time as the incremental starting point. After this, set the date parameter to this starting point in the strategy to enable time-window-based pulling.

Phase 3: Scheduling Go-Live This step uses an "incremental and full dual-track" pattern: daily run incrementals on */5 7-22 * * * (every 5 minutes during business hours); once a week in the early morning, run a full-load verification to ensure any data missed during incremental windows is backfilled. The target receiving node should be configured with off-peak scheduling like 23 2 * * * to reduce pressure on the source API.

During the first week after go-live, manually reconcile the total customer count and new-customer count between the two sides daily. Once no anomalies are observed, switch to automated inspection.

Pitfall Review

  1. A typical mistake is not distinguishing all between private and public pools. In the early days of a go-live at a manufacturing enterprise, all=1 was used directly, which synced individual salespeople's private customers downstream, resulting in many unwanted customer profiles appearing in the ERP. The safe approach is to confirm with the business whether public-pool data is needed; default to all=0.
  2. removed=0 does not mean there are no soft-deleted records. XiaoMan's deletion is soft; the API still returns records with deleted=1. You must filter explicitly in the middle layer; otherwise, deactivated customers continue to be used.
  3. Pagination must be idempotent. In incremental scenarios, if the same page is resent due to network jitter, duplicate customers will appear. Be sure to use serial_id + update_time for joint deduplication. Qeasy's middle layer natively supports upsert by primary key.
  4. The owner field cannot be passed through directly. owner_user_id on the ERP side usually corresponds to the user profile's code, not a same-named field. A mapping table must be used here; otherwise you end up with the situation where "the salesperson has left the CRM, but the ERP is still assigning orders".
  5. Do not open the date incremental window too wide. If a single pull covers an excessively long time window, it can easily trigger source-side rate limiting. We recommend a single window of no more than 30 minutes, and immediately chaining the next pull once it finishes.

Applicable and Non-Applicable Scenarios

Applicable: enterprises that need one-way synchronization of customer profiles between CRM and ERP, with downstream freshness requirements at the minute level; and as the "data preparation phase" for subsequent write strategies, ensuring clean data is ready first.

Not applicable: scenarios that require bidirectional synchronization (where the CRM also needs to receive ERP-side changes), or where single-customer volume is extremely large and changes very frequently — the latter should switch to event-driven rather than polling.

Original content. Please credit the source when reposting: https://www.qeasy.cloud/insights/solutions/strat-okkicrm-p110c26-2181-n32c9d889-bcca010f

Comments