> ## Documentation Index
> Fetch the complete documentation index at: https://nce-docs.bglobale.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Integration

**Browsing**

**GEM Attributes**

GEM Attributes have been implemented into some of the UI elements of the store to automate the merchant integration process within the GEM selectors needed in the browsing.

These attributes should be configured in the Global-e Admin.

We cover the following list of attributes:

**Cart Settings:**

* data-wix-item-total-price
* data-wix-line-item-price
* data-wix-cart-total-price
* data-wix-line-item-id
* data-wix-line-full-item-price
* data-wix-product-compare-price

**Shipping Switcher Settings:**

The switcher is always located at the “global-e-ce-switcher” element.

**Checkout Settings:**

* data-wix-checkout-button

**Price selectors:**

* data-wix-price
* data-wix-original-price

**Elements to hide:**

* data-wix-hideable

  <Note>
    The TS tool is used to manually hide an element that is not preselected with an attribute and which needs to be hidden.
  </Note>

## Automatic Catalogue Update

The initial catalogue should be uploaded manually.

To avoid the need for constantly updating the merchant’s catalogue in the Global-e database, we have added support for CORE’s API `SaveProductList` which is triggered by the relevant Wix webhooks (listed below) to update any changes the merchant has made on the catalogcatalogue from the platform.

The following fields are sent to Global-e with each update:

* Name
* Description
* Weight
* `ProductCode` (from SKU)
* `ProductCodeSecondary` (from variant id)
* `ProductGroupCode` (from product id)
* `OriginalListPrice` (from price)
* `OriginalSalePrice` (from discounted price)
* URL
* IsVirtual (from product type different than physical)

## Cart and Checkout

**GetCart**

**Example:**

