Reconcile Pipedrive deals in a stage against Reply.io sequence enrollments.
Reconcile Pipedrive deals in a stage against Reply.io sequence enrollments.
For each open deal in stage_id (default 20 = “Nurture (Drip Campaign)”):
- Read
campaign_typecustom field → map to Reply.io sequence_id - Pull primary email from deal.person_id
- Check whether that email is enrolled in the mapped sequence
- Records where the email is missing in Reply are flagged as “gaps”
apply=False (default) → dry-run report, no mutations.
apply=True → for each gap: move the deal to new_stage_id (default 1 =
“New”). If enqueue=True (default), ALSO enqueue the contact into
reply_bulk_enroll_enqueue so the next 60s flush re-enrolls it via the
v3 bulk pipeline. Set enqueue=False to do PD-only cleanup (useful
when target sequences are paused/draft and you don’t want to push
contacts into them yet).
Skipped silently: deals with campaign_type=fallout (no sequence mapping), deals without a primary email, deals without campaign_type set.
Returns a per-sequence breakdown + the full gap list (deal_id, email, person_id, campaign_type, sequence_id). When apply=True, also includes per-sequence actions taken (deals_moved, enqueue_results).
Authorizations
Body
Response
Tool result. The shape is tool-specific; most tools return a JSON object, some a {"result": ...} envelope.
The response is of type object.