Skip to main content

Documentation Portal

SAP Hybris

The Global‑e Add-on for SAP COMMERCE CLOUD (SAP Hybris) accelerates the integration of an SCC-based Storefront with Global‑e.

In this section:

INTEGRATION FEATURES

Feature

Description

Country and Currency Switcher

Choose over 200 countries with default or free currencies (which can be replaced by a custom implementation)

Currency Conversion

View prices in local currency with up-to-date conversion rates, country coefficients, rounding rules, and currency symbols

Duty and Tax Calculations

Country and continent-specific duty and tax calculations

Delivery Cost

Dynamic delivery cost calculations based on country

Multiple Shipping Options

Country-specific shipping options from standard to express

Local Payment Methods

Choose from the most popular payment methods for each country

Promotions

Manage promotions for Global‑e operated countries

Customer Service

View and manage Global-e Orders through the Customer Services Tool

Installation

Global‑e offers two installation scripts:

Global‑e Accelerator Recipe Installation: Run the automatic Global‑e Accelerator Recipe on your Hybris Test Site when installing the Global‑e Add-on for the first time. This allows Global‑e to identify potential overlaps with your current customization.

Manual Installation: Run the manual installation to start the integration with an existing Hybris project: Pull the Global‑e extensions, include them in the project repository, and then configure the Global‑e Add-on.

Prerequisites

The Global‑e add-on setup requires a Global‑e merchant account.

Supported Versions: Supported SAP Hybris version: 2211.3.

Global‑e Accelerator Recipe Installation

The Global‑e accelerator lets you discover the functionality of the platform.

Recipe automates the platform code build and initializes the accelerator sites.

The Recipe installation procedure is only performed when installing the add-on the first time (generally, in the testing environment).

