Skip to content

[Shopify] Add Belgium localization for company tax id mapping (Enterprise No.)#9138

Open
onbuyuka wants to merge 8 commits into
mainfrom
bugs/640073-shopify-be-enterprise-no
Open

[Shopify] Add Belgium localization for company tax id mapping (Enterprise No.)#9138
onbuyuka wants to merge 8 commits into
mainfrom
bugs/640073-shopify-be-enterprise-no

Conversation

@onbuyuka

@onbuyuka onbuyuka commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Belgian B2B company/customer sync (Report 30114 "Shpfy Sync Companies") failed for Belgian customers. The Shpfy Comp. Tax Id Mapping enum (30166) only offered Registration No. and VAT Registration No.. The Belgian localization blocks writing VAT Registration No. for Belgian customers ("You must use Enterprise No. for Belgian customers."), which must instead use Enterprise No. (field 11310). No valid mapping existed for a Belgian shop.

Changes

New Belgium localization app Shopify Connector BE (src/Apps/BE/ShopifyBE):

  • enumextension "Shpfy Comp. Tax Id Mapping BE" adds an Enterprise No. value to the mapping enum.
  • codeunit "Shpfy Enterprise No. BE" implements Shpfy Tax Registration Id Mapping, mapping the Shopify tax registration id to the customer's Enterprise No. (field 11310).
  • Registered in build/projects.json + build/groups.json for BE only. The app is opt-in (skipInstallOnPrem, no installOnEnvironmentUpdate) — it is not auto-installed, mirroring the install behavior of its parent (the opt-in Shopify Connector).

On-demand discoverability (in the W1 Shopify Connector, Shpfy Shop Mgt.):

  • On opening the Shopify Shops list, if the environment is a Belgian localization (GetApplicationFamily() = ''BE'') and the Shopify Connector BE app is not installed, a notification offers to install it from the marketplace (ExtensionManagement.InstallMarketplaceExtension). Integrated with My Notifications so it is dismissable. This detection lives in the always-installed W1 app by necessity — it fires precisely when the BE app is absent (same pattern as Quality Management''s demo-data prompt).

Once the BE app is installed, a Belgian merchant sets Company Tax Id Mapping = Enterprise No. on the Shop Card. The Enterprise No. option only exists on BE environments (the app is BE only), so no config-time guard is needed.

Test plan

New test project Shopify Connector BE Test (codeunit "Shpfy Tax Id Mapping BE Test"), mirroring the W1 Shpfy Tax Id Mapping Test:

  • GetTaxRegistrationId returns the customer''s Enterprise No.
  • SetMappingFiltersForCustomers filters customers by Enterprise No.
  • UpdateTaxRegistrationId writes the Enterprise No. (BE country/MOD97 validation bypassed via the OnBeforeValidateEnterpriseNo publisher to isolate the mapping logic).

Fixes AB#640073

…rise No.)

Belgian B2B company/customer sync (Report 30114 "Shpfy Sync Companies") failed
because the "Shpfy Comp. Tax Id Mapping" enum only offered "Registration No." and
"VAT Registration No.". The Belgian localization forbids writing "VAT Registration
No." for Belgian customers, which must use "Enterprise No." (field 11310), so no
valid mapping existed for a Belgian shop.

Add a Belgium localization app (Shopify Connector BE) that extends the mapping
enum with an "Enterprise No." value and an implementation that maps the Shopify
tax registration id to the customer's Enterprise No. Includes a test project.

Fixes AB#640073

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@onbuyuka
onbuyuka requested review from a team July 6, 2026 15:34
@onbuyuka
onbuyuka requested a review from a team as a code owner July 6, 2026 15:34
@github-actions github-actions Bot added the Build: scripts & configs Build scripts and configuration files label Jul 6, 2026
@github-actions github-actions Bot added this to the Version 29.0 milestone Jul 6, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Copilot PR Review

Iteration 9 · Outcome: completed

Knowledge source: https://github.com/microsoft/BCQuality@822cae1b2771ac25f665f73369f69093bd4fd630

Orchestrator pre-filter (13 file(s) excluded)

  • layer-disabled (knowledge) : 13 file(s)

Findings produced by the Copilot CLI agent against BCQuality at 822cae1b2771ac25f665f73369f69093bd4fd630. Reply 👎 on any inline comment to flag false positives.

@onbuyuka
onbuyuka enabled auto-merge July 6, 2026 17:16
onbuyuka and others added 2 commits July 6, 2026 19:18
Regenerated via build/scripts/Update-CountryProjectSettings.ps1 to register the
new Shopify Connector BE app and test folders.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The Base group is installed for the DemoTool during Legacy tests via
Install-BaseAppsForDemoTool. Shopify Connector BE depends on the W1 Shopify
Connector, which is not in the Base group, so installing the BE app in that
phase failed (dependency not yet installed). Match the Intrastat BE group
membership (no Base), consistent with the W1 Shopify Connector which is also
not in the Base group.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
JesperSchulz
JesperSchulz previously approved these changes Jul 7, 2026
Shopify Connector BE depends on the W1 Shopify Connector, which is an opt-in
app (skipInstallOnPrem, not installed on environment update). Setting
installOnEnvironmentUpdate on the BE app would try to auto-install it on all BE
environments even where the Shopify Connector dependency is not present.

