> For the complete documentation index, see [llms.txt](https://docs.elitebundleapp.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.elitebundleapp.com/developer-docs/getting-started.md).

# Getting Started

## 1. Enable SDK access

SDK access is not enabled by default. To turn it on:

1. Open the Elite Bundle Builder app in your Shopify admin
2. Go to **Settings → Developer SDK**
3. Click **Enable SDK access** and enter your developer email
4. Click **Enable SDK access** to confirm

The SDK is immediately active. The team may also reach out with setup guidance.

## 2. Verify the global is present

Open any bundle product page in your browser, open DevTools, and run:

```js
window.eliteBundle
```

You should see an object like:

```js
{
  version: "1.0.0",
  app: {
    shopDomain: "your-store.myshopify.com",
    moneyFormat: "${{amount}}",
    currencyCode: "USD",
    currencyRate: 1,
    storefrontAccessToken: "...",
    sdkEnabled: true,
    cartTransformCreated: true,
    bundleDiscountCreated: true,
    webPixelCreated: true,
    bundleRenderMode: "product_page"
  },
  byob: { templateData: {...}, bundleConfig: {...}, shopifyVariantId: 123, productId: "789" },
  mob: null,
  sdk: {
    byob: { steps: [...], cart: [...], addToCart: fn, checkout: fn, ... },
    mob: null
  },
  on: fn,
  off: fn
}
```

`sdk` is only present when `sdkEnabled` is `true`. If it is `undefined`, SDK access has not been enabled in the app settings.

## 3. Wait for the ready event

The `sdk.byob` and `sdk.mob` objects are populated after React mounts and products are fetched from the Storefront API. Listen for the ready event before reading SDK state:

```js
document.addEventListener('elite:byob:ready', (event) => {
  const { steps, formatPrice } = window.eliteBundle.sdk.byob;
  console.log(`Bundle loaded with ${steps.length} steps`);
  steps.forEach(step => {
    console.log(step.title, step.products.map(p => p.title));
  });
});
```

For MOB:

```js
document.addEventListener('elite:mob:ready', () => {
  const { options, selectableItems, totalPrice, formatPrice } = window.eliteBundle.sdk.mob;
  console.log(`MOB loaded with ${options.length} options`);
  console.log('Total price:', formatPrice(totalPrice));
});
```

## 4. Check if the SDK is available

Before using the SDK in your theme JavaScript, guard against stores that don't have it enabled:

```js
function onSdkReady(type, callback) {
  if (!window.eliteBundle?.sdk) return; // SDK not enabled

  const eventName = type === 'mob' ? 'elite:mob:ready' : 'elite:byob:ready';
  document.addEventListener(eventName, callback);

  // Handle the case where the event already fired before your script ran
  const sdk = window.eliteBundle.sdk[type];
  if (sdk && !sdk.isLoading && !sdk.error) callback();
}

onSdkReady('byob', () => {
  // safe to use window.eliteBundle.sdk.byob here
});
```

## 5. Read static bundle config

The raw bundle config from Liquid is always available synchronously, even before React mounts:

```js
const byob = window.eliteBundle.byob;
console.log(byob.productId);       // Shopify product ID
console.log(byob.bundleConfig);    // full bundle config object
```

The `app` object is also always available:

```js
const { shopDomain, moneyFormat, storefrontAccessToken } = window.eliteBundle.app;
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.elitebundleapp.com/developer-docs/getting-started.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
