pipeline-routing-rules.md
Language Markdown12.9 KB129 lines
---type: referencescope: 07-Automationtags: [claude, outreach, routing, automation]created: 2026-08-06status: rules ratified; implementation pending---# Pipeline Routing Rules: Partner Client OutreachRatified by Matt 2026-08-06 from the operations team's written procedure for pulling the quarterly check-in and Winback client lists (a Google Doc maintained by Ines and operations, updated 06-2026, not included here) plus Matt's in-session rulings. This note is the canonical rule set the weekly pipeline's future routing stage implements. **Nothing routes automatically yet**; see Implementation status.> Where this note and the operations doc disagree, this note wins: the doc's operational> steps compute a 180-day Winback threshold; Matt ruled **12+ months** (2026-08-06).> The doc's "$2,500 total" is the Partner Program definition (lifetime), not a> trailing-window spend.>> **Scale note (2026-08-06):** most of the partner base is dormant 12+ months (in the> sample, 75 of the 128 partner clients at the 2026-09-14 run), so Winback is by far the> largest wave. Under the one-touch rule, each of those> clients gets exactly one pass of Bitrix's automated cat-26 sequence and then> permanent silence unless they order.## The three pipelines| XML key | Bitrix funnel | categoryId | Play ||---|---|---|---|| `partner_outreach` | **Partner Tier Upgrade** (renamed 2026-08-06 from "Partner Outreach"; same categoryId) | 24 | First touch + tier upgrades || `quarterly_checkin` | Quarterly Check-In Flow | 36 | Quarterly relationship touch || `winback` | Winback | 26 | Re-engage dormant clients |## Audit scope: NOT the same as routing scope *(Matt, 2026-08-10)*The three pipelines above are what `route` **writes candidates into**. The weekly outreachaudit (Stage F5) **reads** a wider set: those three plus **Abandoned Carts (cat 16)**:**four funnels, and only these four.**| Bitrix funnel | categoryId | In routing scope | In audit scope ||---|---|---|---|| Partner Tier Upgrade | 24 | yes | yes || Winback | 26 | yes | yes || Quarterly Check-In Flow | 36 | yes | yes || Abandoned Carts | 16 | no | yes |Everything else in Bitrix (New Orders, Processing, Rush/PO Processing, Parked, Claims,Automation Testing, Pre-Production, Production, Post Production, 7 Days Delivery Up-Keep,Cold Outreach) is **out of both scopes**. A 2026-08-10 session read "look in all of thepipelines" literally and swept 28 and 30 into the weekly job as well; they were removed thesame day. If someone asks for "all the pipelines", it means **this table**, not every funnelthat exists. `AUDIT_FUNNELS` in `partner_pipeline/stages.py` is the executable copy of thistable: the two must agree, and widening either one is a decision to be asked about, not atweak.## Entry rules: evaluated weekly, per client, in this orderA client holds **one open outreach pipeline at a time**. **Exclusion evidence is identity-level, not chunk-level** (2026-08-06, the duplicate-twin finding): duplicate census chunks for one person can split the record, with a Not-Interested closure or open deal on one twin while the blockless twin routes clean. `route` therefore unions opt-out / open-deal / winback-done evidence across every chunk sharing an email or normalized full name, partner or not. Inheritance only ever excludes; eligibility is never inherited. The first live run caught the original case and several more, most of them twins whose other account had just entered cat 24: each a double contact prevented. The sample carries one such pair: [[Delphine Hartigan]] and [[Delphine Hartigan-Vance]] share one mailbox, only the first carries the Not Interested closure, and `route` excludes the second as "inherited from identity twin".**Opt-outs never route anywhere**, and per Matt (2026-08-06) opt-out means BOTH:- an explicit email unsubscribe / stop request (e.g., one client who replied on 2026-07-30 asking to be taken off the list), and- **any funnel closure at a "Not Interested" stage** (cat 24 LOSE, cat 36 "Not Interested"): that closure records a request to stop receiving emails, so the client is fully suppressed from every pipeline, permanently, until Matt personally reverses it. In the sample, 3 partner clients are excluded as opt-outs.1. **Winback (cat 26)**: lifetime partner AND **no order of any size in the last 12 months**. Prior contact does NOT matter: a never-contacted dormant client is a Winback, not a first touch (Matt, 2026-08-06). Dormancy trumps everything.- **Winback outreach is automated inside Bitrix, but not from the first stage** (Matt, 2026-08-06): routing a client into cat 26 drops them into the **Client bucket, the first stage, which is NOT automated**. Bitrix's automation fires only when **Nora moves the deal to a later stage**. So deal creation is safe (it parks the client), Nora's stage move is the send, and Nora controls the outreach pace. No vault-drafted emails either way: the copy lives in the Bitrix automation.- **One winback touch per dormancy spell.** Once routed, the client is not routed again (to Winback or anywhere else) while they remain dormant ("reached out last month, still no order → we don't reach out again"). Only a **new order** resets them; opt-out exits them.2. **Partner Tier Upgrade (cat 24)**: active clients (an order within the last 12 months) only; two doors in:- **First touch:** lifetime partner ($2.5K+, Palladium and up) AND never contacted by a client success rep. Bitrix is the source of truth for "contacted": no deal in any of the three funnels and no recorded client success touch.- **Tier upgrade:** an existing client crosses into a higher tier (weekly `user_group_correct` change, including crossings produced by approved merges in `data/merge_registry.json`).3. **Quarterly Check-In (cat 36)**: previously contacted, **an order within the last 12 months**, and no outreach touch in the last 3 months (any pipeline).- The order-within-12-months condition is what makes Winback suppression hold: a dormant, already-winbacked client must not fall through to the quarterly cadence.4. **No route**: everyone else, including dormant clients already winback-touched: they stay untouched until they order.## Precedence when cat 24 and cat 36 collide *(Matt, 2026-08-12)*"One open outreach pipeline at a time" and the **tier-upgrade door** in rule 2 contradicteach other as originally written, and the contradiction is structural rather than accidental:a tier upgrade by definition applies to an **active** client (an order within 12 months),which is exactly the eligibility condition for Quarterly Check-In. Every tier upgrade of anin-cadence client therefore produces two open pipelines.**Ruling: an open cat-24 deal takes precedence. Quarterly Check-In is PAUSED, not cancelled.**- A client with an open **Partner Tier Upgrade** deal does not run the quarterlycadence concurrently. Park them in cat 36 **Dormant** (`C36:UC_LXCMAV`) rather than closingthe check-in deal: the relationship is not over, the sequence is just deferred.- When the cat-24 sequence closes (won or lost), the existing exit clause takes over(*"cat 24 completes → client is 'in relationship'; the quarterly cadence takes over"*) andthe client re-enters the check-in flow on the normal 3-month rule.- **Do not close a mid-flight cat-24 deal to resolve an overlap.** Cat 24 runs`TIER CHANGE EMAIL SENT → Need Artwork/Mockup → Gift Mockup Sent → Client Approved →Gift Sent → Gift Delivered`; closing it mid-sequence abandons gifting work in progress.- The one-open-pipeline rule stands. This clause says which one wins, not that two are allowed.**Legacy backlog (2026-08-12).** A group of clients was found holding two active pipelines,most of them with cat 24 at **TIER CHANGE EMAIL SENT**, from a bulk tier-change push Hazel ranon 2026-07-20/21, over two weeks **before** these rules were ratified. This is legacy overlap,not a routing failure: `route` already excludes any client with an open deal, so it cannotrecreate the condition. The working list at the time (deal ids, cat-36 side flagged forparking) was a 04-Working note, not included here; the sample's equivalent is`04-Working/dual-active-pipelines_2026-09-21.md`. The stage moves are Hazel's deals and stayhuman-gated.**Not a violation:** one active block alongside `completed` or `lost` ones. Closed deals aredeliberately retained as the evidence for "previously contacted" and "winbacked this spell".In the sample's census, 35 of the 45 pipeline blocks are active, 6 completed and 4 lost.## Exit / reset- **Winback client places an order** → deal closes won; dormancy clock resets; quarterly cadence eligibility resumes.- **Quarterly Check-In completes** → eligible again 3 months after `last_touch`.- **Cat 24 completes** → client is "in relationship"; the quarterly cadence takes over.- **Opt-out** → suppressed from all pipelines, permanently, until Matt reverses it.## Execution model (Matt, 2026-08-06)1. **Winback goes live now.** Every current Winback-eligible client is loaded into the cat 26 **Client bucket**; Nora advances them at her own pace (her stage move = the send). The eligible list is **refreshed weekly**.2. **Partner Tier Upgrade (cat 24)** gets its eligible clients dropped in, with the weekly automation owning the refresh: the driver gains a routing stage (revisions to the current automation, Matt-approved).3. **Quarterly Check-In gets a new first stage: "Dormant"** (Matt is creating it in Bitrix). All check-in-eligible clients park there; Matt manually feeds **N at a time** into the flow, longest-since-last-outreach first. **N is decided with Ines.**4. **Overlap guard:** a client currently in Winback never enters the Check-In pipeline (or its Dormant stage) until they place a new order. One open pipeline per client stands.First candidate list (**v2**, corrected same day after Matt ruled Not-Interested = full opt-out): `routing-candidates_2026-08-06.xlsx` (not included here): Winback by far the largest list, then the cat 24 first touches, a short Dormant queue, and the excluded clients (opt-outs, open deals, winback-done-this-spell). The sample's 2026-09-14 run has the same shape: **Winback 50 / cat 24 first-touch 29 / Dormant queue 4 / excluded 45** (open deals 33, winback-done-this-spell 4, never-contact domains 5, opt-outs 3).## Implementation status + prerequisites**IMPLEMENTED 2026-08-06** in `weekly_partner_pipeline.py`: `reconcile-deals` (absorbs a weekly Bitrix deals pull into census blocks + stubs) and `route` (evaluates this note read-only; emits routing-candidates_<date>.json + the Winback import/role-review CSVs to `05-Outputs/partner-runs/`). Suppression = `data/suppression_list.json` + Not-Interested closures, enforced inside `route`. Wired into the Monday run as Stages F3/F4 ([[Weekly-Partner-Pipeline-SOP]]), **pending Matt syncing the external scheduled-task prompt**. Autonomy unchanged; Bitrix deal creation stays human-gated; `client-enrich` on approved cohorts before sending. Initial loads 2026-08-06: the cat 24 first-touch cohort pushed live; the Dormant queue blocked on the connector seeing the new stage; Winback (role-named rows held) handed to a separate session via the import CSV.Prerequisites before the routing stage can be built:1. ~~Pipeline blocks on the in-flow census chunks~~ **DONE 2026-08-06:** full three-funnel reconcile: new blocks written and existing ones refreshed across the census, so every matched client's chunk now carries pipeline placement (incl. closed deals: status vocabulary active / completed / lost; closed deals are the "previously contacted" and "winbacked this spell" evidence). Unmatched deals and ambiguous ones (duplicate-account pairs) parked in a 04-Working review note (not included here).2. ~~Winback email template~~ **Not needed (2026-08-06):** Winback copy lives in Bitrix's cat-26 automation, not the vault. Deal creation only parks the client in the (non-automated) first-stage bucket; **Nora's stage move is the send**, so she is the natural throttle. Worth documenting in [[Winback-Outreach]] once confirmed: which stages fire, sequence length, stop conditions.3. **First-wave throttling**: with dormancy trumping first-touch, the day-one split is mostly Winback, with cat 24 limited to the never-contacted slice of the active clients. Winback pace is throttled naturally by Nora's stage moves out of the bucket; the open question is bucket-fill pace (dropping the whole Winback cohort into one stage at once has usability costs for her): Matt + Nora's call.4. **`bitrix_id` backfill**: **partial 2026-08-06:** all known-wrong values (Plinth/tracker ids) blanked vault-wide; **verified real contact ids set** for every client with an open cat 26/36 deal, resolved by the authoritative rule *bitrix_id = the contact the client's live deal is attached to* (corroborated by the two 07-24 hand-verified ids). The remainder (mostly not-in-pipeline clients) can wait ("contacted" checks run off pipeline blocks, not contact ids) and is best done inside the weekly run or a dedicated session where the Bitrix MCP is fast.