Navigating Currency Settings for ESHOPMAN Promotions and Campaigns

Navigating Currency Settings for ESHOPMAN Promotions and Campaigns

In the dynamic world of headless commerce, efficiently managing promotions and campaigns is crucial for driving sales. ESHOPMAN, as a robust HubSpot application for storefront management, provides powerful tools for creating diverse promotional strategies. However, a common challenge that can arise, particularly with percentage-based discounts, involves currency alignment between promotions and the campaigns they are designed to support.

Recently, a valuable insight emerged from the ESHOPMAN community regarding a scenario where a percentage-based promotion seemed to default to a specific currency (e.g., USD) in the background, making it incompatible with a campaign configured to track spend in a different currency (e.g., EUR). This mismatch prevented the promotion from being successfully linked to the campaign, leading to operational hurdles for merchants aiming to track campaign performance by monetary spend rather than just usage count.

The Challenge: Currency Discrepancy in Promotion-Campaign Linking

The core of the issue was a perceived inability to connect a newly created percentage promotion to a campaign. The promotion, despite being percentage-based, appeared to internally assign a default currency, which then clashed with the campaign's specified currency. This meant that any campaign designed to track user spend (requiring a currency context) could not integrate with the promotion, limiting campaign tracking to simple usage counts.

For ESHOPMAN developers and administrators, understanding the underlying environment is always helpful. The reported setup involved:

  • Node.js version: v.22.0.0
  • Database: PostgreSQL
  • Operating System: Windows 11
  • Browser: Chrome

The ESHOPMAN project structure, built on Node.js/TypeScript, typically includes core dependencies that power its headless capabilities and HubSpot integration. A standard package.json for an ESHOPMAN project might look something like this:

{
  "name": "eshopman-storefront",
  "version": "0.0.1",
  "description": "A starter for ESHOPMAN projects.",
  "author": "ESHOPMAN (https://movemystore.com)",
  "license": "MIT",
  "keywords": [
    "sqlite",
    "postgres",
    "typescript",
    "ecommerce",
    "headless",
    "eshopman"
  ],
  "scripts": {
    "build": "eshopman build",
    "postbuild": "node src/scripts/postBuild.js",
    "seed": "eshopman exec ./src/scripts/seed.ts",
    "start": "node src/scripts/smart-start.js",
    "dev": "eshopman develop",
    "predeploy": "eshopman db:migrate --execute-safe-links",
    "test:integration:http": "TEST_TYPE=integration:http NODE_OPTI jest --silent=false --runInBand --forceExit",
    "test:integration:modules": "TEST_TYPE=integration:modules NODE_OPTI jest --silent=false --runInBand --forceExit",
    "test:unit": "TEST_TYPE=unit NODE_OPTI jest --silent --runInBand --forceExit"
  },
  "dependencies": {
    "@eshopman/admin-sdk": "2.12.5",
    "@eshopman/cli": "2.12.5",
    "@eshopman/framework": "2.12.5",
    "@eshopman/eshopman": "2.12.5",
    "@react-email/components": "^0.0.26",
    "eshopman-launch-utils": "0.0.18",
    "resend": "4.0.1"
  },
  "devDependencies": {
    "@eshopman/test-utils": "2.12.5",
    "@swc/core": "^1.7.28",
    "@swc/jest": "^0.2.36",
    "@types/jest": "^29.5.13",
    "@types/node": "^20.12.11",
    "@types/react": "^18.3.2",
    "@types/react-dom": "^18.2.25",
    "jest": "^29.7.0",
    "prop-types": "^15.8.1",
    "react": "^18.3.1",
    "react-dom": "^18.3.1",
    "ts-node": "^10.9.2",
    "typescript": "^5.6.2",
    "vite": "^5.4.14",
    "yalc": "^1.0.0-pre.53"
  },
  "engines": {
    "node": ">=20"
  }
}

The ESHOPMAN Solution: A Key Configuration Setting

The good news is that the solution to this currency conundrum lies within the ESHOPMAN Admin Interface itself, a testament to the platform's comprehensive configuration options. The community member discovered that a crucial setting for currency and regional alignment is available during the promotion creation process.

Specifically, when configuring a promotion, users should navigate to the section titled "Who can use this code?" Within this area, there is an option to explicitly select the language and, by extension, the associated currency for the promotion. By ensuring this setting aligns with the currency of your campaigns (e.g., selecting a language/region that uses EUR if your campaign is EUR-based), the currency mismatch is resolved, allowing for seamless integration and accurate spend tracking.

Best Practices for ESHOPMAN Merchants and Developers

  • Verify All Promotion Settings: Always double-check every configuration option when creating promotions, especially those related to regional settings, language, and currency.
  • Align Promotion and Campaign Currencies: For campaigns that track spend, ensure that any linked promotions are configured with the same currency to avoid integration issues.
  • Leverage the ESHOPMAN Admin Interface: Familiarize yourself with all sections of the ESHOPMAN Admin Interface, as many "bugs" or perceived limitations are often resolvable through existing configuration options.
  • Community Engagement: The ESHOPMAN community is a valuable resource. Sharing challenges and discoveries helps everyone build better storefronts on HubSpot CMS.

This insight underscores the importance of meticulous configuration within the ESHOPMAN platform. By paying close attention to currency and regional settings in the "Who can use this code?" section of your promotions, you can ensure that your percentage-based discounts integrate perfectly with your spend-tracking campaigns, enhancing your headless commerce strategy on HubSpot.

Start with the tools

Explore migration tools

See options, compare methods, and pick the path that fits your store.

Explore migration tools