### Install Global-e Addon Source: https://docs.global-e.com/enterprise/en/installation-259688.html Command to install the globaleaddon into the storefront. ```bash ant addoninstall -Daddonnames=globaleaddon - DaddonStorefront.yacceleratorstorefront=STOREFRONTNAME ``` -------------------------------- ### AppSettings Request Example Source: https://docs.global-e.com/enterprise/en/browsing-support-methods.html Example JSON structure for the WebStoreCodes object used in the AppSettings request. ```json { "WebStoreCode": "default", "WebStoreInstanceCode": "QA1" } ``` -------------------------------- ### Install Node.js Dependencies Source: https://docs.global-e.com/enterprise/en/installation-286178.html Initializes the environment by installing required npm packages and modules for CSS, JS, and SGMF scripts. ```bash npm install ``` -------------------------------- ### Authentication Response Example Source: https://docs.global-e.com/enterprise/en/authenticating-the-checkout-page.html Example response indicating successful validation. ```json { "IsValid":true, "Balance":"42.21", "CurrencyCode":"USD", "IsGlobalEGiftCard":false, "ErrorCode":null, "Message":"Success", "Description":null, "Success":true, "ErrorText":null } ``` -------------------------------- ### Configure Database and User Source: https://docs.global-e.com/enterprise/en/installation-259688.html SQL commands to create the database and user for the Global-e installation. ```sql mysql> create database globale; mysql> create user 'globale'; mysql> grant all on globale.* to 'globale'@'%' identified by 'globale'; ``` -------------------------------- ### GET /Browsing/AppSettings Source: https://docs.global-e.com/enterprise/en/browsing-support-methods.html Returns the lists of client and server-side settings to be used by the Merchant. ```APIDOC ## GET /Browsing/AppSettings ### Description Returns the lists of client and server-side settings to be used by the Merchant. The ClientSettings property contains a JSON string that must be passed back to the Global-e client SDK. ### Method GET ### Endpoint https://{server_name}/Browsing/AppSettings ### Parameters #### Request Body - **WebStoreCodes** (Object) - Optional - Includes WebStoreCode and WebStoreInstanceCode to get settings for a specific merchant web store instance. ### Response #### Success Response (200) - **AppSetting** (Object) - Contains ClientSettings (Dictionary) and ServerSettings (Dictionary). ``` -------------------------------- ### Return Request Example Source: https://docs.global-e.com/enterprise/en/returns-via-api.html A sample JSON payload for initiating a return request. ```json { "ProviderCode": "ExampleProvider", "OrderId": "EUQA6215359", "Email": globale@mail.com, "ReturnedProducts": [ { "ProductCode": "433117270672", "ReturnQuantity": 1 } ] } ``` -------------------------------- ### Example: Using a Credit Card as a Payment Method Source: https://docs.global-e.com/enterprise/en/client-analytics.html JSON representation of OrderPaymentMethods including credit card and gift card payment examples. ```json "OrderPaymentMethods": [, { "PaymentMethodId": 1, "PaymentMethodName": "Visa", "IsGiftCard": false, "GiftCardFields": "null", "PaidAmountInCustomerCurrency": 388.0, "PaidAmountInMerchantCurrency": 99.0 "PaymentMethodTypeCode": "1" "PaymentMethodTypeName": "Credit Card" }, ], { "PaymentMethodId": 57, "PaymentMethodName": "gift card", "IsGiftCard": true, "GiftCardFields": "[{\"FieldApiName\":\"CardId\", \"FieldNameResourceId\":\"checkout.GiftCard.GiftCardId\", \"FieldValue\":\"DDB4HB9BDFD466BD\",\"IsId\":true}]", "PaidAmountInCustomerCurrency": 388.0, "PaidAmountInMerchantCurrency": 99.0 }, ] ``` -------------------------------- ### Load Base Script Source: https://docs.global-e.com/enterprise/en/client-analytics.html Self-invoking function examples for initializing the Global-e SDK. ```javascript (window, document, "https://web.global-e.com" + "/merchant/clientsdk/124125?v=2.1.4", "script", "gle", "2.1.4", 124125) ``` ```javascript ``` -------------------------------- ### Identity Provider Metadata URL Example Source: https://docs.global-e.com/enterprise/en/sso-integration-32143.html Example URL format for providing identity provider metadata, including the required appid parameter. ```text https://login.microsoftonline.com/38829821-e013-4e4e-a1bd-cddc47cc36dc/federationmetadata/2007-06/federationmetadata.xml?appid=f004905c-fdbd-40f3-97e9-42f516d9cafe ``` -------------------------------- ### Get Tracking Events Request Source: https://docs.global-e.com/enterprise/en/shipping-methods.html Example cURL request to retrieve tracking events for specific Global-e orders. ```bash curl --location 'https://[globale domain]/Shipment/GetTrackingEvents' \  --header 'MerchantGUID: D2ED2A7F-F6ED-4CCB-B611-B44AC8D02250' \  { "EventSinceInUTC": "2025-04-01T20:08:05Z", "Type": "outbound", "OrderIds": [ "GE381652418TS" ], "TrackingNumbers":[ ]} ``` -------------------------------- ### Build and Initialize Platform Source: https://docs.global-e.com/enterprise/en/installation-259688.html Commands to build the platform and initialize the Global-e accelerator. ```bash 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 ``` -------------------------------- ### GlobalESDK.setup Source: https://docs.global-e.com/enterprise/en/usage-of-global-e-sdk.html Initializes the Global-E SDK with the required token, domain, and cart token URL. ```APIDOC ## GlobalESDK.setup ### Description Initializes the Global-E SDK instance for use in the application. ### Parameters - **token** (String) - Required - The authentication token. - **domain** (String) - Required - The base URL for the external API. - **cartTokenURL** (String) - Required - The URL for checkout redirection. ### Example GlobalESDK.setup(token: "YnMTYTk04do=", domain: "https://stgepi4.bglobale.com/externalapi/", cartTokenURL: "https://www2.bglobale.com/checkoutv2/fullredirect/") ``` -------------------------------- ### API Request with JWT and Payload Source: https://docs.global-e.com/enterprise/en/api-authentication.html Example of a GET request using a JWT token in the header and a JSON body for specific API operations. ```curl curl -X GET https://[globale domain]/[API] \ -H "Authorization: Bearer jwt_token_here" \ -H "Content-Type: application/json" \ -d '{ "ProviderCode": "Loop", "OrderId": "GE314856569TS", "Email": "globale@gmail.com", "MerchantRMANumber": "RM132", "ShippingCost": 10.0, "CurrencyCode": "USD", "ReturnShippingTypeId": 2, "ReturnShippingMethodId": null, "ReturnedProducts": [ { "ProductCode": "DKB500680.M8", "ProductSecondaryCode": "", "CartItemId": null, "ReturnQuantity": 1, "MerchantReturnReasonCode": "", "MerchantReturnReasonDescription": "Return Reason from GRD request for product 1" }, { "ProductCode": "B7ECS.C8", "ProductSecondaryCode": "", "CartItemId": 1, "ReturnQuantity": 1, "MerchantReturnReasonCode": "TTT", "MerchantReturnReasonDescription": "Return Reason from GRD request for product 2" } ] }' ``` -------------------------------- ### SendAdditionalRequiredDocumentsToMerchant Request Example Source: https://docs.global-e.com/enterprise/en/order-methods.html Example JSON request body for the SendAdditionalRequiredDocumentsToMerchant method. ```json { "OrderId": "Sample order id", "MerchantOrderId": "Sample order id from the merchant’s system", "CountryCode": "US", "AdditionalRequiredDocuments": [ { "TrackingNumber" "98789723874839", "DocumentData": "base 64 string", "URL": "URL do download document", "DocumentTypeCode": "11", "DocumentTypeName": "EAD", "DocumentExtension": "pdf", "DocumentReference": "24DE85123822923B8", "CreationDateTime": "2024-01-30T10:55:21" } ] } ``` -------------------------------- ### GetCountries Response Example Source: https://docs.global-e.com/enterprise/en/replacing-the-global-e-country-switcher.html Example JSON response returned by the GetCountries API. ```json { "countryCode": "US", "countryCodeISO3": "USA", "countryName": "United States", "isOperatedByGlobale": true, "defaultCurrencyCode": "USD", "isFixedPricesSupported": true } ``` -------------------------------- ### Initialize Global-E SDK Source: https://docs.global-e.com/enterprise/en/usage-of-global-e-sdk.html Configures the SDK with the required token, domain, and cart token URL. ```swift GlobalESDK.setup(token: "YnMTYTk04do=", domain: "https://stgepi4.bglobale.com/externalapi/", cartTokenURL: "https://www2.bglobale.com/checkoutv2/fullredirect/") ``` -------------------------------- ### UpdateParcelStatus Example Request Source: https://docs.global-e.com/enterprise/en/parcel-methods.html Example request and payload for updating a parcel status. ```http [POST] https://{server_name}/orders/GE1235436GB/parcels/4666593812/statuses ``` ```json { "merchantParcelStatusCode": "Delivered" } ``` -------------------------------- ### Copy Recipe and Create Symlinks Source: https://docs.global-e.com/enterprise/en/installation-259688.html Commands to copy the recipe and create necessary symlinks for the integration. ```bash cp -r ${PATH_TO_GLOBALE_REPO}/y-config/installer/recipes/* ${PATH_TO_HYBRIS_UNPACKED}/installer/recipes" ``` ```bash ln -sfn ${PATH_TO_GLOBALE_REPO}/y-ext ${PATH_TO_HYBRIS_UNPACKED}/hybris/bin/globale" ``` -------------------------------- ### SendAdditionalRequiredDocumentsToMerchant Response Example Source: https://docs.global-e.com/enterprise/en/order-methods.html Example JSON response body indicating the status of the request. ```json { "StatusCode": "200", "Success": "true", "Message": "...", "ErrorCode": "...", "ErrorText": "..." } ``` -------------------------------- ### GeoIP Response Example Source: https://docs.global-e.com/enterprise/en/replacing-the-global-e-country-switcher.html Example JSON response returned by the GeoIP location endpoint. ```json { "Country": { "Code": "IE", "Name": "Ireland (Republic of)", "DefaultCurrencyCode": "EUR", "DefaultCultureCode": "en-GB" }, "Region": { "Code": "", "Name": "", "CountryCode": "" }, "City": { "Code": "", "Name": "" }, "IPRange": { "From": 281471592431616, "To": 281471592890367, "Type": "IPV4" } } ``` -------------------------------- ### Authentication Request Example Source: https://docs.global-e.com/enterprise/en/authenticating-the-checkout-page.html Example request payload including MerchantGUID, AuthToken, and SessionId. ```json { "MerchantGUID":"b1124f0c-0422-49b2-a356-7934eb58a54b", "ShippingCountryCode":"GB", "CardFields":{ "CardId":"64E3E449D5GD8G29" }, "MerchantCartToken":"11492df0a8bfe29f5a748c4a1db80cff", "CustomerId":null, "CustomerEmail":"test@gmail.com", "WebStoreCode":"Official Ripndip - Apparel, Accessories, Skate, & Lord Nermal ", "WebStoreInstanceCode":"GlobalEDefaultStoreInstance", "CartToken":"9d14ef15-d463-4480-82c2-806d1ec7b559" “AuthToken”:”34sdfdg43erfg43234fwsedfsdf423”, “SessionId”:”12345”, } ``` -------------------------------- ### Load Global-e Welcome Pop-Up Source: https://docs.global-e.com/enterprise/en/integration-210437.html Initializes the standard Global-e welcome pop-up using the specified country, locale, and currency. ```javascript GlobalE.LoadWelcome("US", "en-US", "USD"); ``` -------------------------------- ### Loyalty Vouchers Request Example Source: https://docs.global-e.com/enterprise/en/merchant-rest-api.html Example JSON payload for submitting loyalty vouchers during a request. ```json { "LoyaltyVouchers":["123456","123467"] } ``` -------------------------------- ### Initialize Global-e Product Option Model Source: https://docs.global-e.com/enterprise/en/integration-210437.html Use this factory to wrap the standard SFCC Product Option Model for price calculations. ```javascript var globaleOptionModel = require('*/cartridge/scripts/factories/globale/optionModel'); var geOptionModel = globaleOptionModel(product.optionModel); ``` -------------------------------- ### Payment Logo URL Examples Source: https://docs.global-e.com/enterprise/en/payment-logos.html Examples of direct links to specific payment method logos. ```text https://s3.global-e.com/Images/PaymentMethods/pm_4.svg ``` ```text https://s3.global-e.com/Images/PaymentMethods/pm_50.svg ``` -------------------------------- ### UpdateOrderStatus Request Example Source: https://docs.global-e.com/enterprise/en/order-status-updates--m-to-ge-.html A full example of the UpdateOrderStatus request URL including query parameters. ```http POST https://connect.globale.com/Order/UpdateOrderStatus?orderStatus={"OrderId":"GE1235436GB","OrderStatus":{"OrderStatusCode":"cancelled","Name":"cancelled"},"OrderStatusReason":{"OrderStatusReasonCode":"1010","Name":"CustomerCancel"}} ``` -------------------------------- ### Nested Fallback Configuration Source: https://docs.global-e.com/enterprise/en/jobs.html Demonstrates nesting price and product types with fallback logic. ```json { "type": "price", "attr": "gbp-sale-prices", "fallback": { "type": "product", "attr": "priceModel.price.value", "fallback": { "type": "static", "attr": "0" } } } ``` -------------------------------- ### Initialize Global-e SDK Source: https://docs.global-e.com/enterprise/en/usage-of-global-e-sdk.html Initialize the SDK within the Application class onCreate method using the required token, domain, and cart token URL. ```kotlin GlobalESDK.init(Application, token, domain, cartTokenUrl) ``` ```kotlin class App : Application() { override fun onCreate() { super.onCreate() GlobalESDK.init(this, "YnMTYTk04do=", "https://stgepi4.bglobale.com/externalapi/", "https://www2.bglobale.com/checkoutv2/fullredirect/") } } ``` -------------------------------- ### Initialize Global-e Product Price Model Source: https://docs.global-e.com/enterprise/en/integration-210437.html Use this factory to wrap the standard SFCC Product Price Model for PLP/PDP price calculations. ```javascript var globalePriceModel = require('*/cartridge/scripts/factories/globale/priceModel'); var gePriceModel = globalePriceModel(product.priceModel, product); ``` -------------------------------- ### VoidParcel Request Example Source: https://docs.global-e.com/enterprise/en/parcel-methods.html Example JSON payload for the VoidParcel request, identifying the order and the specific parcel to be voided. ```json { "OrderId": "GE176045689GB", // OrderID can accept the value of OrderID or MerchantOrderId "ParcelCode": "P3", "MerchantOrderId": "#1138" } ``` -------------------------------- ### Gift Card Redeem API Examples Source: https://docs.global-e.com/enterprise/en/gift-cards-281937.html Examples of request and response payloads for redeeming gift card balances. ```json { "MerchantGUID": "abcdabcd-abcd-abcd-abcd-abcdabcdabcd", "ShippingCountryCode": "UA", "Cards": [ { "CardId": 167, "BalanceInGiftCardCurrency": 10.000000, "BalanceInCustomerCurrency": 21.390000, "GiftCardCurrencyCode": "GBP", "CustomerCurrencyCode": "EUR", "BalanceUsedInCardCurrency": 10.000000, "BalanceUsedInCustomerCurrency": 21.390000, "CardFields": { "CardId": "card10", "CardPin": "111" }, ], } ] } ``` ```json { "Cards": [ { "CardId": 167, "BalanceInGiftCardCurrency": 10.000000, "BalanceInCustomerCurrency": 21.390000, "GiftCardCurrencyCode": "GBP", "CustomerCurrencyCode": "EUR", "BalanceUsedInCardCurrency": 10.000000, "BalanceUsedInCustomerCurrency": 21.390000, "RedeemTransactionId": 120423, "CardFields": { "CardId": "card10", "CardPin": "111" }, ], } ], } ``` -------------------------------- ### Global-e Welcome Pop-Up Source: https://docs.global-e.com/enterprise/en/integration-210437.html Initializes the standard Global-e welcome pop-up. ```APIDOC ## Global-e Welcome Pop-Up ### Method `GlobalE.LoadWelcome(countryCode, locale, currencyCode);` ### Example `GlobalE.LoadWelcome("US", "en-US", "USD");` ``` -------------------------------- ### Global-e Shipping Method Mapping Example Source: https://docs.global-e.com/enterprise/en/shipping-method-code.html A concrete example of mapping the 'mor_test' shipping method code to the 'globaleintegration' carrier. ```json { "mor_test":{ "globaleintegration":[ "SKYNET_EXPRESS_GLOBALE", "Skynet" ] } } ``` ```json { "mor_test":{ "globaleintegration":[ "SKYNET_EXPRESS_GLOBALE", "Skynet" ] } } ``` -------------------------------- ### Return Response Example Source: https://docs.global-e.com/enterprise/en/returns-via-api.html A sample JSON response containing return shipping methods and destination details. ```json { "IsSuccess": true, "Data": { "OrderId": "GE10470948238NL", "MerchantOrderId": "EUQA6215359", "ReturnShippingMethods": [ { "ShippingMethodId": 40044878, "ShippingMethodDescription": "DHL-GlobalE", "ShippingMethodType": "Express Courier (Air)", "ShippingMethodTypeID": 2, "ShipperName": "DHL", "IsQrLabel": false, "IsTrackable": true, "Cost": 0.0, "Currency": "EUR" } ], "ReturnShippingDestinationDetails": { "Country": "Netherlands", "City": "Amsterdam", "Address": "Ood 5", "Zip": "4751XK", "StateOrProvince": "", "Email": Test2121@gmail.com, "Phone": "310610887191" } } ``` -------------------------------- ### Merchant Response Request Example Source: https://docs.global-e.com/enterprise/en/merchant-rest-api.html Example JSON payload for a merchant response request containing order identifiers and tracking details. ```json { "OrderId": "00010000100000000020", "InternationalDetails": { "OrderTrackingNumber": "1265443", " OrderTrackingUrl": "http://www.somecarrier.com/?1265443" }, "MerchantGUID": "abcdabcd-abcd-abcd-abcd-abcdabcdabcd" } ``` -------------------------------- ### OnBeforeWelcome Source: https://docs.global-e.com/enterprise/en/events-summary.html Triggered before the Welcome pop-up is displayed. Allows for dynamic content injection. ```APIDOC ## OnBeforeWelcome ### Description This event occurs before the Welcome pop-up is displayed. It provides event data including country, culture, and currency, and allows for dynamic content injection via the onComplete callback. ### Usage ```javascript gle("OnBeforeWelcome", function(e) { // e.country, e.culture, e.currency available e.onComplete([{key : "clientDynamicContent", value : "html_content"}]); }); ``` ```