> For the complete documentation index, see [llms.txt](https://docs.globo.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.globo.io/globo-b2b-bulk-order/reference/how-it-works.md).

# How it works

How Globo B2B Bulk Order gets your settings onto your storefront, adds items to the Shopify cart and counts orders on the Dashboard.

Globo B2B Bulk Order runs in two places: the app in your Shopify admin, where you set up your tools, and a small script on your online store, which shows them to buyers. Everything buyers add goes into your normal Shopify cart, and checkout stays Shopify's own. This page explains what happens in between, so you know where to look when something doesn't appear.

## The big picture

| # | Where                               | What happens                                                                                                                                                              |
| - | ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 1 | The app, in Shopify admin           | You create Quick Order forms, Variant Tables and Collection Quick Orders, and set **Stock thresholds**, **Toast**, **Translations** and **Order export** in **Settings**. |
| 2 | Your Shopify store                  | When you save, the app publishes the settings of every **Active** item and every published language into your store.                                                      |
| 3 | Every page of your online store     | The **Globo Bulk Order** app embed loads the app's script, together with the published settings.                                                                          |
| 4 | Product, collection and other pages | The script shows each tool where it belongs, to the buyers you chose.                                                                                                     |
| 5 | The Shopify cart                    | Buyers add items with the tools. The items go into the same cart as your theme's own add-to-cart button.                                                                  |
| 6 | Shopify checkout                    | Buyers check out as usual. The app doesn't change checkout.                                                                                                               |
| 7 | The app's Dashboard                 | Orders that include items added with the app count in **Analytics overview**.                                                                                             |

## From the app to your storefront

### Saving publishes your settings

When you save a form, a table, a setting or a translation, the app copies its settings into your Shopify store. Your storefront reads them from there, so the tools appear without waiting for the app's servers.

* Only items with the status **Active** are published. A **Draft** item never appears on the storefront. Switching an item to **Draft**, or deleting it, removes it from the storefront.
* Only languages marked **Published** in **Settings** > **Translations** reach the storefront.
* Publishing runs in the background, so a change can take a moment to appear. Reload the storefront page to see it.
* Each time you open the app, it publishes all your settings again.

### The app embed loads the tools

The **Globo Bulk Order** app embed adds the app's script to every page of your online store. Every storefront tool needs it: the Quick Order form, the Variant Table and Collection Quick Order, as well as stock labels and add-to-cart messages. The embed has no settings. See [Enable the app embed](/globo-b2b-bulk-order/getting-started/enable-app-embed.md).

On each page, the script first checks whether your store has at least one **Active** tool. If it doesn't, the script stops right away. Otherwise it looks for the places on the page where a tool belongs and shows it there.

### Where each tool appears

| Tool                       | Where buyers see it                                                                                                    | How it gets there                                                                                                                                                                                                                          |
| -------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Quick Order Form**       | Where you place it, with the **GloboBO quick order form** app block or by pasting its embed code into a theme template | You place it. It also has to be allowed on that page under **Visibility** > **Display location**. See [Quickstart](/globo-b2b-bulk-order/getting-started/getting-started.md#add-the-form-to-a-page).                                       |
| **Variant Table**          | Product pages of the products that match its **Products** tab                                                          | Automatic. The table goes at the top of the area that holds your theme's add-to-cart button. Your theme's own variant picker, quantity box and buttons stay visible.                                                                       |
| **Collection Quick Order** | Product cards on the home page, collection pages, search results, and featured and related products on product pages   | Automatic, on every page with product cards, unless you tick pages under **Visibility** > **Display location**. The **Classic** template adds a button below the product, and the **Floating** template adds an icon on the product image. |

### Who sees which tool

The script decides on each page, in the buyer's browser, in this order:

1. **Page**: is this a page where the tool may appear?
2. **Customer**: does the buyer match **Who can see this form?** That's **All customers**, **Logged-in customers only**, **Guest customers only** or **Customers with tags**.
3. **Product**: for a Variant Table or a Collection Quick Order, does the product match the rules on the **Products** tab? For a Quick Order form, the **Products** tab sets which products the form lists.

A product page shows at most one Variant Table, and a product card shows at most one Collection Quick Order. When several match, the newest one you created wins. Editing an older one doesn't make it win. Quick Order forms are different: you can show several, each where you placed it. See [Customer & product targeting](/globo-b2b-bulk-order/targeting-and-design/customer-and-product-targeting.md).

### Wording and language

The storefront text of the tools comes from **Settings** > **Translations**, in the language the buyer is browsing your store in. If that language isn't published, the script uses the same base language if you published one (for example French for French (Canada)), and otherwise your English wording. A field you leave empty shows the app's built-in English text.

The Variant Table's column headers are the exception: they're the column titles saved with each table, so they don't change with the buyer's language. See [Translations](/globo-b2b-bulk-order/settings/overview.md).

## Cart and checkout

All three tools add items to your store's regular Shopify cart, the same cart your theme's own add-to-cart button uses. The app has no cart or checkout of its own.

| Tool                       | How buyers add items                                                                                                                                                                                                    | What happens next                                                                                                                               |
| -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| **Quick Order Form**       | **Add** on a row sets that item's quantity in the cart to the row's quantity (1 if the row was empty). After a buyer uploads an order file or pastes a SKU list, **Add To Cart** in the review adds all reviewed items. | The footer always shows the real cart: the item count and **Total**. **View cart** opens the cart page and **Checkout** opens Shopify checkout. |
| **Variant Table**          | The **Add to Cart** button, which shows the total price of the chosen quantities in brackets, adds every row with a quantity in one go.                                                                                 | All quantities go back to 0.                                                                                                                    |
| **Collection Quick Order** | The add button on a product card, or a variant in the list of options.                                                                                                                                                  | The quantity goes back to 1.                                                                                                                    |

After an item is added:

* the cart count in your theme's header updates (on most themes)
* a toast message confirms it, when **Show toast after add to cart** is on in **Settings** > **Toast** (see [Toast notifications](/globo-b2b-bulk-order/settings/cart-notifications.md))
* the buyer stays on the page. The tools don't open your theme's cart drawer.

Good to know:

* **Clear** in a Quick Order form empties the buyer's whole Shopify cart, not only the items added with the form.
* **Clear cart and add** is an optional button in the Quick Order review. It empties the cart first, then adds the reviewed items.
* When a buyer enters a number in **PO / Order # (optional)** in the Quick Order review, the app saves it on the cart as `Customer PO #` and adds a line `Customer PO #: …` to the cart note. Both carry over to the order.
* The Variant Table and Collection Quick Order mark each cart line they add (see the next section). If a buyer adds the same variant with your theme's own button too, the cart can show it as two separate lines.

The app doesn't change checkout, shipping, taxes or discounts. Shopify calculates the final amounts in the cart and at checkout.

## How orders are counted on the Dashboard

The numbers in the Dashboard's **Analytics overview** only include orders that contain items added with the app. This is how the app knows:

1. When a tool adds an item to the cart, it marks that cart line with the name of the tool. Shopify hides this mark at checkout, and most themes hide it in the cart.
2. When a buyer places an order, Shopify notifies the app.
3. If at least one item in the order carries the mark, the app records the order: its Shopify order ID, which tool added the item, the order total, the currency and the date. The app ignores all other orders.

| Metric                  | What it shows                                                                                                                             |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| **Bulk Orders**         | The number of recorded orders since you installed the app. The line below it, for example **3 orders this week**, counts the last 7 days. |
| **Revenue Generated**   | The sum of those orders' full totals, including other items, shipping and taxes.                                                          |
| **Average order value** | **Revenue Generated** divided by **Bulk Orders**.                                                                                         |

* Counting starts when you install the app. Orders from before aren't added.
* The total is recorded when the order is placed. Later edits, refunds and cancellations don't change the numbers.
* An item a buyer added with your theme's own button doesn't get the mark, even if the buyer later changes its quantity in a Quick Order form.

See [Dashboard](/globo-b2b-bulk-order/getting-started/dashboard.md#analytics-overview) for where these numbers appear.

## Prices and currency

* The tools show the prices of your Shopify products. Globo B2B Bulk Order doesn't calculate or change prices.
* Prices in the tools use your store's currency format.
* The cart and checkout show Shopify's own cart amounts, including any discounts. The Quick Order form's **Total** shows the same cart total.

{% hint style="info" %}
For customer-specific or tiered wholesale prices, use [Globo B2B Wholesale Pricing](https://apps.shopify.com/wholesale-sami). When that app is installed, it reprices the cart, and the Quick Order form's **Total** shows the discounted total. Collection Quick Order then leaves the prices on your product cards to that app.
{% endhint %}

## Performance

* **One small script.** The app embed loads a single small script. It waits until the page has been drawn before it starts, so your theme's page shows first.
* **Nothing to do, nothing loaded.** If your store has no **Active** tool, the script stops at once.
* **Only what the page needs.** The script loads the code for a tool only on pages where that tool can appear: Quick Order code where a form is placed, Variant Table code on product pages, Collection Quick Order code where there are product cards. The Excel reader loads only when a buyer uploads an Excel file or downloads the sample file.
* **Data straight from Shopify.** Your settings are read from your Shopify store, mostly as part of the page itself, not from the app's servers. The Variant Table uses the product data already on the product page. The Quick Order form and Collection Quick Order load products from Shopify. The Quick Order form shows its first page of products first and loads the rest in the background.
* **Few calls to the app's servers.** On your online store, the script contacts the app's servers for two things only: reading an uploaded PDF or image order file, and quickly matching pasted or uploaded SKUs. These requests go through your store's own domain, and Shopify signs each one. In customer accounts, **Download CSV** asks the app's server to prepare the order file.

If you think the app slows down your store, tell us from **Contact Us** > **Theme and other apps** > **It slows down my store**. See [Contact support](/globo-b2b-bulk-order/help/contact-support.md).

## Theme compatibility

To place the Variant Table and Collection Quick Order, the app finds parts of your theme: the product form, the add-to-cart button, product cards, prices and images. It keeps placement settings for many popular themes and picks the ones for your published theme. For other themes it uses general rules that fit most layouts.

* **Cards that load later.** Product cards added after the page loads, for example by infinite scroll, filters or recommendation sections, get Collection Quick Order once the buyer scrolls. The script checks again about a second after scrolling stops.
* **Card prices.** With the **Classic** template and a variant dropdown, Collection Quick Order replaces the price text on the card with the selected variant's price, and shows the variant's image when it has one.
* **Links that aren't cards.** Collection Quick Order skips product links in menus, footers, the cart page and the cart drawer. On a product page, it also skips links to that same product inside the main product form.

{% hint style="warning" %}
**Changing your theme?** App embeds and app blocks are saved per theme. In the new theme, turn on the **Globo Bulk Order** app embed and, if the theme doesn't have it yet, add the **GloboBO quick order form** block to your page templates again. Then open Globo B2B Bulk Order once, so it picks up the placement settings for the new theme.
{% endhint %}

If the Variant Table doesn't appear, or a button sits in the wrong place on your theme, send us a message from **Contact Us**. Choose the topic **Theme and other apps** and the issue **My theme isn't fully supported**. If a tool disappeared after you changed themes, choose **A form isn't showing on my store** and **It stopped showing after a theme change** instead.

## Related

* [Permissions & data](/globo-b2b-bulk-order/reference/permissions-and-data.md): what the app can access, what it stores and what it sends to AI.
* [Enable the app embed](/globo-b2b-bulk-order/getting-started/enable-app-embed.md): turn on the script that shows every tool.
* [Dashboard](/globo-b2b-bulk-order/getting-started/dashboard.md): where the order numbers appear.
* [Troubleshooting](/globo-b2b-bulk-order/help/troubleshooting.md): what to check when a tool doesn't show.
