Practical Tutorial: Querying Customer Master Data from XiaoMan OKKI CRM to the Integration Platform
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 Field | Meaning |
|---|---|---|
company_id | customer_id | Unique customer code, cross-system primary key |
serial_id | customer_serial | Source-side serial, used for idempotent deduplication |
name | customer_name | Customer name |
owner_user_id | owner_id | Owner, needs mapping to ERP user profile |
group_id | customer_group | Customer group |
update_time | last_modified | Incremental watermark field |
deleted | is_deleted | Soft-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:
- Register the data source: Register XiaoMan OKKI CRM as Platform A; credentials are managed by Qeasy's credential center, not embedded in the strategy.
- Model the API: Import
/v1/company/listas a QUERY-type API. Declare each request parameter per the source material, with defaults fixed atstart_index=1,count=20,removed=0,all=0. - 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 IDandgroup_id → ERP customer group codeinto a single mapping table rather than embedding them into every strategy. This minimizes long-term maintenance cost. - Write empty operation: Configure the target as the platform's internal receiving WebAPI (POST), with
number=0andid=0indicating 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
- A typical mistake is not distinguishing
allbetween private and public pools. In the early days of a go-live at a manufacturing enterprise,all=1was 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 toall=0. removed=0does not mean there are no soft-deleted records. XiaoMan's deletion is soft; the API still returns records withdeleted=1. You must filter explicitly in the middle layer; otherwise, deactivated customers continue to be used.- 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_timefor joint deduplication. Qeasy's middle layer natively supports upsert by primary key. - The owner field cannot be passed through directly.
owner_user_idon 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". - Do not open the
dateincremental 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.