Qeasy Cloud
Get Started

Syncing Customer Contacts from OKKICRM to Kingdee Cosmos: A Practical Guide on Qeasy

· 何海波· Integration Solutions· 13 views· 4 min read

What This Strategy Solves

Syncing customer contact master data from CRM to ERP looks like a simple write, but if code mapping isn't designed properly, the two systems drift apart within three months—sales updates a contact in CRM, but finance can't see it in ERP. In this engagement, we used the Qeasy Data Integration Platform to handle this link: the source is customer contacts in OKKICRM, and the target is customer profiles in Kingdee Cosmos.

Data Flow and Field Mapping

The overall flow is OKKICRM → Qeasy middle layer → Kingdee Cosmos. When pulling customer contact master data from the source, we only fetch increments; the middle layer handles code conversion and field standardization; the target side writes via Kingdee's customer profile interface.

Key field mapping:

Business MeaningOKKICRM FieldKingdee Cosmos FieldMapping Notes
Customer Codecustomer_codeFNumberOne-to-one, keep CRM code
Customer Namecustomer_nameFNameDirect assignment
Contact Personcontact_nameFContactDirect assignment
Contact PhonephoneFPhoneDirect assignment
AddressaddressFAddressDirect assignment
Customer Sourcesource_typeFSourceDictionary mapping
StatusstatusFStatusActive→1, Inactive→0

For code mapping, we adopted a "centralized management" approach: all code mapping tables are placed in Qeasy's unified mapping dictionary. If a source field changes, only one place needs updating, avoiding scattered mappings across multiple strategies.

How to Configure on Qeasy

In the Qeasy console, this strategy is roughly configured in three parts:

1. Source Adapter: Select the OKKICRM adapter, configure the query interface, and use last_modified_time as the incremental cursor. Each scheduled run continues from the last breakpoint, avoiding duplicate fetches.

2. Field Mapping: Drag and drop fields in Qeasy's mapping canvas. For complex fields (such as province/city/district concatenation in addresses), use expressions. A detail: if a contact has multiple phone numbers (mobile, landline, fax), Kingdee only has one FPhone field. The reliable approach is to prioritize mobile, then fall back to landline if empty.

3. Target Writing: Select the Kingdee Cosmos adapter and call the customer profile save interface. Use FNumber as the upsert key—update if exists, insert if not.

Implementation Steps

Roll out in three phases:

Phase 1: Incremental Starting Point. Start with last_modified_time as the incremental cursor, with a 15-minute schedule. First, fill in an initial cursor timestamp on the source side, such as 2024-01-01 00:00:00, to ensure historical data is backfilled.

Phase 2: Full Trigger. Before the first go-live, run a full script to sync all existing customer contacts as a baseline. Once the full run finishes, immediately switch to incremental mode. A common pitfall here: don't run the full script and incremental at the same time, or you'll get duplicate writes.

Phase 3: Steady-State Scheduling. Once in steady state, run increments every 15 minutes—Qeasy automatically records cursor position. If the source side does bulk backfilling, you can temporarily increase the scheduling frequency, then dial it back after completion.

Pitfall Review

Pitfall 1: Empty contact phone causes write failure. Some customer contacts have no phone filled in on the source side, and passing null directly to Kingdee triggers non-null validation. The reliable approach is to add a default fallback in the mapping layer, or skip empty records in Qeasy's script.

Pitfall 2: Customer names with special characters are rejected by Kingdee. Some customer names in CRM contain Emoji or rare characters, and Kingdee's customer profile name field has character set restrictions. You need to clean once in the mapping layer, keeping only ASCII and common Chinese characters.

Pitfall 3: Code mapping tables scattered across multiple strategies. A typical mistake is each strategy maintaining its own mapping, requiring N changes for one update. The recommended approach is to centralize all code mappings in Qeasy's unified dictionary—strategies only reference dictionary keys.

Pitfall 4: Full and incremental running simultaneously causes duplicates. The most common mistake during initial rollout is having the full script still running while incremental is also open—the same customer contact gets written twice. The reliable approach is to add a "stop when done" switch to the full script, and only start incremental after confirming the full run is complete.

Pitfall 5: Inaccurate cursor time causes data loss. If the source side's last_modified_time is based on server time rather than actual data modification time, increments will miss data. It is recommended to confirm the time field semantics with the source side before going live, and add a buffer time (e.g., 5 minutes ahead) in Qeasy's cursor configuration.

Applicable and Non-Applicable Scenarios

Applicable: CRM serves as the customer contact master data source, ERP is the downstream consumer, and the coding systems are already aligned or willing to be mapped.

Not Applicable: Scenarios where both CRM and ERP need to maintain contact data bidirectionally (this requires bidirectional sync strategies, not one-way push). Also not suitable for scenarios with large contact data volumes requiring real-time second-level synchronization—such scenarios should use message queues rather than scheduled polling.

Original content. Please credit the source when reposting: https://www.qeasy.cloud/insights/solutions/strat-okkicrm-kingdee-cloud-3152-ok-35caff44

Comments