To install the Global-e Add-on with Recipe:

  1. Configure the database, user, and permissions:

    mysql> create database globale;
    
    mysql> create user 'globale';
    
    mysql> grant all on globale.* to 'globale'@'%' identified by 'globale';
  2. Unzip the SAP Commerce distribution ZIP archive.

  3. Copy the mysql db driver to:

    /hybris/bin/platform/lib/dbdriver
  4. Copy globale recipe to the SAP Commerce installer:

    cp -r ${PATH_TO_GLOBALE_REPO}/y-config/installer/recipes/* ${PATH_TO_HYBRIS_UNPACKED}/installer/recipes"
  5. Create symlinks:

    ln -sfn ${PATH_TO_GLOBALE_REPO}/y-ext ${PATH_TO_HYBRIS_UNPACKED}/hybris/bin/globale"

    Now, the source code is linked to the SAP commerce suite ready to build.

  6. Build and initialize:

    cd ${PATH_TO_HYBRIS_UNPACKED}/hybris/bin/platform 
    ./setantenv.sh 
    ant clean -Dinput.template=develop  
    ${PATH_TO_HYBRIS_UNPACKED}/installer/install.sh -r globale initialize
  7. Configure the Global‑e Add-on. See Configure the Global‑e Add-on.

Manual Installation

For an existing Hybris integration, use the manual Global‑e Add-on installation.

To place a call manually (without a recipe):

  1. Open the localextensions.xml file and add the following Global‑e extensions:

    <extension name='globalecore' />
    
    <extension name='globalefacades' />
    
    <extension name='globaleaddon' />
    
    <extension name='globaleendpoint' />
    
    <extension name='globalepromotions' />
    
    <extension name='globalebackoffice' />
  2. Install the globaleaddon:

    ant addoninstall -Daddonnames=globaleaddon - DaddonStorefront.yacceleratorstorefront=STOREFRONTNAME
  3. Configure the Global‑e Add-on. See Configure the Global‑e Add-on.

Configure the Global‑e Add-on

The Global‑e Add-on deploys these main configuration files.

  • hybris/config/local.properties - the file containing all the configuration properties (UID, GUID, feature toggles)

  • hybris/config/localextensions.xml - the file containing the list of modules and extensions (globalecoreglobalefacades, globaleaddon, and so on).

To configure the Global-e Add-on:

  1. Open the local.properties configuration file.

  2. Add your Global‑e Merchant credentials:

ID

Your Global-e Merchant ID.

Template:

globale.merchant.id.<websiteName>=<#>

Example: globale.merchant.id.electronics=193

GUID

Your Global-e Merchant GUID.

Note that you receive a different GUID for staging and production. Make sure to use the correct GUID.

Template:

globale.merchant.guid.<websiteName>=<GUID>

Example: globale.merchant.guid.electronics='8521f759-a239-4231-80a3-1efda984a723'

Additional Settings
Client
globale.client.js.domain = 'https://www2.bglobale.com' 
globale.client.js.path = '/scripts/merchants/globale.merchant.client.js'
Global‑e Enabled
globale.enabled = true
globale.enabled.initial.product.call = false
API Call Timeout
globale.api.call.timeout = '6000'
API Connections
globale.api.connect.timeout = '1000' 
globale.api.call.max.connections.host = '100'
globale.api.call.max.total.connections = '200'
Send Products
globale.send.products.batch.size = '10'
Country Code
globale.default.country.code = 'GB'
Language
globale.store.multilanguage = 'true'

globale.store.english = 'en'

Integration

When you sign up with Global-e, Global-e creates a Merchant account in the Global-e system and sends you your Global-e Merchant credentials.

  • Global‑e Merchant ID: The ID of your Global‑e account 

  • Global‑e Merchant GUID: A GUID number for your Global‑e account. Note that Global‑e sends you a different GUID for staging and production. Make sure to use the correct GUID. 

  • In addition, Global‑e sends you a URL to download the installation files via Bitbucket.

Before Getting Started

If you have not done so yet, make sure to share the following with Global‑e:

  • Your Bitbucket account.

  • The features you want Global‑e to support: the list of countries and special features such as Fixed Prices, multiple sites, and more.

Integration Steps

Description 

Responsibility 

Step 1 

Sandbox:

  1. Prepare a sandbox with your site for testing purposes.

  2. Send us the URL of your sandbox.

  3. Send us Admin permissions and credentials for:

    • Your Sandbox

    • Your site

    • Your Backoffice: Products, Orders, and Promotions.

Note: You may need to whitelist Global‑e IPs.

Notifications

  • Whitelist your network notifications: Obtain Global-e's IP range and use it to configure your network security settings to accept the Global-e notifications.  

  • For each merchant website, request that Global‑e configures where notifications should be sent.

    Note that Global‑e calls: <merchant_site>/globalerest/* (multiple endpoints)

Merchant 

Step 2 

Install and configure the Global‑e Add-on:

  1. Download the Global‑e Add-on and install it in your sandbox using Recipe or by performing the installation manually. See Installation

  2. Open the local.properties file and add your merchant credentials (GUID and Merchant ID). See Configure the Global‑e Add-on

  3. Configure additional settings, as required. See Additional Settings.

Merchant 

Step 3

Storefront settings:

Make sure that the order history (My Account page) displays Global‑e’s international prices correctly to customers. See My Account.

Merchant

Step 4

Solve possible issues arising after installation.  

Global‑e and Merchant  

Step 5

Global‑e enables and manages Global‑e countries, price conversion, and Global‑e checkout.

The Add-on runs the following APIs automatically when the relevant action is triggered:

  • SendOrderToMerchant: transfers new orders from Global‑e to SAP/Hybris. 

  • PerformOrderPayment: Notifies the merchant that the payment was authorised

  • UpdateOrderShippingInfo: Updates the order status and status history and updates the shipping addresses. 

  • UpdateOrderStatus: Updates the Hybris order status according to data from Global-e to notify the merchant of any change made to an order (such as cancellation, status change, and more…) 

You can create listeners for these events.

Global‑e 

What's Next:

Integration Flows
End-to-end Flows (High-Level)
image3.png
Global‑e Hybris Order and Checkout Flow
image7.png
  1. When a customer proceeds to checkout (1), Global-e verifies if the selected shipping country is operated by Global-e.

  2. If operated by Global‑e, the SentCart API is used to send all relevant information about the products and customer details to Global‑e (2).

  3. Subsequently, Global‑e creates a cart on the Global‑e side and returns the cart token to SAP Commerce (Hybris).

  4. Global‑e uses this cart token to initiate the checkout process (3).

  5. Global‑e then makes a server-to-server API call to SAP, triggering the creation of an order on the SAP Ecommerce (Hybris) side (4,5).

Scripts

The following Global‑e scripts are installed.

  • Global‑e CSS

  • The JavaScript code is installed on all site pages and the Checkout Page.

Global‑e Storefront Functionality

This section provides an overview of the main features and functionality resulting from the Global-e add-on installation.

Global‑e handles:

Global‑e manages the following main website components:

Checkout

During the checkout, the Global‑e add-on posts the following to the Global‑e system via the API: https://connect2.bglobale.com/Checkout/SendCartV2?merchantGUID={merchantGUID}.

The customer is redirected to a checkout page checkoutDisplay.jsp, in which Global‑e injects HTML via an iframe.

Backoffice

Use Backoffice to set up and manage pricing and Global-e Orders.

Additional Functionality: Custom Add-on Functionality

If required, customize the Global‑e extensions for additional functionality.

  • globaleaddon is used for front-end changes.

  • globalecore and globalefacades are used to communicate with the Global‑e API.

  • globaleendpoint is used to receive order update notifications.

  • globalepromotions is used for custom Global‑e promotions.

  • globalebackoffice is used for Backoffice modifications.

For details and custom Global‑e add-on functionality, see In Depth: Global‑e Add-on, Extensions, and Custom Functionality.

Shipping Country and Currency Indication

The shopper can view the localized Shipping country and currency indication. For example, Ship to £GB (GBP).

Converted Prices

The customer can view prices in local currency including current conversion rates, country coefficients, rounding rules, and currency symbols.

The GlobaleSwitcherFindPriceStrategy is an element of the price determination and conversion that delegates to GlobaleFindPriceStrategy.

GlobaleFindPriceStrategy delegates to GlobaleConvertingPriceValueConverter,

GlobaleConvertingPriceValueConverter delegates to GlobalePriceConverter.

To convert an existing OOTB SCC price row to another currency, the Global-e add-on asks Global-e for the conversion rate of the price row (without VAT) to the customer's selected currency; for example, GBP to EUR has a rate of around 1.18.

The add-on also requests a coefficient rate and tax rate. Once converted into the customer's chosen currency, Global‑e applies rounding rules (improving the appearance of customer-facing price values).

Global‑e Managed Checkout

When the shopper adds items to the cart and clicks the checkout button, the extension redirects from the native environment to the Global-e checkout (iFrame). The Global-e Add-on implements a Global-e API method that uses the Platform API to load the contents of the user's cart and passes it securely to the Global-e checkout through a server-to-server API call.

During the checkout, the Global‑e add-on posts the following to the Global‑e system via the SendCartV2 API:

https://[Globl-e API domain]/Checkout/SendCartV2?merchantGUID={merchantGUID}

The customer is redirected to a checkout page checkoutDisplay.jsp, in which Global‑e injects HTML via an iframe.

The Global‑e iframe is implemented as its own WCMS ContentPage (globalecheckout).

For more information, see:

Cart and Checkout

Checkout Flow (Technical)

Global‑e Notifications

Once the customer has been through the Global‑e checkout and finished the order - Global‑e will communicate with the merchant at a few points:

  1. Order creation: As soon as the order is accepted on the Global‑e side, it is processed and delivered to the hybrid system.

    • Endpoint:

      /globalerest/order-update-create-url
    • Order Status: “Pending“

  2. Payment creation: After the order passes the fraud analysis successfully, Global‑e updates the order:

    • Endpoint:

      /globalerest/order-payment-only-url
    • Order Status: “Processing

  3. Shipping creation: Once the products are shipped to the customer, Global‑e sends the shipping call to the app:

    • Endpoint:

       /globalerest/order-shipping-info-update-only-url
    • Order Status: “Processing“

  4. Cancel order: If Global‑e cancels the order (for any reason), Global‑e also sends the status update to the app:

    • Endpoint:

      /globalerest/order-status-update-only-url
    • Order Status: “canceled“

Global‑e sends an email to the customer confirming that the order was placed.

My Account

Orders created by logged-in customers are assigned to the relevant account in your merchant store and the order history section. Global‑e displays the order prices paid by the customer, in their currency.

Example in SAP Hybris:

image10.png
Transactional Emails

All transactional emails are sent by Global‑e.

Prices and Price Conversion

Flow

Global‑e converts prices using pricing conversion variables, including:

  • Currency Rates

  • Country Coefficient

  • Rounding Rules

These variables are dynamic; they are stored in the Global-e database.

The process of pricing calculations including VAT is illustrated in the following Front-end Activity diagram.

image11.jpg
Fixed Prices

The Merchant uses fixed prices to fix the price for a certain product in a specific country.

Fixed prices override Global‑e conversion calculations, giving you the ability to set prices in local currency for a specific country.

The fixed prices functionality requires that:

  • You request that Global-e supports fixed prices for the desired countries.

  • Global‑e enables fixed prices for the specified country on the Global‑e side.

  • Enable the fixed price in Backoffice. You can set a fixed price per country and Currency or only a Fixed Price per currency only.

Fixed price per Country and Currency

To enable fixed prices per country and currency:

  1. Log into Backoffice.

  2. From the left menu, select Price Settings > Prices > Price Rows

  3. In the main area, from the Price Row menu, type in Global‑e PriceRow.

    SAP1.png
  4. Click on the + button to create a new Global-E PriceRow.

    SAP2B.png

    The Create New Global-E PriceRow dialogue opens.

    SAP3.png
  5. Fill in the following mandatory fields. then click Done.

    • Product Identifier (this is the ProductId)

    • Unit

    • Price

    • Currency

  6. Click a price row to open the PriceRow properties.

    SAP4.png
  7. At the bottom of the PriceRow property screen, set Fixed Price enabled to TRUE.

    The Fixed Price feature per Country and Currency is now enabled and displayed on your storefront.

    Note

    Make sure that your cache is cleared.

Fixed Price per Currency

To enable fixed prices per currency (only):

  1. Log into Backoffice.

  2. From the left menu, select Price Settings > Prices > Price Rows

  3. In the main area, in the Price Row menu, type Global‑e PriceRow.

    SAP5.png
  4. Click on the + button to create a new +Global-E PriceRow.

    SAP2B.png

    The Create New Global-E PriceRow dialogue opens.

    SAP3.png
  5. Fill in the following mandatory fields, then click Done.

    • Product Identifier (this is the ProductId)

    • Unit

    • Price

    • Currency

  6. Click a price row to open the PriceRow properties.

    SAP6.png
  7. At the bottom of the PriceRow properties screen, set Fixed Price enabled to TRUE.

    The Fixed Price feature per Currency is now enabled and is displayed on your storefront.

    Note

    Make sure that your cache is cleared.

Pricing: Sorting and Faceting

Configuring Global‑e price facets for Global‑e countries operated by Global‑e is a feature of the Add-on.

You can follow the standard Hybris approach to configuring pricing facets. However, Price facets are currency-specific rather than country-based. Therefore, we recommend the following approach to ensure accurate functionality.

The sort function, Sort Prices High - Low or Sort Price Low - High, is automatically enabled by setting the price facet for a specific currency.

To index a currency and show the price facet:

Step 1. Enable Currency and faceting and select a site

  1. Enable currency sorting and faceting: From the Backoffice’s left menu, select System > Search and Navigation > Solr Facet Search Configuration > Facet Search Config.

    SAP7.png
  2. Select a site (in this example, we have chosen Electronics)

    SAP8B.png
  3. In the main area, under the Properties tab, add the currency for which to enable sorting and faceting (in this example, we have chosen Zloty).

  4. Click Save

Step 2: Create a New Set of ranges.

  1. From the Backoffice’s left menu, select Ranges.

    SAP9.png
  2. In the main area, click + Set of Ranges to add the new ranges.

    SAP10.png

    The Create New Set of Ranges dialogue opens.

    SAP11.png
  3. Under Name, give the new range a suitable name.

  4. Under Type, select Double.

  5. Click Done.

  6. At the top of the Ranges screen, click inside the Search field.

    The range that you have created appears as a row.

    SAP12.png
  7. Click the new range row.

    The Ranges tab opens.

    SAP13.png
  8. Under Ranges, add a new value range by clicking ‘+’.

    The Create New Value range dialogue opens.

    SAP14.png
  9. Fill in the required fields to create the new range.

  10. Click Done.

  11. Repeat the above steps until you have created all the required ranges.

    The following figure shows a list of ranges.

    Note

    Make sure to save after each range has been created to avoid errors.

    SAP15.png

Step 3: Add the currency code

  1. Select the administration tab.

    SAP16.png
  2. In the Qualifier field, add the currency code.

  3. click Save.

Step 4: Add a Facet

  1. Click on the site row (Electronics).

    The site details screen opens.

  2. Select the Indexed Types tab.

    SAP22.png
  3. Click the 3 dots on the left and select Edit Details.

    SAP17.png
  4. In the pop-up’s Properties table click on Indexed Properties. On the price row, click the 3 dots and select Edit Details.

    SAP19B.png

    The Edit Item price screen opens.

    SAP23.png
  5. Select the new range set you have created for Range sets.

    SAP20.png
  6. Click Save.

    The 'Create new Solr indexing operation' was created successfully.

    image27.jpg
  7. Click Done.

Step 5: Run an index

  1. At the top of the screen, click Index.

    Index.jpg
  2. Under Operation Values, select 'full'.

  3. Click 'Start.

    SAP21.png

Once the index is complete, the new facets appear on the front end, and the sorting by price works as expected.

Merchandising

Global‑e Promotions

Global‑e has added and configured the following conditions to Hybris:

  • Set the Global‑e shipping country as a condition

  • Set the country-specific exclusion condition

  • Apply the currency conversion to a fixed discount

  • Apply the free shipping coupon

To create a new promotion:

  1. Log in to Backoffice.

  2. Go to Marketing Promotion Rules > Create New Promotion Rule.

  3. Select the Conditions and Actions tab.

    image30.jpg
  4. Add the details of the promotions: Code, Name, and Description.

    image31.jpg
Example of Promotion #1

10% off all products excluding Global-e operated countries

  1. Under the Conditions and Actions tab, expand the Condition section.

    1. Under Available Conditions (right menu), select Operated by Global-E.

    2. Under Operated by Global-e, select false.

      image32.jpg
  2. Go to the Actions section.

    1. Select the action 'Percentage discount on cart'.

    2. Under Percentage discount value, specify % off.

      image33.jpg
    3. Click Save.

  3. To set a promotion live, click the Publish icon (on the right).

    To stop or deactivate the promotion click the 'Archive' button next to the bin.

    image34.jpg
  4. Refresh your website.

    The messaging should appear in the cart.

    You can also see the adjustment of the total price.

Example of Promotion #2

10EUR off 100EUR minimum spent on all products in Germany

  1. Select the Conditions and Actions tab.

    image35.jpg
  2. In the Conditions area, select a condition:

    1. Under Available Conditions (right menu), select Qualifying Countries.

    2. In the main area, set:

      Countries: Germany

      Cart total value, in the EUR field: 100

      Operator: IN

  3. Select a second condition:

    1. Under Available Conditions, select Cart Total.

    2. In the main area, set:

      Cart total value, in the EUR field: 100

      Operator: >=

  4. In the Actions area, create the action Absolute Discount Value:

    1. Go to Fixed discount on cart > Absolute discount value >

    2. In the EUR field, set the value 10

      image36.jpg

Note

Note that the Promotion feature is country-specific.

Hence, if the checkout currency is different from the promotion currency,

Global‑e conversion rates are applied. This rate is rounded to two decimal places.

Example of Promotion #3

Free Shipping Coupon

  1. In the Conditions area, under Available Conditions (right menu), select the condition Coupon Code.

  2. Select the trigging coupon name. Example: FREE_SHIPPING to be filled in between brackets []

    image37.jpg
  3. In the Actions area, under Change delivery mode, enter free-standard-shipping.

    image38.jpg
  4. Save and publish the promotion.

  5. Add a product to the cart.

  6. In the coupon field, enter FREE_SHIPPING. Against the delivery, cost FREE is indicated.

    image39.jpg
  7. Go back to the Global‑e iFrame checkout. A Free Delivery option is now available.

Known Limitations

Care should be taken when creating a promotion where conversions are used.

Actions with fixed discounts will not be applied if neither store’s default currency - nor a promotion’s action currency matches a customer session currency.

For example, a discount is not be applied in the following cases:

  • A promotion action with a fixed discount in USD

  • The store’s default currency is EUR

  • The customer cart currency is PLN

Cookies Disabled

If customers do not enable cookies, they cannot change the default country and checkout via Global‑e.

Global‑e manages a range of cookies. The Global‑e add-on modifies one cookie to store the selected country, currency, and culture (GlobalE_Data). This cookie is used in GlobaleCookieToSessionFilter.

Solr: Sorting by Price and Price Range Facet

For price sorting and price range facets to work for Global‑e-managed-countries on the product listing and search pages, you must configure indexed currencies and price ranges.

Global‑e recommends configuring solr indexing only for the most frequently used currencies, such as the store’s default currency: EUR and USD.

For other Global‑e-managed currencies, Global‑e converts prices at the search page rendering stage.

The Solr index runs outside of the web session. As a result, Global-e misses the session’s country and falls back to a default shipping country (CMSSite.defaultShipToCountry) because the price conversion uses the default conversion coefficients.

This also affects fixed prices. If you have country-specific product fixed prices, the fixed prices are not indexed, unless the country is the default ship-to country.

To configure indexing. update your SolrFacetSearchConfig and create SolrValueRangeSet for the additional currency.

Restricted & Forbidden Products

The product can either be set to 'Restricted' or 'Forbidden' for shipping or importing.

Restrictions concerning countries operated by Global‑e are enabled on the Global‑e side.

When specific products are restricted for shipping based on the customer's shipping country, the product cannot be sold in that particular country.

Products can also be restricted for shipping across all Global‑e managed countries. In that case, these 'forbidden' products are only available for purchase in countries that are not managed by Global‑e.

Example in SAP Hybris: Shipping Restricted Products

  1. Add a restricted product to the cart.

    The following pop-up is displayed stating that the product cannot be added to the cart.

    image40.jpg
  2. If the customer still tries to click checkout, the empty cart page is displayed.

    image41.jpg

Example in SAP Hybris: Shipping Forbidden Products

  1. Add a forbidden product to the cart.

    image42.jpg
  2. Navigate to the checkout page.

    image43.jpg
    image44.jpg

    A forbidden message is displayed on the checkout page.

Orders

Once Global‑e creates the order on SAP Hybris, it adds an extra tab called 'Global‑e order' to the order details. The Global‑e tab contains Global‑e-specific information, such as order IDs, international processes, order tracking URLs, and currencies.

A typical Global‑e order ID contains a GE prefix and ends with the customer's two-letter country code. For instance: GE1234567GB.

Viewing Orders

Once Global‑e creates the order on SAP Hybris, it adds an extra tab called 'Global‑e order' to the order details. The Global‑e tab contains Global‑e-specific information, such as order IDs, international processes, order tracking URLs, and currencies.

Global‑e Order Screen (Tab)

SAP_Hybris_Global-e_Order_Screen_Tab.png

Global‑e Order ID

SAP_Hybris_Global-e_Order_Screen_Tab_Global-e_Order_ID.png

To search for Global-e orders in Backoffice, use the Hybris OrderID or the Global-e OrderID starting with GE.

You can also view Global-e orders in the Customer Services Tools.

Searching for Global‑e Orders

You can find Global-e orders by running a search in Backoffice using the Hybris OrderID or Global-e OrderID starting with GE. You can also view Global-e orders by using the Customer Services Tools.

Order Details

To manage Global-e orders and view Order Details:

  1. Log in to Backoffice.

    image45.jpg
  2. From the Backoffice Explorer (left menu), select Orders.

  3. At the top of the main area, to the left of the Order field, click image46.png (magnifying glass).

  4. Select Order > Global‑e Order.

    The attribute screen opens showing the Global-E OrderId.

  5. Enter the Global‑e OrderID and click Search.

    image47.jpg

    An overview of the order is displayed.

  6. Click the Positions and Prices tab.

    This tab shows:

    • A line item for each product.

    • The delivery cost and total price are in international currency.

    • Product details, such as the base price in merchant currency.

    Positions and Prices Screen (Tab)

    image48.jpg
  7. Click the Global‑e Order tab.

    This tab shows additional information about the order. For example, the Duties and Discounts applied to shipping.

    Global‑e Order Screen (Tab)

    image49.jpg

    Note the Global‑e order ID.

  8. Double-click a product line.

    The Global‑e Properties show the base price of the product and the currency (supported by the merchant),

    The vatRate that is shown is the Global-e vatRate.

    image50.jpg

To view Global-e orders using the Customer Services Tools:

  1. Log in to Backoffice as a Customer Services Agent.

  2. Search for a Global‑e order:

    1. Click the Orders tab.

    2. Repeat steps 1 - 4 in the previous procedure.

Now you can see that:

  • The Order Status shows that the order is managed by Global-e.

  • The Order Details tab shows the details of the order.

  • A Global‑e Order tab is also added to the Customer Services Tools

Order Status

The order is created in the status 'Pending' (Global-e custom order status field).

'Pending' indicates that Global‑e still checks for fraud.

Approve order - When the fraud check is complete, the status change to 'processing/Paid'.

Cancel order - Global‑e cancels the order if the fraud check fails.

Cart and Checkout

Depending on the shipping country selection, one of the following checkouts is triggered: the standard Hybris checkout or the Global‑e checkout.

This section outlines the main differences between the Hybris checkout and the Global-e-operated checkout.

The Shipping Country is Operated by Global-e

When the shipping country is operated by Global-e, the Global-e cart and the checkout are triggered.

Cart
  • Taxes are not displayed

  • The Express Checkout is disabled

  • The Cart in Backoffice does not display tax

Front-end: Global‑e Operated Checkout (Example)
image51.jpg
Backoffice View of the Global‑e Cart (Example)
image52.jpg
The Shipping Country is Operated by the Merchant

When the shipping country is operated by the Merchant, the standard Hybris checkout is enabled with OOB features such as the Express Checkout or Taxes showing in the checkout.

Front-end: Hybris Standard Checkout (Example)
image53.jpg
Backoffice View of the Hybris Cart (Example)
image54.jpeg
Checkout
  • Once customers enter the checkout, they can no longer switch countries

  • The Checkout iFrame is triggered for Global‑e operated countries

  • Delivery costs, tax, and duties are calculated in the Global‑e iFrame checkout

  • Global‑e handles its own payment methods available for each shipping country

Global‑e iFrame Checkout (Example)
image55.jpg
SAP Checkout (Example)
image56.jpg

Add-on, Extensions, and Custom Functionality

Global‑e Add-on Architecture
Hybris_Architecture.svg

Orange: Global‑e

Global‑e handles:

  • The currency conversion

  • The checkout for Global‑e managed countries

  • Order notifications for orders managed by Global‑e

Global‑e manages the following main website components:

  • The welcome popup

  • The country selector

  • The checkout iframe

Checkout:

During the checkout, the Global‑e add-on posts the following to the Global‑e system via the SendCartV2 API.

The customer is redirected to a checkout page checkoutDisplay.jsp, in which Global‑e injects HTML via an iframe.

Green: Custom Global‑e add-on functionality:

  • Globaleaddon is used for front-end changes.

  • globalecore and globalefacades are used to communicate with the Global‑e API.

  • globaleendpoint is used to receive order update notifications.

  • globalepromotions is used for custom Global‑e promotions.

  • globalebackoffice is used for Backoffice modifications.

Note

Important spring beans are aliased or overwritten by the Global‑e logic. This includes the calculationService and europe1.manager.

Modules Architecture
  • Server-side browsing localisation

  • International Checkout from cart data

  • Orders in SAP Hybris were created following the native SAP Hybris creation flow with additional Global‑e Data Attributes

  • Fraud validation / order cancellation

  • Order updates (e.g. refund notifications)

Hybris_Architecture_Modules1.svg
globaleaddon

The globaleaddon adds the Global‑e Country Selector and the Managed Checkout capability to the SAP Hybris Accelerator-based Storefront.

The globaleaddon includes:

  • If you have a multi-site environment, you can control each website to which you want to add the Global‑e capability.

  • The GlobaleSwitcherComponent adds a widget to allow the customer to select their preferred currency and shipping country. The CSS of this component can either be stored and managed by Global‑e or stored and managed by SAP Hybris.

  • To enable the Global-e CSS, check the configuration “Use Global-e Default CSS".

  • The Global‑e checkout page includes a Global‑e iframe. The OOTB SAP Hybris Accelerator checkout flow definition is overridden by the globaleaddon-web-spring.xml. The global-e checkout flow is only applicable to Global‑e managed countries.

  • GlobaleCookieToSessionFilter updates the SCC session with Global‑e specific values, such as the session currency, country, culture, and activities of the customer.

    The cookie: GlobalE_Data is updated by the GlobaleCookieToSessionFilter filter when the customer comes to the site for the first time and has not yet selected their currency or shipping country. This is based on the location taken from the customer IP via an API call to Global‑e.

globalecore

globalecore places REST API calls to the Global‑e API. globalecore uses custom-built caching to speed up the retrieval of the Global‑e data sets from the database.

Client

The Global‑e implementation uses the Spring RestTemplate to communicate with the Global‑e API.

The RestTemplate is the central Spring class for client-side HTTP access.

Conceptually, it is like the JdbcTemplate, JmsTemplate, and the various other templates found within the Spring Framework.

This means, for instance, that the RestTemplate is thread-safe once constructed, and that you can use callbacks to customize its operations.

API Connection Timeouts

By default, the Global‑e Add-on includes a configuration for API connection timeouts. Each timeout represents the maximum time to wait for a Global‑e API response. If there is no response by the expiration time, the call fails.

Here are some examples of key values that you can see in your local. Properties:

  • globale.api.call.timeout=2000

  • globale.api.connect.timeout=1000

  • globale.api.call.max.connections.host=100

  • globale.api.call.max.total.connections=200

Fixed Product Prices

Fixed prices are used to define a Recommended Retail Price (RRP) per country in the local currency. Fixed prices do not change regardless of Global‑e coefficients, rounding rules, or FX rates.

The fixed price selection process can be configured:

(1) By country and currency – or –

(2) By currency and it is active for all countries that support this feature.

To enable or disable fixed prices based on country, use the Global-e API.

To activate the fallback mechanism (2),

Add the property 'globale.fixed.price.fallback.to.currency.match.enabled=true'.

The fixed price algorithm determines if a PriceRow contains a fixed price for the country and currency (1):

  1. If Global‑e has enabled the session country to allow fixed prices.

  2. AND the type of PriceRow is a GlobalePriceRow,

  3. AND the PriceRow's fixedPriceEnabled equals true,

  4. AND the PriceRow's currency equals the Global‑e session's currency,

  5. THEN the Price service selects PriceRow with country equals Global-e (session) countryAlgorithm to determine if a PriceRow contains a fixed price for currency (2):

  6. WHEN there is no price identified by (1),

  7. AND Global‑e has enabled the session country to allow fixed prices,

  8. AND the type of PriceRow is a GlobalePriceRow,

  9. AND the PriceRow's fixedPriceEnabled equals true,

  10. AND the PriceRow's currency equals Global‑e (session) currency,

  11. THEN the Price service selects the PriceRow that has no defined country.

Solr

The Global‑e Add-on extends the ProductPriceValueProvider and alias with the Global‑e price value provider: GlobaleProductPriceValueProvider.

The price value provider sets the session parameters to ensure that the Global-e add-on has the correct session parameters for price conversion when it creates the price information.

  • GlobalESessionCountryISOCode: taken from the cmsSite defaultShipToCountry.

  • GlobalESessionCultureCode: set to an empty string.

  • GlobalESessionCurrencyISOCode: not set, but DefaultGlobaleSessionParametersService falls back to i18nService.getCurrentCurrency() which is set in ProductPriceValueProvider taken from IndexConfig currencies.

  • GlobalESessionSolr: true

  • catalogVersionService.setSessionCatalogVersion to the base site’s default catalogue and version.

globaleendpoint

Global‑e sends notifications to the globaleendpoint module. Currently, four notifications are sent via JSON and marshalledmarshalled by the Jackson JSON Processor. POJOs corresponding to Global‑e API classes are annotated with Jackson Core (Data-Binding) annotations to facilitate proper mapping.

globalefacades

The globalefacades module provides simplified interfaces to the service layers.

Overridden Facades include:

  • DefaultCustomerFacade is overridden by DefaultGlobaleCustomerFacade.

    If Global‑e is enabled and the Country is managed by Global‑e, this facade updates the session currency and user.

  • SessionOverrideCheckoutFlowFacade is overridden by GlobaleCheckoutFlowFacade.

    The Express checkout is never enabled for a customer whose county is enabled by Global‑e.

  • Custom Global‑e-specific converters and populators can also be found in globalefacades-spring.xml.

globalepromotions

The globalepromotions extension provides support for the SAP Hybris promotion engine.

This extension adds the following conditions:

  • Global‑e-managed country condition as boolean (choose to activate the promotion if either the customer has selected a Global‑e-managed country or has selected a country that is NOT Global‑e-managed).

  • Qualifying country promotion with options: “IN”, “NOT IN”. The customer will qualify for the promotion if the session country is either IN or NOT IN a set of countries specified in the condition.

In addition, Global‑e has overridden and replaced the OOTB SAP Hybris currency conversion logic with the Global‑e conversion rates taken from the Global‑e API. This is relevant to any action applying percentage or absolute value discounts.

Example:

  • If you configure a promotion rule with an order threshold condition in Global‑e supported currency, e.g. 10 GBP,

  • AND if a customer has another cart currency, for example, CHF, with a cart total value of 15 CHF,

  • SAP Hybris converts GBP to CHF and evaluates the condition.

In this case, if we assume Global‑e API provides 1.285 as a conversion coefficient, the condition threshold will be converted as 10 GBP = 12.85 CHF, which is under the cart value of 15 CHF, and the promotion is applied.

How it works:

  • When SAP Hybris translates a promotion into a Drools rule, Global-e substitutes the static price value with ConvertablePriceValue. The ConvertablePriceValue converts and returns prices in runtime based on the Global-e conversion rules.

  • Global‑e also overrides the key price and discount-related RAO Actions:

    GlobaleRuleOrderEntryFixedDiscountRAOAction

    • GlobaleRuleOrderEntryFixedPriceRAOAction

    • GlobaleRuleOrderFixedDiscountRAOAction

    • GlobaleRulePartnerOrderEntryFixedDiscountRAOAction

    • GlobaleRulePartnerOrderEntryFixedPriceRAOAction

    • GlobaleRuleTargetBundlePriceRAOAction

See Known Limitations for information about processes that may trigger an unexpected behaviour (during conversion).

globalebackoffice

globalebackoffice is for Backoffice changes which you can configure in: globalebackoffice-backoffice-config.xml.

The Global‑e add-on also overrides the CurrencyTypeRenderer with the GlobaleCurrencyTypeRenderer to support sub-types of Order Entry.

Cache
image61.png

Caching is used to avoid overloading the Global‑e APIs with too many duplicate requests.

Global‑e sends back data with cache-specific information in the headers of their responses and requires that you (the merchant) build a cache into your systems when connecting to the Global‑e APIs.

Request Flow

When a request is made to the integration service, the following steps take place:

  1. Based on the call parameters, the cache is searched for matching data.

  2. If matching data is found:

    1. The data’s last update time is compared with the current time to create a stale period.

    2. If this stale period is shorter than the cache expiry period, the cached data is returned with the status UPTODATE.

    3. If this stale period is the same as or longer than the cache expiry period:

      1. A request is made to the Global‑e API.

      2. If the request is successful:

        • The resulting data is used to update the cache.

        • The resulting data is returned with the status UPTODATE.

      3. If the request is not successful, the OLD data is returned with the status STALE.

  3. If matching data is NOT found:

    1. A request is made to the Global‑e API.

    2. If the request is successful:

      • The resulting data is used to update the cache.

      • The resulting data is returned with the status UPTODATE.

    3. If the request is not successful:

      • An exception is thrown: GlobaleIntegrationServiceException.

Global‑e provides flow diagrams and details about which endpoints/objects to cache. A snippet of front-end activities is provided as an example below.

Example of the recommended Global‑e cache behaviour flow:

image62.png
Global‑e Headers

All API method calls may optionally return the following headers:

  • Cache-Control: public

  • max-age=x

These headers indicate the recommended client-side caching interval for the data returned by the respective call unless otherwise stated in a specific class or method definition.

There is functionality to parse those headers into a usable object.

Cache Persistence

Global‑e relies on the SAP Hybris persistence for caching API data. Global‑e creates new cache types in SAP Hybris with the common ancestor GlobaleBaseCache to store the cache. Cache age is controlled by Global‑e.

Data Structure and Database Indexes
image63.png
Technical Flows
Checkout Flow (Technical)
image80.png

During the customer checkout with Global‑e-enabled countries, the customer is redirected to the Global‑e iframe to complete their order.

Once Global‑e completes the checkout process with the customer, Global‑e creates an order and notifies SCC via the module globaleendpoint. This order includes delivery details for the local Global‑e hub, along with the customer’s billing address and payment information.

The JSON file is parsed and converted to a MerchantOrder, which is then unmarshalled again and saved as a string of JSON.

To avoid information loss, if there are missing mappings in the MerchantOrder object, the Global-e add-on makes sure to log any requests in full coming into the web module globaleendpoint using the filter: globaleRequestLogger.

  1. If Global‑e is enabled and the session country is managed by Global‑e, the customer is redirected to the Global‑e checkout (otherwise to typical checkout):

    • SAP Hybris creates a snapshot of the checkout cart.

    • SAP Hybris redirects the customer to the Global‑e checkout page.

  2. When the customer submits an order, Global-e creates an internal order.

    • If the customer has a default shipping and billing address, the addresses are exported with the "SendCart" request.

    • If the customer aborts the checkout process, the customer is redirected back to the cart page.

  3. Global‑e receives the cart data and handles the payment. If the fraud check passes successfully, Global‑e notifies SAP Hybris (OrderPlacementController.sendOrderToMerchant), and a merchant order is created.

    • The order notification includes delivery details for the local Global-e hub, along with the customer’s billing address and payment information.

    • The SAP Hybris order status is updated to GLOBALE_MANAGED.

    • To avoid information loss, if there are missing mappings in the MerchantOrder object, the Global-e add-on logs any requests coming into the web module globaleendpoint using the filter globaleRequestLogger.

  4. Global‑e manages the order fulfilment lifecycle (see the OrderPlacementController).

    • Global‑e updates the order status and registers the status history: globaleOrderStatusHistory

    • The current order status is reflected in the custom attribute: GlobaleOrder.currentOrderStatus

    • Global‑e can remove the session customer cart on order create/update, based on the Merchant.Order's ClearCart flag.

  5. Global‑e fires the following events that are integrated into the order’s lifecycle:

    • SendOrderToMerchantEvent

    • PerformOrderPaymentEvent

    • UpdateOrderShippingInfoEvent

    • UpdateOrderStatusEvent

Global‑e Price Calculation Flow (Technical)
image76.png

The Global‑e flow shows that the custom price factory takes control of creating price information. This allows the product data object to be populated with price rows that are converted and rounded to display on the front end.

The recalculation of a cart forces the price information to go through the same process (price rows converted and rounded). Tax information is managed by Global-e.

The Global‑e cache takes precedence over making a Global‑e API call. Below is a list of the cache entities managed by the Global‑e add-on:

  • GlobaleRoundingRulesCache

  • GlobaleCountryCoefficientsCache

  • GlobaleLocationDefaultCultureCache

  • GlobaleCurrenciesCache

  • GlobaleCurrencyRatesCache

  • GlobaleLocationByIpCache

  • GlobaleCountriesCache

  • GlobaleGenericSettingsCache

  • GlobaleProductCountryCache

Rounding rules, country coefficients, and currency rates are used when converting prices.

Typical Price Calculation Flow (Technical)
image77.png

Non-Global‑e flow is OOTB behaviour apart from one aspect, in the case SCC tries to use its currency conversion logic. This happens in the following circumstances:

  1. The country is not managed by Global‑e.

  2. The customer selects a currency for which the product does not have a price row.

  3. SCC cannot find a price row and tries to apply the OOTB conversion logic.

In the above example, we will fall back to the standard Global‑e conversion flow over the OOTB SCC conversion logic.

User Country and Currency Preference Flow (Technical)
image78.png

Global‑e always displays:

  • The country and currency selector, even if it does not manage the country.

  • A “first-time” popup for the customer, if Global‑e cannot find an existing cookie. Cookies are managed by Global‑e by injecting JavaScript. For this feature to work, the customer must have cookies enabled when browsing the site.

Global‑e injects JavaScript and CSS into the website to provide functionality such as the welcome popup, country switcher, checkout form, and more.

In the backend, the GlobaleCookieToSessionFilter custom filter sets up the session based on the customer's chosen country and currency. This is taken directly from the Global‑e cookie: GlobalE_Data.

If the country and currency or currency cannot be found, Global‑e uses the customer’s location by IP and converts the IP into a country, currency, and culture.

If the Global‑e add-on cannot find the location of the IP (e.g., when testing locally), the country, currency, and culture session parameters are set to the default value:

  • GlobalESessionCountryISOCode = the current site’s default ship-to-country

  • Global Session Currency ISO Code = the current base store’s default currency

  • GlobalESessionCultureCode = not set (not mandatory)

image79.png

When a customer uses the popup to change their country and currency:

  • The Global‑e cookie is updated with the new country or currency.

  • The custom GlobaleCookieToSessionFilter updates the SCC session parameters that are used when calculating price conversions.