Qeasy Cloud
Get Started

Practical Guide to Syncing Customer Master Data from Fenxiao CRM to Qeasy Data Hub

· 冯潇· Integration Solutions· 10 views· 5 min read

What This Strategy Solves

Pulling customer master data from a CRM into a middleware hub looks simple at first glance, but anyone who has done this on a real project knows the pitfalls: inconsistent pagination, private field names with suffixes like field_xxx__c, mandatory encoding mappings, deduplication, and incremental boundaries. Miss any one of them and the numbers drift apart within three months.

We use Qeasy (轻易云) data integration platform to host this logic. The essence is treating the Fenxiao CRM customer object as the single source of truth, pulling data into the Qeasy hub at a defined cadence, and letting downstream subscribers consume it. The whole pipeline revolves around one strategy: Fenxiao-Customer-Query, and Qeasy stitches query, landing, and consumption together.

Data Flow and Field Mapping

The flow is straightforward: the source is Fenxiao CRM's customer object (AccountObj), the intermediate layer is the Qeasy integration platform itself, and the target landing point is Qeasy's customer staging table. The table below shows the most critical mapping for this strategy:

Source Field (Fenxiao)MeaningMiddleware HandlingTarget Field (Qeasy Side)
_idCRM internal primary keyPassed through as idempotency keycustomer_id
nameCustomer nameBusiness key, used for dedupcustomer_name
field_dealer_level__cDealer tierCustom dictionary mappingdealer_level
field_customer_category__cCustomer categoryCustom dictionary mappingcustomer_category
currentOpenUserIdOperating userWritten to audit fieldowner_user_id

Two things must be carried in the request body: search_query_info (the query object container) and dataObjectApiName=AccountObj (specifies the customer object). currentOpenUserId is injected via otherRequest and serves as the identity that the source system uses to trace who triggered the pull; Qeasy writes it verbatim into the audit field.

The source-side idCheck=true flag is critical here — it tells Qeasy "this record has an external primary key, dedup by it", so downstream will not insert duplicates.

How to Configure It on Qeasy

Step 1: Register the Fenxiao adapter in Qeasy's "Data Source" section and fill in tenant credentials and the API gateway address. The source strategy is type QUERY, HTTP method POST, endpoint crm/v2/data/query. Pagination is handled by Qeasy's built-in cursor mechanism — no manual loops required.

Step 2: Build the mapping. Customer name, dealer tier, and customer category follow the "centralized encoding mapping" pattern commonly seen among Qeasy customers: map values of field_dealer_level__c (e.g., A/B/C) to business-side terms (Core/Normal/Potential), maintain the rules once in Qeasy, and reuse the same dictionary for other objects like employees and contacts.

Step 3: Configure the target. Here is a detail: the target platform is the Qeasy integration platform itself, and the landing point is the staging database — effectively a "write-noop" plus a landing script combo. The api field is Write Noop, method=POST, idCheck=true, meaning "this station only receives data; real subscription is chained by other strategies."

Step 4: Scheduling rhythm. The source crontab=3 * * * * (triggered at minute 3 of every hour), the target crontab=23 2 * * * (triggered daily at 02:23). Together they form an "hourly pull + nightly land" dual-track cadence, a very typical orchestration pattern among Qeasy customers.

Implementation Steps

Breaking it into phases makes it clearer:

1. Incremental starting point. On the very first run, Qeasy performs a full pull and ingests all AccountObj records by _id. From then on, every trigger uses the source's modified_time (if enabled in the project) or the last successful timestamp as the incremental boundary, pulling only changed data.

2. Full pull trigger. Typically schedule a full reconciliation weekly or monthly via Qeasy's "Full Pull" action — its purpose is to catch incremental misses and reconciliation gaps. A common pattern among customers is "dual track, incremental + full": hourly incremental during the week, with a full pull on Sunday morning as a safety net.

3. Scheduling frequency. The source crontab is set to 3 * * * *, meaning the pull happens at minute 3 of every hour. The target 23 2 * * * means landing executes at 02:23 every day. The two crons form an upstream/downstream rhythm: source pulls first, target lands later, with a 1–2 hour buffer to prevent new waves from piling up before the previous batch is consumed.

4. Dependencies and ordering. This strategy is registered as sequence=B with depends_on=[] in index.json, meaning it has no prerequisites and can run independently. Another strategy Fenxiao-Employee-Query is sequence=A — typically running employees first, then customers, so that the audit field's owner user already exists.

Pitfalls and Lessons Learned

Pitfall 1: Going live without mapping custom fields. Fields with __c suffixes return dictionary codes; the business side needs Chinese labels. Without mapping, downstream reports show A/B/C and the business can't read them. The safe practice is to list all __c custom fields before launch and register them in the encoding mapping module.

Pitfall 2: Ignoring the idempotency semantics of idCheck=true. Turning it off causes the same customer to be inserted repeatedly, producing duplicate rows on the target side. Qeasy enables it by default — for any CRM master data sync, this switch must stay on.

Pitfall 3: Hardcoding pagination parameters. Early on, we hand-wrote loops hardcoded to pageSize=100. When the CRM side changed its default, data was silently missed. Just use Qeasy's built-in pagination adapter; don't reinvent the wheel.

Pitfall 4: Source and target cron intervals too short. We have seen customers use * * * * * (every minute) on both sides. The upstream is still pulling while the downstream already starts landing, and the target table gets truncated and reloaded repeatedly. The safe practice is "header/body staged": lightweight objects like header data use hourly/daily cadence.

Pitfall 5: Forgetting the audit field currentOpenUserId. It exists in the source strategy's otherRequest, but if the target mapping does not bind it to owner_user_id, there is no way to trace who triggered the batch later. Treat identity fields as mandatory.

Suitable and Unsuitable Scenarios

Suitable: CRM is the single source of truth for customer/dealer master data, the data needs to be aggregated into a middleware layer for downstream distribution, and hourly-level freshness is acceptable. Unsuitable: scenarios requiring second-level bidirectional sync, or where CRM is not the authoritative source (the business system is). In those cases, use event-driven or reverse sync strategies rather than a plain QUERY_ONLY.

Original content. Please credit the source when reposting: https://www.qeasy.cloud/insights/solutions/strat-mysql-p2d57ef-8267-n31417fec-eee2cf57

Comments