Mirror the parent instead: use skipInstallOnPrem and drop installOnEnvironment-
Update in projects.json, and remove the redundant OnPrem doNotInstall flags in
groups.json so the group membership matches the W1 Shopify Connector exactly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
darjoo
darjoo previously approved these changes Jul 7, 2026
Instead of auto-installing the Shopify Connector BE app on every Belgian
environment, keep it opt-in and prompt the user to install it on demand,
mirroring the Quality Management demo-data pattern.

On opening the Shopify Shops list, if the environment is a Belgian localization
(application family "BE") and the Shopify Connector BE extension is not
installed, show a notification offering to install it from the marketplace
(ExtensionManagement.InstallMarketplaceExtension). The notification integrates
with My Notifications so users can dismiss it permanently. No hard dependency
on the BE app - only its app id is referenced.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added the AL: Apps (W1) Add-on apps for W1 label Jul 7, 2026
Comment thread src/Apps/W1/Shopify/App/src/Base/Codeunits/ShpfyBelgianLocalization.Codeunit.al Outdated
onbuyuka and others added 2 commits July 7, 2026 15:23
Fold the on-demand install notification logic into the existing general-purpose
"Shpfy Shop Mgt." codeunit (which already owns the connector's My Notifications
handling and is the Shop list page's helper) instead of a dedicated BE-specific
codeunit. Removes codeunit "Shpfy Belgian Localization".

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The label is used as a notification action caption (AddAction), which is a
label/caption role, so it should use the Lbl suffix rather than Msg (reserved
for Message() text). Renames DontShowThisAgainMsg to DontShowThisAgainLbl
across all notification actions in the codeunit.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Stale Status Check Deleted

The Pull Request Build workflow run for this PR was older than 72 hours and has been deleted.

📋 Why was it deleted?

Status checks that are too old may no longer reflect the current state of the target branch. To ensure this PR is validated against the latest code and passes up-to-date checks, a fresh build is required.


🔄 How to trigger a new status check:

  1. 📤 Push a new commit to the PR branch, or
  2. 🔁 Close and reopen the PR

This will automatically trigger a new Pull Request Build workflow run.

@onbuyuka
onbuyuka disabled auto-merge July 11, 2026 09:51
@onbuyuka onbuyuka closed this Jul 11, 2026
@onbuyuka onbuyuka reopened this Jul 11, 2026
@onbuyuka
onbuyuka enabled auto-merge July 11, 2026 09:51
Comment thread src/Apps/W1/Shopify/App/src/Base/Codeunits/ShpfyShopMgt.Codeunit.al
Comment thread src/Apps/W1/Shopify/App/src/Base/Codeunits/ShpfyShopMgt.Codeunit.al
@onbuyuka
onbuyuka dismissed gggdttt’s stale review July 15, 2026 14:49

Addressed via review replies: the notification detection must live in the always-installed W1 app (fires when the BE app is absent, mirroring the Quality Management install-on-demand pattern), and the PR description has been corrected to reflect the opt-in (not auto-installed) behavior, so the notification is not dead code. Both review threads resolved.

@JesperSchulz JesperSchulz added the Integration GitHub request for Integration area label Jul 17, 2026
@github-actions github-actions Bot added Other GitHub request for other area than SCM, Finance or Integration Ownership: Needs Review Ownership is Other, low confidence, or needs manual correction and removed Integration GitHub request for Integration area labels Jul 17, 2026
@JesperSchulz JesperSchulz added Integration GitHub request for Integration area Ownership: Manual Preserve the manually selected team ownership and removed Ownership: Needs Review Ownership is Other, low confidence, or needs manual correction labels Jul 17, 2026
@github-actions github-actions Bot added the Ownership: Needs Review Ownership is Other, low confidence, or needs manual correction label Jul 17, 2026
@JesperSchulz JesperSchulz removed Other GitHub request for other area than SCM, Finance or Integration Ownership: Needs Review Ownership is Other, low confidence, or needs manual correction labels Jul 17, 2026
@JesperSchulz JesperSchulz removed the Ownership: Manual Preserve the manually selected team ownership label Jul 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Stale Status Check Deleted

The Pull Request Build workflow run for this PR was older than 72 hours and has been deleted.

📋 Why was it deleted?

Status checks that are too old may no longer reflect the current state of the target branch. To ensure this PR is validated against the latest code and passes up-to-date checks, a fresh build is required.


🔄 How to trigger a new status check:

  1. 📤 Push a new commit to the PR branch, or
  2. 🔁 Close and reopen the PR

This will automatically trigger a new Pull Request Build workflow run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AL: Apps (W1) Add-on apps for W1 Build: scripts & configs Build scripts and configuration files Integration GitHub request for Integration area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants