# Handle the result

Source: https://developer.avalara.com/products/self-serve-tariff-code/integration-guides/classyvue-integration-guide/txc1009778287597/

Guide: ClassyVue integration guide

# Handle the result

When a user completes a classification, ClassyVue returns a result object to the host page through a callback function. Learn how to wire the callback and use the fields in the result object.

When a user confirms a classification, ClassyVue invokes the callback function registered in `data-on-complete` or passed directly to `ccce.classify()`. The callback receives a result object containing the tariff code and associated metadata for the classified product.

Wire the callback function to receive and process the result object as follows:

```
function onClassifyComplete(result) {
  // result.code        — final tariff code at native digit length
  // result.hs6         — universal 6-digit HS root
  // result.schedule    — 'HTSUS' | 'ScheduleB' | 'CN' | 'TARIC' | ...
  // result.country     — 'US' | 'DE' | ...
  // result.description — official tariff description
  // result.importMode  — echoes the importMode value used in the request
  saveToCatalog({
    sku: currentSku,
    hs6: result.hs6,
    exportCode: result.code,
    schedule: result.schedule
  });
}
function onClassifyAbort(context) {
  console.log('Classification cancelled', context);
}
```

If the user closes the widget before completing a classification, ClassyVue invokes the abort callback registered in `data-on-abort` or passed directly to `ccce.classify()`. Always inspect the full result object in `verbose` mode against a nonproduction environment when wiring a new integration, as exact field names can vary between ClassyVue releases.