```
{
  "CartToken":null,

  "ClientIP":"54.76.161.209",
  "CountryCode":"IL",
  "Culture":{
    "CultureCode":"he",
    "InputDataCultureCode":null,
    "PreferedCultureCode":null
  },
  "Currency":{
    "CurrencyCode":"ILS",
    "OriginalCurrencyCode":"GBP"
  },
  "Discounts":[
    {
      "Name":"10%All2",
      "DiscountCode":"40819d8c-1ad8-46e0-8b86-e3159487fd72",
      "OriginalDiscountValue":6.9,
      "DiscountValue":34.5,
      "ProductCartItemId":null,
      "LocalVATRate":20.000000000000000000000000000,
      "VATRate":20.000000000000000000000000000,
      "DiscountType":1,
      "CouponCode":"15%All2",
      "Description":null,
      "IsFreeShipping":false,
      "CalculationMode":1,
      "DiscountSource":1,
      "BenefitExternalId":null
    }],
  "FreeShipping":null,
  "HubId":null,
  "LocalShippingOptions":[
    {
      "Carrier":"globaleintegration_standard",
      "CarrierName":"globaleintegration_standard",
      "CarrierTitle":"globaleintegration_standard",
      "Code":"globaleintegration_standard",
      "IsPreferred":true,
      "Method":"globaleintegration_standard",
      "MethodDescription":"globaleintegration_standard",
      "MethodTitle":"globaleintegration_standard",
      "Price":0.0
    }],
  "LoyaltyData":null,
  "LoyaltyPoints":null,
  "Benefits":null,
  "MerchantCartHash":"EA9BFCB402065D2B93118B4D0F49203C",
  "MerchantCartToken":"e35774a9-7284-4296-b6c4-9ed1f14e1b03",
  "PaymentInstallments":null,
  "PriceModification":{
    "IncludeVAT":null,
    "PriceCoefficientRate":1.000000,
    "RoundingRuleId":11220
  },
  "Products":[
    {
      "ProductCode":"0006",
      "ProductCodeSecondary":null,
      "OrderedQuantity":1,
      "OriginalSalePrice":22.0,
      "OriginalListPrice":22.0,
      "OriginalMerchantPriceForDuties":null,
      "OriginalMerchantUnitSalePrice":22.0,
      "ListPrice":110.0000,
      "SalePrice":110.0000,
      "SalePriceBeforeRounding":107.848145823000000000,
      "MerchantPriceForDuties":null,
      "CartItemId":"00000000-0000-0000-0000-000000000001",
      "Name":"I'm a product",
      "ImageURL":"https://static.wixstatic.com/media/c837a6_dff384ebdb954fd9a5903b028ce213c7~mv2.jpg",
      "IsFixedPrice":false,
      "VATRateType":{
        "VATRateTypeCode":"vatRateType_GB_20.0",
        "Name":"vatRateType_GB_20.0",
        "Rate":20.0,
        "InternalVATRateTypeId":0
      },
      "LocalVATRateType":{
        "VATRateTypeCode":"vatRateType_GB_20.0",
        "Name":"vatRateType_GB_20.0",
        "Rate":20.0,
        "InternalVATRateTypeId":0
      },
      "Description":null,
      "ProductVatRate":null,
      "Keywords":null,
      "URL":null,
      "OriginCountryCode":"",
      "IsBlockedForGlobalE":false,
      "Attributes":[
      ],
      "ProductGroupCode":"1a2d7e83-4bef-31d5-09e1-3326ee271c09",
      "ProductGroupCodeSecondary":null,
      "ParentCartItemId":null,
      "CartItemOptionId":null,
      "ProductClass":null,
      "Weight":null,
      "NameEnglish":"",
      "DescriptionEnglish":"",
      "AttributesEnglish":[
      ],
      "Categories":[
      ],
      "Brand":null,
      "IsVirtual":false,
      "IsBundle":false,
      "BundleId":null,
      "IsBackOrdered":false,
      "BackOrderDate":null,
      "PriceCoefficientRate":null,
      "MetaData":{
        "Attributes":[
          {
            "AttributeKey":"CatalogItemId",
            "AttributeValue":"1a2d7e83-4bef-31d5-09e1-3326ee271c09"
          },
          {
            "AttributeKey":"AppId",
            "AttributeValue":"215238eb-22a5-4c36-9e7b-e7c08025e04e"
          },
          {
            "AttributeKey":"Options",
            "AttributeValue":"{\"variantId\":\"00000000-0000-0000-0000-000000000000\",\"options\":{}}"
          },
          {
            "AttributeKey":"ProductName",
            "AttributeValue":"I'm a product"
          }]
      },
      "DiscountPercentage":null,
      "IsGiftCard":false,
      "GiftCardId":null,
      "GenericHSCode":null
    },
    {
      "ProductCode":"0014",
      "ProductCodeSecondary":null,
      "OrderedQuantity":1,
      "OriginalSalePrice":24.0,
      "OriginalListPrice":24.0,
      "OriginalMerchantPriceForDuties":null,
      "OriginalMerchantUnitSalePrice":24.0,
      "ListPrice":120.0000,
      "SalePrice":120.0000,
      "SalePriceBeforeRounding":117.652522716000000000,
      "MerchantPriceForDuties":null,
      "CartItemId":"00000000-0000-0000-0000-000000000002",
      "Name":"I'm a product",
      "ImageURL":"https://static.wixstatic.com/media/c837a6_8ea5cc0a06664ef6a3c1cf64e1cb5a27~mv2.jpg",
      "IsFixedPrice":false,
      "VATRateType":{
        "VATRateTypeCode":"vatRateType_GB_20.0",
        "Name":"vatRateType_GB_20.0",
        "Rate":20.0,
        "InternalVATRateTypeId":0
      },
      "LocalVATRateType":{
        "VATRateTypeCode":"vatRateType_GB_20.0",
        "Name":"vatRateType_GB_20.0",
        "Rate":20.0,
        "InternalVATRateTypeId":0
      },
      "Description":null,
      "ProductVatRate":null,
      "Keywords":null,
      "URL":null,
      "OriginCountryCode":"",
      "IsBlockedForGlobalE":false,
      "Attributes":[
      ],
      "ProductGroupCode":"bc1da057-a5df-4b2f-9f8e-b37036b09524",
      "ProductGroupCodeSecondary":null,
      "ParentCartItemId":null,
      "CartItemOptionId":null,
      "ProductClass":null,
      "Weight":null,
      "NameEnglish":"",
      "DescriptionEnglish":"",
      "AttributesEnglish":[
      ],
      "Categories":[
      ],
      "Brand":null,
      "IsVirtual":false,
      "IsBundle":false,
      "BundleId":null,
      "IsBackOrdered":false,
      "BackOrderDate":null,
      "PriceCoefficientRate":null,
      "MetaData":{
        "Attributes":[
          {
            "AttributeKey":"CatalogItemId",
            "AttributeValue":"bc1da057-a5df-4b2f-9f8e-b37036b09524"
          },
          {
            "AttributeKey":"AppId",
            "AttributeValue":"215238eb-22a5-4c36-9e7b-e7c08025e04e"
          },
          {
            "AttributeKey":"Options",
            "AttributeValue":"{\"variantId\":\"00000000-0000-0000-0000-000000000000\",\"options\":{}}"
          },
          {
            "AttributeKey":"ProductName",
            "AttributeValue":"I'm a product"
          }]
      },
      "DiscountPercentage":null,
      "IsGiftCard":false,
      "GiftCardId":null,
      "GenericHSCode":null
    }],
  "rateData":"ZEN99zm71Xg2IYEeJVY5bQcKOSee8Xg98MCdPj2%2bQSU%3d",
  "UrlParameters":null,
  "UseIpv6":false,
  "UserDetails":{
    "AddressDetails":[
    ],
    "UserId":null,
    "IsB2B":null
  },
  "VATRegistration":null,
  "VoucherData":null,
  "WebStoreCode":null,
  "WebStoreInstanceCode":null,
  "CartId":null,
  "IsFreeShipping":null,
  "FreeShippingCouponCode":null,
  "AllowMailsFromMerchant":false,
  "AllowSMSFromMerchant":false,
  "CookieConsent":0,
  "IsMOTO":0
}

```

