Users need to display HS Tariff Codes and Country of Origin on invoice templates for international shipping compliance (particularly post-Brexit for GB). The core issue is that while Shopify’s product database stores these fields, they are not available in the Liquid variable reference list for invoice templates.
Current Status:
No native solution exists; the required variables are missing from Shopify’s Liquid documentation
One user describes this as a potential bug/oversight that should be fixed
Manual processing is the current workaround for some merchants
Proposed Workaround:
Create variant-level metafields and copy HS codes there, then reference them in templates using: {{ line_item.variant.metafields.harmonized_system_code.value }}
Outcome:
The discussion remains unresolved with no official Shopify response. The metafield workaround is the only technical solution offered, though it requires additional setup and data duplication.
Summarized with AI on October 24.
AI used: claude-sonnet-4-5-20250929.
I have the exact same question. The variables country of origin and customs code can be added to the products in shopify. But the fields are useless if these fields are not in the Liquid variables list and there is no information anywhere on the code needed to add this variable to the invoice template. The liquid variables list in shopify should be updated to add these 2 variables, there is no reason for it not to be on the list as it is a standard variable. It just seems like these 2 variables missing on the Liquid variables list is a bug/error in Shopify that should be fixed