STAYCHARTED BLOG · PROCUREMENT & UNSPSC
UNSPSC classification with AI: learn from your reviewed purchase records
Classify purchase and invoice rows into UNSPSC codes using reviewed examples. Choose a taxonomy level, test accuracy and review uncertain spend categories.
What is UNSPSC classification?
UNSPSC is the United Nations Standard Products and Services Code. Its four main levels are Segment, Family, Class and Commodity, represented by an eight-digit code. Procurement teams use the hierarchy to organize what they buy. The U.S. Department of Commerce explains that structure; UNDP provides the official program information.
A model trained on your reviewed purchase records learns which labels your team applies. It is not a substitute for the code definitions or a complete code database. Check the current standard and applicable use terms before building your training labels.
Choose the granularity you need. A family-level analysis may be useful even when the line descriptions cannot support reliable commodity-level classification.
Prepare purchase rows, not just supplier names
A supplier may sell office supplies, computing equipment and maintenance services. Assigning its entire spend to one category can conceal important differences. Line descriptions and purchasing context help separate them.
| Field | Why it may help | What to check |
|---|---|---|
| Item or service description | Describes what was purchased | Avoid empty or generic text |
| Existing commodity text | Adds business context | Exclude fields unavailable at prediction time |
| Supplier | Can clarify terminology | Do not assume one category per supplier |
| Reviewed UNSPSC code | The answer to learn | Use one agreed taxonomy version |
Keep the original record ID and amount for reconciliation and later spend analysis. The classifier chooses a category; your spreadsheet or procurement system calculates totals.
Train on reviewed codes rather than copying uncertain legacy mappings wholesale. Otherwise, the model can reproduce the same mistakes faster.
How to automate UNSPSC suggestions
- Pick one department, purchase stream or category level for the pilot.
- Collect descriptions and final reviewed UNSPSC labels at that level.
- Resolve outdated codes, conflicting labels and duplicate records before training.
- Train in StayCharted and review the errors on held-out rows, including uncommon categories.
- Fill a copy of a new purchase file or call the API from your procurement workflow.
- Have reviewers check uncertain results and confirm codes against your chosen standard version.
- Store approved corrections as examples for a later model version.
Use a later batch or a supplier not represented heavily in training to test generalization. Strong results on repeated item descriptions do not establish performance on new kinds of purchases.
If a new purchase falls outside the categories in your examples, send it for review rather than treating a confident known-category answer as proof of fit.
UNSPSC, GL accounts and HS codes solve different problems
UNSPSC describes the product or service being purchased. A GL account reflects your accounting structure. An HS code concerns customs classification. Do not treat these labels as interchangeable or infer a universal one-to-one mapping.
You can train separate models for separate decisions when you have approved examples for each. For accounting workflows, see AI invoice coding. For the broader taxonomy discussion, see classification standards.
StayCharted supplies suggestions from your examples. Your procurement owners remain responsible for the categories used in reports. Start with a manageable set of well-understood labels, then expand when the evaluation supports it.
Common questions
Can AI assign UNSPSC codes?
A trained classifier can suggest codes represented in reviewed training examples. Validate results against the chosen UNSPSC version and review uncertain or unfamiliar purchases.
Do I need examples for every UNSPSC code?
You need representative examples for the categories you intend the model to predict. Start with the subset or broader hierarchy level relevant to your purchasing data.
Is UNSPSC the same as a GL account or HS code?
No. UNSPSC classifies products and services, GL accounts organize accounting entries, and HS codes concern customs classification. Each requires its own appropriate labels and review.
Does StayCharted include an automatically updated UNSPSC database?
This workflow uses the categories and reviewed labels you provide. Maintain the standard version and code definitions as part of your procurement process.