Marketing Feeds
To generate converted prices the Global-e cartridge contains the helper function which could be used to initialize the integration depending on shipping country and currency.
Check the script ‘int_globale/cartridge/scripts/helpers/globaleHelpers.js’ -> function setSession .It expects to receive two parameters: countryCode and currencyCode.
Example
* @example
* // set global-e session in job context
* var globaleHelpers = require('*/cartridge/scripts/helpers/globaleHelpers');
* var globalePriceModel = require('*/cartridge/scripts/factories/globale/priceModel');
*
* globaleHelpers.setSession('UA', 'UAH'); // setSession(countryCode, currencyCode);
* var priceModel = globalePriceModel(product.priceModel, product);
* var productPrice = priceModel.price;This can be used in an existing job to get converted product prices.
To generate the correct links there are possible different options:
Add GET parameters (glCountry, glCurrency). If one SFCC locale is used for a few operated by Global-e countries then is needed to add additional GET parameters (glCountry, glCurrency) for links to the product page to preselect shipping country and currency to make sure that Google crawlers see the correct prices with correct currencies.
Use separate SFCC locale for every Global-e-operated country. If a dedicated SFCC locale exists for every operated-by-Global-e-country, then the links to the product page should be generated with the right SFCC locale values.