Ensuring Global Currency Accuracy: Addressing Outdated ISO Codes in ESHOPMAN
In the world of global e-commerce, precision in currency handling is paramount. For ESHOPMAN merchants leveraging HubSpot for seamless storefront management and deploying via HubSpot CMS, accurate currency data ensures smooth transactions and reliable financial reporting. Our community recently highlighted a critical issue concerning outdated ISO 4217 currency codes that could impact businesses operating in specific international markets.
The Challenge: Outdated Currency Data
A recent community discussion brought to light that ESHOPMAN's core currency utilities contained obsolete ISO 4217 codes for three countries: Venezuela, Zambia, and Zimbabwe. Specifically, the system offered VEF (Venezuela), ZMK (Zambia), and ZWL (Zimbabwe), while the updated, current codes (VES, ZMW, ZWG respectively) were missing from the selectable options within the ESHOPMAN Admin UI.
This isn't merely a cosmetic oversight. The withdrawn codes carry different minor unit specifications (decimal digits) compared to their replacements. For instance, ZMK and ZWL were defined with decimal_digits: 0, whereas their modern counterparts, ZMW and ZWG, correctly specify decimal_digits: 2. This discrepancy means that any amount processed or displayed using the old code would be unscaled and inaccurate if interpreted with the new standard, leading to significant financial miscalculations for merchants.
Impact on ESHOPMAN Merchants and Developers
For ESHOPMAN merchants setting up or managing stores in these regions through the HubSpot app, this issue directly affected their ability to select the correct local currency. When configuring a store or region via the ESHOPMAN Admin UI, only the obsolete codes were presented, or no suitable option at all. This could lead to:
- Incorrect pricing displays on HubSpot CMS-deployed storefronts.
- Inaccurate transaction processing via the ESHOPMAN Store API.
- Challenges in financial reconciliation and reporting for businesses using the ESHOPMAN Admin API.
Developers working with the ESHOPMAN platform, particularly those integrating custom solutions or extending core functionalities, would encounter this discrepancy when interacting with the platform's internal currency data. The issue stems from the defaultCurrencies object within ESHOPMAN's core utilities, which is foundational for currency selection:
import { defaultCurrencies } from "@eshopman/core/utils"
// Checking for availability in the core utility object
defaultCurrencies.VEF // present
defaultCurrencies.VES // undefined (missing)
Furthermore, the internal process that seeds the ESHOPMAN Currency table, typically from Object.values(defaultCurrencies), meant that these crucial updated currency codes did not exist as valid entries in the platform's database.
The ESHOPMAN Solution and Best Practices
The ESHOPMAN team is committed to maintaining the highest standards of data accuracy. The expected resolution involves updating the platform to include the correct ISO 4217 codes (VES, ZMW, ZWG) as selectable options. Crucially, the superseded codes will remain available for historical purposes, ensuring that existing orders denominated in these older currencies continue to render correctly without data loss or conversion issues upon platform updates.
This proactive approach ensures that ESHOPMAN provides robust, globally compliant currency management. It underscores the importance of regularly cross-referencing official standards like the ISO 4217 list to keep our platform data precise and reliable. This incident highlights the value of our community's vigilance in identifying and helping to resolve critical issues, reinforcing ESHOPMAN's commitment to a stable and accurate headless commerce experience for all merchants and developers.