**SendCart**

**Example:**

```
{
  "id":"e35774a9-7284-4296-b6c4-9ed1f14e1b03",

  "userDetails":null,
  "productsList":[
    {
      "productCode":"0006",
      "productCodeSecondary":null,
      "orderedQuantity":1,
      "originalSalePrice":22,
      "originalListPrice":22,
      "originalMerchantPriceForDuties":null,
      "originalMerchantUnitSalePrice":0,
      "listPrice":0,
      "salePrice":0,
      "salePriceBeforeRounding":0,
      "merchantPriceForDuties":null,
      "cartItemId":"00000000-0000-0000-0000-000000000001",
      "name":"I'm a product",
      "imageURL":"https://static.wixstatic.com/media/c837a6_dff384ebdb954fd9a5903b028ce213c7~mv2.jpg",
      "imageWidth":"4213",
      "imageHeight":"5197",
      "isFixedPrice":false,
      "vatRateType":null,
      "localVATRateType":null,
      "description":null,
      "productVatRate":null,
      "keywords":null,
      "url":"https://www.m123m123.shop/product-page/im-a-product-6",
      "originCountryCode":null,
      "isBlockedForGlobalE":false,
      "attributes":null,
      "productGroupCode":"1a2d7e83-4bef-31d5-09e1-3326ee271c09",
      "parentCartItemId":null,
      "cartItemOptionId":null,
      "productClass":null,
      "weight":0.00000,
      "nameEnglish":null,
      "descriptionEnglish":null,
      "attributesEnglish":null,
      "categories":null,
      "brand":null,
      "isVirtual":false,
      "isBundle":false,
      "bundleId":null,
      "isBackOrdered":false,
      "backOrderDate":null,
      "priceCoefficientRate":null,
      "metaData":{
        "attributes":[
          {
            "attributeKey":"CatalogItemId",
            "attributeValue":"1a2d7e83-4bef-31d5-09e1-3326ee271c09"
          },
          {
            "attributeKey":"AppId",
            "attributeValue":"215238eb-22a5-4c36-9e7b-e7c08025e04e"
          },
          {
            "attributeKey":"Options",
            "attributeValue":"{\"variantId\":\"00000000-0000-0000-0000-000000000000\",\"options\":{}}"
          },
          {
            "attributeKey":"ProductName",
            "attributeValue":"I'm a product"
          }]
      },
      "discountPercentage":null,
      "isGiftCard":false,
      "giftCardId":null,
      "genericHSCode":null
    },
    {
      "productCode":"0014",
      "productCodeSecondary":null,
      "orderedQuantity":1,
      "originalSalePrice":24,
      "originalListPrice":24,
      "originalMerchantPriceForDuties":null,
      "originalMerchantUnitSalePrice":0,
      "listPrice":0,
      "salePrice":0,
      "salePriceBeforeRounding":0,
      "merchantPriceForDuties":null,
      "cartItemId":"00000000-0000-0000-0000-000000000002",
      "name":"I'm a product",
      "imageURL":"https://static.wixstatic.com/media/c837a6_8ea5cc0a06664ef6a3c1cf64e1cb5a27~mv2.jpg",
      "imageWidth":"4213",
      "imageHeight":"5197",
      "isFixedPrice":false,
      "vatRateType":null,
      "localVATRateType":null,
      "description":null,
      "productVatRate":null,
      "keywords":null,
      "url":"https://www.m123m123.shop/product-page/im-a-product-14",
      "originCountryCode":null,
      "isBlockedForGlobalE":false,
      "attributes":null,
      "productGroupCode":"bc1da057-a5df-4b2f-9f8e-b37036b09524",
      "parentCartItemId":null,
      "cartItemOptionId":null,
      "productClass":null,
      "weight":0.00000,
      "nameEnglish":null,
      "descriptionEnglish":null,
      "attributesEnglish":null,
      "categories":null,
      "brand":null,
      "isVirtual":false,
      "isBundle":false,
      "bundleId":null,
      "isBackOrdered":false,
      "backOrderDate":null,
      "priceCoefficientRate":null,
      "metaData":{
        "attributes":[
          {
            "attributeKey":"CatalogItemId",
            "attributeValue":"bc1da057-a5df-4b2f-9f8e-b37036b09524"
          },
          {
            "attributeKey":"AppId",
            "attributeValue":"215238eb-22a5-4c36-9e7b-e7c08025e04e"
          },
          {
            "attributeKey":"Options",
            "attributeValue":"{\"variantId\":\"00000000-0000-0000-0000-000000000000\",\"options\":{}}"
          },
          {
            "attributeKey":"ProductName",
            "attributeValue":"I'm a product"
          }]
      },
      "discountPercentage":null,
      "isGiftCard":false,
      "giftCardId":null,
      "genericHSCode":null
    }],
  "discountsList":[
    {
      "originalDiscountValue":"6.9",
      "couponCode":"15%All2",
      "name":"10%All2",
      "discountType":1,
      "discountValue":0,
      "calculationMode":1,
      "productCartItemId":null,
      "discountCode":"40819d8c-1ad8-46e0-8b86-e3159487fd72",
      "isFreeShipping":null
    }],
  "merchantCartHash":null
}


```

