---
id: change/bcapps/9320
type: change
title: "#9320 [Shopify] Import HS code and country of origin from Shopify"
summary: The Shopify connector now imports harmonized system codes and country of origin from Shopify variants when the sync setting is enabled, matching them to existing Business Central tariff numbers and countries during item creation and updates.
tier: official
language: en
tags:
  - feature
  - main
  - bc30
  - codeunit shpfy filter mgt.
  - codeunit shpfy create item
  - codeunit shpfy update item
  - codeunit shpfy variant api
system: integration
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:12:34.140Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: d03f4ddf7267c0552bbd478f21bc504b7e5155c1
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/9320
    title: "microsoft/BCApps#9320: [Shopify] Import HS code and country of origin from Shopify"
    date: "2026-07-16"
    commit: d03f4ddf7267c0552bbd478f21bc504b7e5155c1
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/codeunit/30104
    - object/codeunit/30171
    - object/codeunit/30188
    - object/codeunit/30189
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 9320
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/9320
kind: pr
base_branch: main
major: "30"
merged_at: "2026-07-16T16:27:23Z"
author: onbuyuka
author_type: User
community_contribution: false
labels:
  - "AL: Apps (W1)"
  - "Team: Integrations"
change_class: code
change_kind: feature
behavior_change: true
breaking: false
files:
  count: 8
  additions: 436
  deletions: 6
  al: 4
apps:
  - Shopify
objects_touched:
  - key: codeunit/30104
    page: codeunit/30104
    type: codeunit
    id: 30104
    name: Shpfy Filter Mgt.
    app: Shopify
    status: modified
  - key: codeunit/30171
    page: codeunit/30171
    type: codeunit
    id: 30171
    name: Shpfy Create Item
    app: Shopify
    status: modified
  - key: codeunit/30188
    page: codeunit/30188
    type: codeunit
    id: 30188
    name: Shpfy Update Item
    app: Shopify
    status: modified
  - key: codeunit/30189
    page: codeunit/30189
    type: codeunit
    id: 30189
    name: Shpfy Variant API
    app: Shopify
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 642046
systems:
  - integration
quote: null
joined_against:
  major: "30"
  commit: ecbc028c25dbe83b61313bc566e6c1d41184bb1c
---

# #9320 [Shopify] Import HS code and country of origin from Shopify

> The Shopify connector now imports harmonized system codes and country of origin from Shopify variants when the sync setting is enabled, matching them to existing Business Central tariff numbers and countries during item creation and updates.

[Pull request](https://github.com/microsoft/BCApps/pull/9320) · merged into `main` (BC30) on 2026-07-16 by onbuyuka · 8 files (+436 -6), 4 AL · feature · tier official · reviewed (checked by Opus)

## What changed

- HS codes are fetched from Shopify inventory items and applied to item tariff numbers during import
- Country ISO codes from Shopify are resolved to Business Central country/region codes
- Tariff numbers are only populated if they already exist in Business Central; separator-less Shopify codes are matched to dotted BC tariff numbers by digit comparison
- Updates preserve existing item values when Shopify data is unmapped or blank
- Feature is controlled by the existing Sync HS Code and Country setting and includes comprehensive test coverage
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 30104 "Shpfy Filter Mgt."](../../objects/codeunit/30104.md), Shopify: modified
- [Codeunit 30171 "Shpfy Create Item"](../../objects/codeunit/30171.md), Shopify: modified
- [Codeunit 30188 "Shpfy Update Item"](../../objects/codeunit/30188.md), Shopify: modified
- [Codeunit 30189 "Shpfy Variant API"](../../objects/codeunit/30189.md), Shopify: modified

## Context

- Work items: AB#642046
- Labels: AL: Apps (W1), Team: Integrations
- Systems: integration

Source: metadata of a merged pull request in microsoft/BCApps (bcapps): title, labels, changed paths and counts, with a summary in our words. No source text and no description beyond one short quote (D10, D61).
