The problem
In B2B ordering the buyer usually knows the main item and forgets the rest: the consumables, the accessories, the part that always goes with it. Catalog cross-sell lists are curated by hand, and nobody curates the long tail.
How it works
_relate over the order baskets ranks the products that appear with the anchor more often than their base rate, by lift, and shows the counts behind each pair so a thin pair reads as thin; pairs seen together in fewer than three baskets are left out. On products with enough history it performs on par with counting co-occurrences, and on rarely bought products counting does better; its value is that the same query gives the lift, the counts and the conditioning (a customer segment, a season) without a separate pipeline.
The Recommendations view is part of the ERP demo's Retail profile; the link opens it directly.
{
"from": "baskets",
"relate": [
"products"
],
"where": {
"products": {
"$has": "SKU-2764"
}
},
"select": [
"related",
"condition",
"lift",
"fs"
],
"orderBy": "lift",
"limit": 60
}For the full architecture, see the technology overview. For the broader narrative across multiple use cases, read The Predictive Application.
See it live
This use case runs in the 📋 ERP demo today. Click through to the live application and inspect the queries that produce the result.