**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. The Global-e Application implements a Global-e API method that uses the Platform API to load the contents of the user's cart and pass it securely to the Global-e checkout by means of a server-to-server API call.

**Clear Cart**

To clear the cart, once an order has been placed on the Global-e checkout, we use Wix’s API “Mark checkout as completed” to inform of the order creation of a cart and as a result clear the cart in the front-end and back-end of the store.

**Stock Validation**

To prevent inventory issues such as out-of-stock items in Global-e orders, we conduct a stock validation call before processing new orders. Each item in the cart is validated and checked to ensure it is in stock before creating the order in Global-e. When there is an item with missing stock, it is communicated to the consumer in a popup as follows:

<Frame>
  <img src="https://mintcdn.com/globale-nce/uDvROrO5ThNQJhEA/images/uuid-355b15e7-02f3-76ef-aecc-698dfb55ac27.png?fit=max&auto=format&n=uDvROrO5ThNQJhEA&q=85&s=ed8bf584ecc5a745170590f5dd1af16f" width="606" height="290" data-path="images/uuid-355b15e7-02f3-76ef-aecc-698dfb55ac27.png" />
</Frame>

This functionality has been implemented in case we may want to activate additional logic beyond Stock Validation at the moment the customer places the order.

For this validation we use Wix’s APIs [Create Checkout](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/create-checkout) and [Get Checkout.](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/get-checkout)

