DOCS

Category Validation

Category Validation

Controleer of de toegewezen categorieën van een item bij het product passen, en krijg betere categorie-suggesties wanneer dat niet zo is.

Category validation 

Productcategorieën beschrijven what an item is, usually as a hierarchy from a broad root to a specific leaf — for example, ["Footwear", "Athletic", "Running Shoes"]. Nauwkeurige categorieën houden uw catalogus schoon and feed downstream processes such as classification and trade compliance, where a mis-categorized item can produce the wrong result.

Catalogi verzamelen categoriefouten in de loop der tijd — from manual entry, supplier feeds, or migrations between systems. Zonos Category Validation checks whether the categories assigned to an item actually describe that item, and when they don't, suggests better categories drawn from the categories your organization already uses.

How it works 

Zonos Category Validation gebruikt AI to judge whether the category hierarchy you supply correctly describes an item, based on the item's name and any additional details you provide such as brand, material, and description.

For each item it returns a verdict of CORRECT or WRONG along with a confidence score. When the verdict is WRONG, it returns a ranked list of suggested categories so you can correct the assignment. Suggestions are drawn from your organization's category tree — the set of category paths your organization uses — and any categories you submit are added to that tree automatically, so a well-maintained tree produces better suggestions over time.

Dit is een batch-endpoint — u kunt veel items in één verzoek valideren, and the results are returned in the same order as the input.

Verdict and confidence 

Elk resultaat bevat a verdict:

  • CORRECT — the item plausibly belongs in the assigned categories.
  • WRONG — the item does not belong in the assigned categories.

Each result also includes a confidenceScore between 0.0 and 1.0 indicating how confident the model is in the verdict it returned. The score reflects certainty in the verdict itself, so a confidently WRONG result has a high confidenceScore just as a confidently CORRECT one does. When the verdict is WRONG, the suggestedCategories list contains alternative category hierarchies, each with a confidence value and sorted from most to least likely. When the verdict is CORRECT, suggestedCategories is empty.

We raden aan de confidence score te gebruiken om te bepalen welke resultaten automatisch worden geaccepteerd en welke naar handmatige review gaan.

Validate categories 

Gebruik de categoriesValidate-mutatie om categorieën te valideren, use the categoriesValidate mutation. Each item requires a name and the categories hierarchy to validate. You can optionally include brand, material, description, amount, currencyCode, globalTradeItemNumber, and imageUrl to improve accuracy. Submit multiple items in a single request to validate in bulk.

1mutation CategoriesValidate($input: [CategoryValidateInput!]!) {
2 categoriesValidate(input: $input) {
3 id
4 name
5 categories
6 verdict
7 confidenceScore
8 suggestedCategories {
9 category
10 confidence
11 }
12 }
13}

In het bovenstaande voorbeeld worden de categorieën van het eerste item bevestigd as CORRECT with high confidence and no suggestions. The second item is confidently flagged WRONG, and the suggestedCategories list proposes better-fitting categories ranked by confidence.

Manage your category tree 

De categorieboom van uw organisatie is the set of category paths Zonos knows your organization uses. Category Validation draws its suggestedCategories from this tree, so keeping it accurate and complete directly improves the quality of suggestions. Categories you submit to categoriesValidate are added to the tree automatically, but you can also manage it directly.

Each category is a hierarchy stored as a path array, from broad root to specific leaf — for example, ["Footwear", "Athletic", "Running Shoes"].

List your categories

Gebruik de categories-query to retrieve your organization's category tree. Results are paginated.

1query Categories {
2 categories(first: 50) {
3 totalCount
4 edges {
5 node {
6 id
7 path
8 }
9 }
10 }
11}

Add categories

Gebruik de categoriesCreate-mutatie to add one or more category paths to your tree. This is useful for seeding the tree before validation so suggestions can draw on your full taxonomy.

1mutation CategoriesCreate($input: [CategoryCreateInput!]!) {
2 categoriesCreate(input: $input) {
3 id
4 path
5 }
6}

Update or remove categories

Gebruik de categoryUpdate-mutatie to correct a category's path by its id, or the categoryDelete mutation to remove a category that no longer applies. Pruning stale or incorrect categories keeps suggestions relevant.

1mutation CategoryUpdate($input: CategoryUpdateInput!) {
2 categoryUpdate(input: $input) {
3 id
4 path
5 }
6}

Om een categorie te verwijderen, geeft u de id door aan de categoryDelete-mutatie. Die retourneert SUCCESS of FAILURE.

1mutation CategoryDelete($id: ID!) {
2 categoryDelete(id: $id)
3}
GraphQL API ReferenceTypes, inputs, and operations used in this guide
Boek een demo

Was deze pagina nuttig?