For the complete documentation index, see llms.txt. This page is also available as Markdown.

Global object

Reference for window.eliteBundle: shop-level values, the current bundle data and the optional SDK object exposed on Shopify bundle pages.

window.eliteBundle = {
  version: string;
  app:  EliteBundleApp;          // shop-level values
  byob: BundleData | null;       // this page's bundle, if any
  sdk?: { byob: BundleSDK | null };
  on(event: string, cb: EventListener): void;
  off(event: string, cb: EventListener): void;
}

Two things load at different times, which matters if your script runs early:

  • app and byob are written by the theme app embed in <head>, so they are there before any other JavaScript runs.

  • version, sdk, on and off are added by the bundle script, which is deferred. window.eliteBundle can therefore exist while sdk is still undefined.

Never treat a missing sdk as "SDK access is off" — wait for elite:byob:ready on document instead. See Event timing.

sdk is only populated when SDK access is enabled in Settings → Developer SDK. Always use window.eliteBundle.sdk?.byob.

The global carries a few internal keys beyond those listed here, such as the bundle registry and upsell data. They back the app's own storefront behaviour, are not part of the public API, and can change without notice — please do not build on anything undocumented.


app

Shop-level values, available synchronously.

Field
Type
Description

shopDomain

string

The storefront domain the page was requested on

moneyFormat

string

Shopify money format string, e.g. "${{amount}}"

currencyCode

string

ISO 4217 currency code of the buyer's active currency

currencyRate

number

Exchange rate from the shop's base currency to the buyer's. 1 when they match. Added by the bundle script

countryCode

string

ISO 3166-1 alpha-2 market country

locale

string

Buyer's active language ISO code, e.g. "en"

storefrontAccessToken

string | null

Storefront API token, if you need to make your own Storefront API calls

sdkEnabled

boolean

Whether SDK access is enabled for this shop

Other fields on app reflect internal setup state and are not part of the public API.


byob

The bundle on the current page, for every bundle type. It is null (or absent, before the bundle script runs) on any page without a bundle, so always guard access. On a fixed bundle's page it is set, but sdk.byob stays empty: Shopify sells that bundle as a normal product.

Field
Type
Description

bundleConfig

object

The bundle's stored configuration, in an internal encoded form

shopifyVariantId

number | string | null

Variant ID of the bundle product

productId

string

Shopify product ID. Stable identifier for this bundle

bundleConfig is not a public API. It is a compact encoded form written for the storefront's own decoder — keys are abbreviated and products are stored as bare IDs with no titles, images or prices. Its shape can change without notice. For anything you want to read or render, use the Bundle SDK, which gives you the same data fully resolved.


on / off

Convenience wrappers around document.addEventListener / removeEventListener. Added by the bundle script, so early theme code should call document.addEventListener directly.

See the Events Reference for every available event.

Last updated