**Cart Discount**

Discounts in this integration are currently only supported from the cart. The merchant can use all of the available online discounts the platform offers. These include:

* Coupons (Cart & Item level)

  * $Discount: Offer a fixed price discount (e.g.$10 off).
  * % Discount: Offer a discount as a percentage (e.g. 20% off) The discount could be 100% on the item.
  * Free Shipping: Reward customers with free shipping.
  * Sale Price: Offer products at a specific price (e.g. Buy t-shirts for only \$12).
  * Buy X get Y
* Automatic Discounts (Item level)

  * Percentage off (e.g. 20% off).
  * Amount off (e.g. \$20 off).
  * Sale price (e.g. all hats are just \$20).

## Order Flow

**Order Creation**

After an order is completed in the Global-e checkout the order information is sent to the WIX platform so you can review your Global-e orders from your store's back-office.

Wix’s API Create Order is used to support order creation in WIX’s back-office after the required data of the orders is received through the SOTM API.

Note: The main currency stored and displayed on WIX’s back-office is the merchant reconciliation currency. Only the product reconciliation price is reflected in Wix.

<Frame>
  <img src="https://mintcdn.com/globale-nce/q28nt6TaYmhf9wTZ/images/uuid-e7018edf-c82c-29b5-3192-c03f948596b3.png?fit=max&auto=format&n=q28nt6TaYmhf9wTZ&q=85&s=a8116d6837d5d58934f47d941f3f2711" width="1310" height="859" data-path="images/uuid-e7018edf-c82c-29b5-3192-c03f948596b3.png" />
</Frame>

Once the order is created in the platform you can find it in the list of orders in the back office.

**Order details in the back office**

* Shipping and Taxes values are not stored or displayed on the platform.
* The order is marked as a Global-e order and displays a Global-e order ID. globale\_order\_id.png
* The order totals in customer currency are stored in the buyer notes of the order

  <Frame>
    <img src="https://mintcdn.com/globale-nce/eLhOOxssApl6JeL0/images/uuid-b57e0d88-dc0b-a969-4a88-c4a5550a2f4d.png?fit=max&auto=format&n=eLhOOxssApl6JeL0&q=85&s=9deb4c65e2e4087dcca992f3e5f19a35" width="376" height="147" data-path="images/uuid-b57e0d88-dc0b-a969-4a88-c4a5550a2f4d.png" />
  </Frame>

**Payment Verification**

In order to successfully complete the update of an order in WIX back-office, we change the payment status of the order from UNPAID to PAID, once the fraud check on our end is completed.

<Frame>
  <img src="https://mintcdn.com/globale-nce/HEMTL5jLmdt1JA9r/images/uuid-a6f21c89-aaa4-5511-04b8-7645598e99f3.png?fit=max&auto=format&n=HEMTL5jLmdt1JA9r&q=85&s=38688d34496ea3159dddd86876196e60" width="807" height="291" data-path="images/uuid-a6f21c89-aaa4-5511-04b8-7645598e99f3.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/globale-nce/HEMTL5jLmdt1JA9r/images/uuid-a17eefd2-a7b3-f260-53b5-2561310ac4d3.png?fit=max&auto=format&n=HEMTL5jLmdt1JA9r&q=85&s=205d1dda953cd65c235e2cdce6f60874" width="800" height="261" data-path="images/uuid-a17eefd2-a7b3-f260-53b5-2561310ac4d3.png" />
