Blackthorn Transaction Matching Window
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
- 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.
- 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.
- Build separate BullMQ reconciliation queue — Runs every 15 minutes during events. Uses card fingerprint + email + amount + timestamp matching for orphan recovery.
- Embed Opportunity
external_idin PaymentIntent metadata at checkout — Enables deterministic 1:1 matching instead of probabilistic fingerprint matching. This is the permanent fix. - 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-transactionjob (2min → 2hr) - BullMQ reconciliation queue running on 15-minute intervals during events
- PaymentIntent metadata includes Opportunity
external_idfor 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
Related Risks
| ID | Risk | Severity | Probability | Mitigation |
|---|---|---|---|---|
| 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. |