Confidential Document

This document is restricted to RRI leadership.

Incorrect password
UNCLOG — Remove What Slows You Down
U6

Blackthorn Transaction Matching Window

IN PROGRESS Wave 0-1 · 2-3 weeks

Executive Summary

After order-ingestion creates a Salesforce Opportunity, the link-opp-to-transaction job waits for Blackthorn’s bt_stripe__Transaction__c record to appear. Current matching window: 5 minutes. During high-volume events, Blackthorn sync delays beyond 5 minutes cause “orphaned transactions” — charges exist in Stripe and Salesforce but aren’t linked.

There are currently 400K webhook events in the Blackthorn queue — 18+ days to drain at max throughput. Each orphaned transaction requires manual cleanup, and during UPW-scale events, the financial exposure is $33K-$75K+ per event.

The fix combines immediate queue drainage with an exponential backoff retry strategy and a dedicated reconciliation queue — eliminating orphans entirely through deterministic matching using PaymentIntent metadata.

What Needs to Happen

  1. Contact Blackthorn support to drain 400K queue — Enable High Volume Transaction Job. Must start immediately — 18+ days to drain at max throughput. Day 1 action.
  2. Extend matching window from 5 min to exponential backoff — BullMQ custom backoff strategy: 2min, 5min, 10min, 20min, 30min, 60min, 2hr. Replaces hard 5-minute timeout.
  3. Build separate BullMQ reconciliation queue — Runs every 15 minutes during events. Uses card fingerprint + email + amount + timestamp matching for orphan recovery.
  4. Embed Opportunity external_id in PaymentIntent metadata at checkout — Enables deterministic 1:1 matching instead of probabilistic fingerprint matching. This is the permanent fix.
  5. Deploy Spork’s async SF close-won trigger PR — Moves Event Credit creation from synchronous 10-14s to async path with 60s CPU limit. Deploy post-UPW to avoid risk.

Claude Code acceleration: BullMQ backoff strategy configuration and reconciliation queue setup are highly automatable. The matching logic (fingerprint + email + amount + timestamp) can be generated and tested rapidly. Claude Code saves ~1 week on queue infrastructure code, bringing 2-3 weeks down to 1-1.5 weeks.

Completion Criteria

  • Blackthorn 400K queue fully drained
  • Exponential backoff strategy deployed on link-opp-to-transaction job (2min → 2hr)
  • BullMQ reconciliation queue running on 15-minute intervals during events
  • PaymentIntent metadata includes Opportunity external_id for deterministic matching
  • Async SF close-won trigger PR deployed (post-UPW)
  • Zero orphaned transactions during UPW March 12
  • Automated reconciliation catches and links any stragglers within 2 hours

Initiative Attributes

U6 — Blackthorn Transaction Matching Window
Cost
60-96 engineering hours. $6K-$12K total.
Timeline (Original)
2-3 weeks (Wave 0 contact support + Wave 1 full fix)
Timeline (With Claude Code)
1-1.5 weeks
BullMQ backoff + reconciliation queue
Owner
Johnny Yarlott + Spork (Blackthorn config)
Dependencies
Soft: U5 (email no longer bottleneck — U6 is next), D6 (monitoring surfaces orphan counts in real-time)
Unblocks
S8 (real-time event intelligence includes orphan transaction monitoring)
Revenue at Risk
$33K-$75K+ in orphaned transactions per event requiring manual cleanup
Success Metrics
Zero orphaned transactions during UPW; automated reconciliation catches and links any stragglers within 2 hours

Related Risks

IDRiskSeverityProbabilityMitigation
RF4 Blackthorn 400K queue won’t drain before UPW HIGH MEDIUM Contact support immediately. Enable High Volume Transaction Job. Extended matching window (U6 code change) is the fallback.
RF7 Spork overload in Wave 0 (4 initiatives in 9 days) MEDIUM HIGH Kill 6+ daily meetings before March 12. Route status through Kingler. Erik must cancel cross-department meetings. This is structural, not personal.