DIS Routing Analysis Report
Date: 2026-01-14 Database: crop_dev Total BNS Parts Analyzed: 1314
DIS Routing Analysis Report
Date: 2026-01-14 Database: crop_dev Total BNS Parts Analyzed: 1314
Executive Summary
Investigation into ~500 "not found" parts in DIS API revealed that the issue is primarily incorrect manufacturer code routing, not missing parts in DIS. After optimizing the routing logic, we achieved:
| Metric | Before | After | Improvement |
|---|---|---|---|
| Found with routing | ~74% | 81.3% | +7.3% |
| Truly not found | ~350 | 72 | -278 parts |
| Misrouted (edge cases) | Unknown | 174 | Identified |
Current Routing Logic
BNS (Briggs & Stratton) parts require smart routing based on part number patterns:
| Pattern | Example | Route To | Success Rate |
|---|---|---|---|
| DOT_FORMAT | 06.0043, 81.A048 | VNT | 97% |
| DIGIT_7 | 5020875 | FER | 95% |
| FS_SUFFIX | 5106952FS | FER | 90% |
| X_SUFFIX | 5020843X2 | FER | 93% |
| SM_SUFFIX | 5020441SM | B&S | 72% |
| YP_SUFFIX | 5022383YP | B&S | 76% |
| GS_SUFFIX | 5021089GS | B&S | 100% |
| S_SUFFIX | 5104045S | B&S | 65% |
| DIGIT_6 | 197546 | B&S | 92% |
| DIGIT_8_84 | 84003203 | B&S | 72% |
| DIGIT_OTHER | 50214085 | B&S | - |
| DASH_FORMAT | 396-726 | B&S | 0% |
| OTHER | 27918 | FER | 20% |
Issues Identified
1. Data Entry Errors (Immediate Fix Required)
| Original | Corrected | Code | Issue |
|---|---|---|---|
| 06-0063 | 06.0063 | VNT | Dash instead of dot |
| 5101756X2BS | 5101756X2 | FER | Extra "BS" suffix |
| 5101986SBS | 5101986S | FER | Extra "BS" suffix |
| 5105512SBS | 5105512S | FER | Extra "BS" suffix |
2. Pattern Routing Edge Cases (174 parts)
These parts are correctly routed by pattern statistics, but individually would be found with a different code:
| Pattern | Current Route | Parts Found Elsewhere | Best Alt |
|---|---|---|---|
| SM | B&S | 53 | FER (52) |
| YP | B&S | 33 | FER (32) |
| D8-84 | B&S | 40 | FER (40) |
| D6 | B&S | 12 | FER (7), NHL (2) |
| FS | FER | 11 | B&S (11) |
| D7 | FER | 6 | B&S (4) |
| OTHER | FER | 11 | B&S (6), NHL (5) |
Note: Changing routing for these patterns would harm more parts than it helps. The current routing is statistically optimal.
3. Truly Not Found Parts (72 parts)
These parts were not found with ANY manufacturer code tested:
| Pattern | Count | Examples |
|---|---|---|
| DASH | 12 | 0509-0269, 396-726, 396-727 |
| OTHER | 30 | 26156, 50450370B, 102409501 |
| D6 | 8 | 278035, 278036, 496590 |
| D7 | 8 | 1670855, 5020875, 5021181 |
| S | 7 | 183390PS, 499486S |
| D8 | 3 | 50214085, 80175702 |
| SM | 2 | 5046360XISM, 5100259SM |
| DOT | 2 | 8.A065, 81.B50 |
| YP | 1 | 5101071YP |
| X | 1 | 510016X1 |
| FS | 1 | 5106952FS |
These require manual investigation - possible causes:
- Data entry errors (typos in part numbers)
- Parts not yet added to DIS
- Internal/OEM numbers not in DIS catalog
- Different manufacturer codes not in our test list
Recommendations
Phase 1: Immediate Fixes (High Impact)
-
Fix data entry errors in parts_bns collection:
// In MongoDB db.parts_bns.updateOne({ partNumber: "06-0063" }, { $set: { partNumber: "06.0063" }}) -
Strip BS suffix from part numbers ending in "SBS" or "BS" when querying DIS (or fix in DB)
Phase 2: Per-Part Override System (Medium Impact)
Create an override collection for edge cases:
interface PartRouteOverride {
vendorCode: string; // "BNS"
partNumber: string; // "5020441SM"
manufacturerCode: string; // "FER" instead of default "B&S"
}This would boost found rate from 81.3% to 94.5% without changing pattern logic.
Phase 3: Manual Review (Cleanup)
Generate a report of 72 truly not-found parts for manual review:
- Verify part numbers are correct
- Check if parts exist in DIS under different numbers
- Consider removing obsolete parts from database
Files Modified
Frontend
/lib/types/dis.ts- Added X_SUFFIX pattern, fixed DOT_FORMAT regex
Backend
/CROP-parts-services/services/catalog/src/services/dis-service.ts- Synced with frontend
Scripts Created
scripts/analyze-misrouted.ts- Pattern analysisscripts/quick-investigate.ts- Fast batch investigationscripts/analyze-not-found-patterns.ts- Typo detectionscripts/routing-gap-analysis.ts- Full gap analysis
Conclusion
The "500 not found" issue was reduced to:
- 174 edge cases - Pattern routing is optimal, but individual parts differ
- 72 truly not found - Require manual investigation
- 1068 parts (81.3%) - Now correctly found with optimized routing
With per-part overrides for the 174 edge cases, we could achieve 94.5% found rate.