</Frame>

To complete this update, use Global-e's `PerformPayment` API and communicate with Wix’s end-point Bulk [Update Payment Statuses.](https://dev.wix.com/api/rest/drafts/order-payments/add-payments?branch=order-payments)

**OrderFulfilment**

Since the fulfilment process occurs on the Global- side, we notify Wix and create the fulfilment of the parcel so that the order status is synced to the actual fulfilment status. Once a fulfilment is done in the Global-e Admin, Wix is notified and updated with the tracking number and the tracking URL of the parcel. This number and URL appear under the status of each parcel.

Partial fulfilment

<Frame>
  <img src="https://mintcdn.com/globale-nce/HEMTL5jLmdt1JA9r/images/uuid-99fdd3e1-416f-b6c4-c6e8-91be26742c2f.png?fit=max&auto=format&n=HEMTL5jLmdt1JA9r&q=85&s=a63321869191b366e977941453b733ef" width="858" height="407" data-path="images/uuid-99fdd3e1-416f-b6c4-c6e8-91be26742c2f.png" />
</Frame>

Fulfilment

<Frame>
  <img src="https://mintcdn.com/globale-nce/q28nt6TaYmhf9wTZ/images/uuid-f4e0e486-99c7-5aa3-92a5-0d1537b59ab6.png?fit=max&auto=format&n=q28nt6TaYmhf9wTZ&q=85&s=c518e4da188b2f20a7bbacf6d470621f" width="859" height="396" data-path="images/uuid-f4e0e486-99c7-5aa3-92a5-0d1537b59ab6.png" />
</Frame>

To create fulfilment for a parcel in Wix we use Global-e's API Update Parcel Dispatch to send the relevant order information to Wix and communicate with the end-point Create Fulfilment

**Order cancelation**

Cancelations are managed through the Global-e Merchant admin. Users can cancel orders, select the reason for cancelation, and automatically create a refund once the order is canceled.

Once the order is canceled, the order status is updated in Wix’s back office so you can see the actual status of the orders.

<Frame>
  <img src="https://mintcdn.com/globale-nce/Bp2mTKuI4zIQKDG5/images/uuid-7d587693-ac8e-ae11-b1d5-602351df1ac4.png?fit=max&auto=format&n=Bp2mTKuI4zIQKDG5&q=85&s=1b542db697d3c3f4209a0e8a7e6953bf" width="515" height="117" data-path="images/uuid-7d587693-ac8e-ae11-b1d5-602351df1ac4.png" />
</Frame>

When an order is canceled, Wix is notified through Global-e's Update Order Status API and Wix’s end-point [Cancel Order.](https://dev.wix.com/api/rest/wix-ecommerce/orders/cancel-order?branch=orders)

**Order refund**

Refunds are also managed through the Global-e Merchant admin. There you can create full and partial refunds.

To keep track of the payment status of an order from Wix’s back-office, Global-e notifies the platform each time a new refund is created.

<Frame>
  <img src="https://mintcdn.com/globale-nce/eLhOOxssApl6JeL0/images/uuid-cda92e13-c39a-ab64-651e-831d858e3341.png?fit=max&auto=format&n=eLhOOxssApl6JeL0&q=85&s=5af22b3068d9eb99560190f22080b6fb" width="807" height="458" data-path="images/uuid-cda92e13-c39a-ab64-651e-831d858e3341.png" />
</Frame>

The only refund values that are stored and displayed on the platform are for the line items and the discounts.

The notification and status updates are completed using Global-e's Notify Order Refund API and communication with Wix’s end-point \[Add Refund]\([http://Notify](http://Notify) Order Refund API and communicate with Wix’s end-point Add Refund.).

The items will be restocked.

**Returns**

If you support returns via Global‑e, the shopper can use the Returns Portal to return goods or a dedicated merchant role can use the Merchant Portal to support the shopper.

For more information on the Returns Portal see Returns Portal.

**The following are not supported:**

* Replacements
* Pre-orders
* Cart abandonment
* Analytics \&Market Feeds
