Fix: Map BC country code to ISO code for Shopify Tax Area lookups#6130
Open
frank-embleton wants to merge 1 commit intomicrosoft:mainfrom
Open
Fix: Map BC country code to ISO code for Shopify Tax Area lookups#6130frank-embleton wants to merge 1 commit intomicrosoft:mainfrom
frank-embleton wants to merge 1 commit intomicrosoft:mainfrom
Conversation
Fixes microsoft#6129 ## Problem The Shopify Connector failed when exporting customers/companies with the EU country code 'EL' for Greece. Business Central uses 'EL' for VIES (VAT Information Exchange System) validation, but Shopify requires the ISO 3166-1 alpha-2 code 'GR'. The Shpfy Tax Area table stores Shopify's ISO country codes, but the export functions were using BC's country code directly for Tax Area lookups, causing province information lookups to fail. ## Solution Modified ShpfyCustomerExport and ShpfyCompanyExport codeunits to: 1. Get the ISO country code from the Country/Region table first 2. Use the ISO code for Tax Area lookups instead of BC's country code 3. Use the ISO code for the Shopify API (already was doing this, but moved it earlier in the process) ## Testing Added new tests to verify the ISO country code mapping works correctly: - UnitTestFillInShopifyCustomerDataISOCountryCodeMapping - UnitTestFillInShopifyCompanyLocationISOCountryCodeMapping Updated existing tests to ensure they set up ISO codes properly.
onbuyuka
approved these changes
Jan 19, 2026
JesperSchulz
approved these changes
Jan 19, 2026
|
@frank-embleton please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
Contributor
|
@frank-embleton You have compilation errors: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #6129
Problem
The Shopify Connector fails when exporting customers/companies with the EU country code "EL" for Greece. Business Central correctly uses "EL" for VIES (VAT Information Exchange System) validation and EU regulatory compliance, but Shopify's API requires the ISO 3166-1 alpha-2 standard code "GR".
The
Shpfy Tax Areatable stores Shopify's ISO country codes (e.g., "GR"), but the export functions inShpfyCustomerExportandShpfyCompanyExportwere using BC's country code (e.g., "EL") directly for Tax Area lookups, causing province/county information lookups to fail.Solution
Modified
ShpfyCustomerExportandShpfyCompanyExportcodeunits to:Testing
UnitTestFillInShopifyCustomerDataISOCountryCodeMapping- verifies EL→GR mapping for customer exportUnitTestFillInShopifyCompanyLocationISOCountryCodeMapping- verifies EL→GR mapping for company exportFiles Changed
src/Apps/W1/Shopify/App/src/Customers/Codeunits/ShpfyCustomerExport.Codeunit.alsrc/Apps/W1/Shopify/App/src/Companies/Codeunits/ShpfyCompanyExport.Codeunit.alsrc/Apps/W1/Shopify/Test/Customers/ShpfyCustomerExportTest.Codeunit.alsrc/Apps/W1/Shopify/Test/Companies/ShpfyCompanyExportTest.Codeunit.alFixes AB#618714