Guide
SKU and part number search: the B2B ecommerce guide
SKU search lets a buyer find a product by typing its stock keeping unit code, manufacturer part number or barcode instead of its name. In B2B ecommerce it is the most common way repeat customers reorder, and the query type most retail search tools handle worst. This guide explains what good code search does and how to test for it.
On this page
- Why distributor buyers search by code
- The five ways a buyer types a code
- Partial and unformatted matching
- Barcode and UPC lookup
- Typo tolerance for codes is a different problem from typo tolerance for words
- Manufacturer part numbers, aliases and superseded codes
- Quick order: many codes at once
- Where the codes come from decides how well this works
- How to test a search tool on your own codes
- Frequently asked questions
Why distributor buyers search by code
Distributor buyers search by code because they are reordering, not discovering. They work from an invoice, a shelf label, a supplier's catalog or a handheld scanner, and they type what is printed there. In wholesale catalogs a large share of all queries contain a code.
Three things follow. Code search is the highest-volume query type on a distributor storefront. It is the highest-intent, because the buyer already knows what they want. And it is the least forgiving: a buyer who types a code and gets nothing does not browse, they phone in the order or open another supplier's portal.
The five ways a buyer types a code
A good code search resolves five variants of the same SKU. Testing a search tool means typing all five and checking that each returns the same product.
| Buyer types | Variant | What must happen |
|---|---|---|
| 123-57-ABC | Exact | Top result, instantly |
| 12357abc | Separators and case removed | Same result as exact |
| 57-AB | Mid-string fragment | The product, plus siblings sharing the fragment |
| 123-57 | Prefix | Every 123-57-* variant, as a group |
| 123-75-ABC | Transposed digits | The right product, labelled "Did you mean", ranked below any exact match |
Most retail-first tools pass the first test and fail the third and fifth. They tokenise codes as words, so a fragment that is not a whole token finds nothing, and typo tolerance tuned for words either ignores codes or returns the wrong product with confidence.
Buyer types
- 123-57-ABCExact
- 12357abcSeparators and case ignored
- 57-ABMid-string fragment
- 123-57Prefix
- 123-75-ABCTransposed digits
SKU 123-57-ABC
Blue Razz 5000 · 10 pack
Top result
Partial and unformatted matching
Partial matching works when the index stores each code as a sequence of segments and matches on prefixes, suffixes and interior runs, ignoring dashes, dots, slashes, spaces and letter case. The buyer should never have to know how the code is formatted in the catalog. "RAW1-1/4", "raw 1 1/4" and "RAW114" are one query.
Barcode and UPC lookup
Barcode lookup resolves a UPC or EAN to the product and shows the price for the signed-in account. A handheld scanner types the barcode into the search field exactly like a keyboard, so no special integration is needed if the search index holds barcode fields from the ERP. Buyers in a stockroom can scan a shelf and reorder without knowing the product name. Case and inner-pack barcodes should resolve to the same product with the matching unit of measure when those barcodes are in the item master.
Typo tolerance for codes is a different problem from typo tolerance for words
Typo tolerance for codes must be tighter than for words. One wrong letter in "menthol" is harmless. One wrong digit in a part number is a different product, possibly a different price and pack size. The right behaviour is to treat transposed digits and single-character substitutions as near matches, rank them below any exact or partial hit, and label them visibly as a suggestion. A tool that silently returns the near match as if it were exact will eventually ship the wrong item.
Manufacturer part numbers, aliases and superseded codes
The buyer may know the manufacturer's code, the distributor's internal SKU, a code the product carried last year, or a competitor's code for the same item. Good code search indexes every alias field the ERP holds, so any of them finds the product. Superseded codes should resolve to the replacement with a note when the ERP stores that relationship. Cross-references to competitor codes are the hardest to maintain and the most valuable, because they capture buyers switching suppliers. Shopsense searches the alias fields you map. It does not keep a second cross-reference list.
Quick order: many codes at once
Quick order lets a buyer paste a list of codes and quantities and have every line resolved in one step. It is the fastest path from a purchase order to a cart. The search tool should flag lines that are out of stock, discontinued or not available to that account, and offer the replacement where one exists. Shopsense does not document a quick-order paste on this site until that feature is in the product.
Where the codes come from decides how well this works
Code search is only as complete as the code fields in the index. When the index is built from a product feed, alias and barcode fields are often dropped on the way. When the index reads the ERP's item master directly, every code the business already maintains is searchable with no second list. Shopsense is a B2B ecommerce search engine for distributors and wholesalers that connects directly to ERP systems. See the guide to ERP-integrated ecommerce search.
How to test a search tool on your own codes
Test code search with your own data, not the vendor's demo catalog. A 30-minute test is enough.
- Export 50 SKUs, including 10 with dashes or slashes and 10 with aliases.
- Type each one exactly, then without separators, then as a mid-string fragment.
- Transpose two digits in 10 of them and check that the right product appears, labelled as a suggestion.
- Scan 10 barcodes with a handheld and check unit resolution. Check case resolution if those barcodes are mapped.
- If the tool offers quick order, paste 20 code-and-quantity lines and time the result.
- Pull last month's zero-result queries from your current search log and run them all.
Frequently asked questions
Keep reading
Next step
See Shopsense on your own catalog
Send us a product export or connect a sandbox ERP and we will show you live search on your data.