An international shipment can fail to rate with "The HarmonizedCode field is required" when the business rule that should set the harmonized code does not fire. Point the rule at the field the order actually fills, and correct the country and code data.

Problem

An international shipment will not rate and returns this error:

The HarmonizedCode field is required

It may show with the detail intlCommodities[0].HarmonizedCode. Because it fails on the rate request, the shipment drops out of the rate shop.

Cause

The business rule that should set the harmonized code is not firing, so the code is never filled in and the carrier rejects the rate request. The usual reason is a condition mismatch: the rule keys on a field name the incoming order does not fill (for example, the order sends a value under a name that has no matching field, while the rule reads a Reference field like Ref4). Two data problems can block the same rate even after the rule fires: a destination country sent as a 3-letter code (for example AUS) when Shipstore accepts only the 2-letter form (AU), and a harmonized code with a stray period or other invalid character.

Fix

  1. Reproduce the failing shipment and confirm the error is "The HarmonizedCode field is required" (intlCommodities[0].HarmonizedCode).
  2. Compare the incoming order data to the business rule's conditions, and find the field name the rule keys on (for example a Reference field like Ref4 or a Client field).
  3. Map the host value into the field the rule reads, or change the rule's conditions to key on the field the order actually fills, so the rule fires and sets the harmonized code.
  4. Fix the data faults: send the destination country as the 2-letter code (AU, not AUS), and remove any stray period or invalid character from the harmonized code.
  5. Reprocess the shipment.

What you should see

  • The international shipment rates and stays in the rate shop.
  • The harmonized code is set on the commodity line.