Qeasy Cloud
Get Started

Jiandaoyun Onboarding Triggering WeCom Temp-Staff Member Creation: A Single-Strategy Sync Walkthrough

· 许创贵· Integration Solutions· 20 views· 4 min read

What This Strategy Solves

Temp-staff onboarding happens at high frequency across many stores. HR fills out one Jiandaoyun form, then manually creates a member account in WeCom—and missed, mistaken, or duplicate creations happen almost every week. This strategy turns "Jiandaoyun onboarding form → WeCom member creation" into an automated closed loop. After the form is submitted, the system polls for incremental data on schedule and calls the WeCom create-member API, so store managers can find the new hire in WeCom the same day.

Data Flow and Field Mapping

Source: Jiandaoyun (Onboarding Form)

Jiandaoyun Field WidgetMeaningType
_widget_1675653229901Namestring
_widget_1681087902876Member UserID (account)string
_widget_1680875447221Mobilestring
_widget_1680156501787Department ID liststring
_widget_1680750424796Positionstring
_idForm record primary keystring

Target: WeCom (Member Creation API /cgi-bin/user/create)

WeCom FieldSourceNotes
useridJiandaoyun UserID field1–64 bytes; must start with a digit or letter; unique within the enterprise
nameJiandaoyun Name fieldDisplay name
mobileJiandaoyun Mobile field11-digit mobile number
departmentJiandaoyun Department ID fieldMax 100; comma-separated for multiple
positionJiandaoyun Position fieldFree text
to_inviteFixed value trueAuto-send invitation after creation

The Qeasy data integration platform does only two things in the middle layer: rename Jiandaoyun form fields to match the WeCom API fields, and apply basic cleansing per WeCom rules (trim whitespace, validate mobile length). All other fields are passed through.

How to Configure It on Qeasy

  1. Connect Jiandaoyun as the source: Create a new source system in Qeasy, fill in the App ID and Form ID, select the list endpoint /api/v2/app/{app_id}/entry/{entry_id}/data, and set pagination limit to 100.
  2. Connect WeCom as the target: Create a WeCom connector; authorize with the "Contact Sync" custom app Secret instead of any individual's personal Secret.
  3. Create the sync strategy: Pick Jiandaoyun form as source, WeCom user/create as target, and choose "Schedule Trigger" as the trigger mode.
  4. Field mapping: Configure mappings in the Qeasy visual mapping panel per the table above. Encoding mappings should be maintained centrally—especially department (store name ↔ department ID), a one-to-many relationship. A common Qeasy pattern is to maintain the mapping as a Jiandaoyun helper table that the integration task queries at runtime, rather than hard-coding across multiple strategies.
  5. Exception handling: Enable "3 retries + alert notification"; WeCom business codes like userid existed should not be treated as system errors.

Implementation Steps

  • Phase 1 — Full Initial Load: Before go-live, run a one-time "full trigger" to backfill existing temp-staff records. A single script is enough; do not let it pollute the production schedule with historical baggage.
  • Phase 2 — Incremental Anchor: Use the form's "Submission Time" field as the incremental cursor. In Qeasy, configure the filter to pull only records where submission_time > last_success_time.
  • Phase 3 — Schedule Frequency: Source runs */5 6-23 * * * (every 5 minutes from 6 AM to 11 PM); target runs */6 6-23 * * *—offset by one minute to avoid the same timestamp bunching onto WeCom. No runs at night; HR rests too.
  • Phase 4 — Closed-Loop Verification: Spot-check "Jiandaoyun onboarding records vs WeCom member list" weekly. Qeasy provides a reconciliation report; mismatches are auto-flagged in red.

Lessons Learned from the Trenches

  • userid charset: WeCom requires digits, letters, _-@. with the first character being a digit or letter. Store staff sometimes use a Chinese name as the account, and the call fails with HTTP 400. Add a pre-validation script in Qeasy.
  • Mobile format: Dirty data like "13800138000a" or "+86 138…" occasionally appears in Jiandaoyun. The safe approach is to cleanse with a regex in the middle layer rather than passing dirty data straight to WeCom.
  • Department ID drift: After store restructuring or department renaming, the department IDs in Jiandaoyun are no longer valid. A common Qeasy customer pattern is to use store name as the unique key and resolve the department ID in real time within the integration task.
  • Duplicate creation: When the same person submits multiple forms in a short window, WeCom returns "already exists." Add idempotency control keyed on userid in the middle layer; Qeasy's "dedupe by primary key" switch can be reused directly.
  • Invitation spam: When a temp-staff leaves and rejoins, to_invite=true sends the invitation again. Tag temp-staff records and send invitations only on first creation.

When to Use It and When Not To

Use it when: A retail chain has many stores with high temp-staff turnover, uses Jiandaoyun for lightweight HR onboarding, and has WeCom enabled—where the new-hire information source is unique and the employee must enter WeCom on the same day. Don't use it when: You are onboarding regular employees (which requires OA approval workflows, not a single form), or when you need to sync departments, positions, and the full org chart—that belongs to a separate "Org Structure Sync" strategy and is too heavy for one single strategy.

Original content. Please credit the source when reposting: https://www.qeasy.cloud/insights/solutions/strat-wecom-pcdd5c6-8957-n087b0dc6-0f874d8c

Comments