Sesami Experience Multi-day booking not working with Shopify Hydrogen

Hi Support,

When checking through a temporary Shopify Theme for testing, the widget seems to be working well for multi-day services as I am able to select the available slot and proceed to add to cart.

But no slot is available when using Hydrogen (Image below). The sesami experience integration is done according to this documentation at https://sesami.dev/docs/sesami-experience/quick-start/.

I have inspected and compared both HTML elements of the element between Shopify Theme and Hydrogen, both sides are using the same shop-id & service-id properties. So I couldn’t further identify the cause.

I could be wrong but could it be the injected javascript from the documentation is outdated?
<script async src="``https://cdn.sesami.co/storefront/latest/sesami-main.js``"></script>

Please advice.

hi @jackson_tan

Thanks for sharing the issue.

It would be great if you could share the full initialization code for Sesami in your project.

In situations like this, where the UI is working but there is no data, the first step is to check the connection to the Sesami server. Please open the Network tab and check what the responses from the Sesami server are.

Sharing more information will help us solve your issue faster.

Thanks!

Hello @Mohammad_Dehghani

Initialization

Sesami is initialized using the Script tag from Hydrogen as stated at the documentation Step 1 here.
Below is a snippet of my initialization, located at the top-most layer of my app.

<Script src="``https://cdn.sesami.co/storefront/latest/sesami-main.js``" />

The sesami-main.js bundle appears to be loaded from Network tab.

Network tab inspections

A comparison on the /storefront and /availabilities endpoint response I get between Shopify Themes and Hydrogen. I believe you can inspect these url to see the response I get.

Origin Endpoint
Shopify Theme /storefront https://app.sesami.co/storefront/?url=aHR0cHM6Ly9vbmVoYWxmLWNvZmZlZS5teXNob3BpZnkuY29tL3Byb2R1Y3RzL2Z1bmRhbWVudGFscy1vZi1lc3ByZXNzby1mb3ItYmFyaXN0YXM/X3Bvcz0yJl9zaWQ9MmRkM2Y4ZTcxJl9zcz1yJm9zZWlkPTFCQzdidDJCUm5ScFRMUENmSGJpbkMzYg==&shopId=69919178965&target[0][productId]=9138514362581
Shopify Theme /availabilities https://app.sesami.co/availabilities?length=7&start=2025-11-09&accesstoken=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzaG9wIjoib25laGFsZi1jb2ZmZWUubXlzaG9waWZ5LmNvbSIsInNob3BEb21haW4iOiJhY2NvdW50Lm9uZWhhbGZjb2ZmZWUuY29tIiwiaXNzIjoiaHR0cHM6Ly9zdG9yZWZyb250LnNlc2FtaS5jbyIsInN1YiI6IjY4YzkzMzA4MmRjZTEzMmI4OTNlODk1N2ZkMzA4YWUwZDBiY2FmMjg1N2EwY2ZhNjYxNjlhMzRiYjc4ODMyNjkiLCJqdGkiOiI1Y2RkNjRhNy02YzUxLTQxZGUtOGUyMi01MzFjODBjNzYzNDYiLCJpYXQiOjE3NjI2NzEyODEsImV4cCI6MTc2MjcwNzI4MSwibmJmIjoxNzYyNjcxMjgxfQ.h8PEOCqOPeNI6IJe63Ltu0qvJfSbtCkyQxoOD_CWpdo&shopId=69919178965&productId=9138514362581&variantId=52263336739029&timezone=Asia/Kuala_Lumpur&location=690b0237afd366440bc8aabc&resources[]=68ff156140f40c9ea54fc142
Hydrogen /storefront https://app.sesami.co/storefront/?url=aHR0cDovL2xvY2FsaG9zdDozMDAwL3Byb2R1Y3RzL2Z1bmRhbWVudGFscy1vZi1lc3ByZXNzby1mb3ItYmFyaXN0YXM/RHVyYXRpb249MjgraG91cnM=&shopId=69919178965&target[0][productId]=9138514362581
Hydrogen /availabilities https://app.sesami.co/availabilities?length=7&start=2025-11-09&accesstoken=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzaG9wIjoib25laGFsZi1jb2ZmZWUubXlzaG9waWZ5LmNvbSIsInNob3BEb21haW4iOiJhY2NvdW50Lm9uZWhhbGZjb2ZmZWUuY29tIiwiaXNzIjoiaHR0cHM6Ly9hcHAuc2VzYW1pLmNvIiwic3ViIjoiNjhjOTMzMDgyZGNlMTMyYjg5M2U4OTU3ZmQzMDhhZTBkMGJjYWYyODU3YTBjZmE2NjE2OWEzNGJiNzg4MzI2OSIsImp0aSI6ImE0YzExZmE1LTMxNDQtNDQ5Yy05MjE3LTRjMDlkZTFiN2NlOSIsImlhdCI6MTc2MjY3MTMxMCwiZXhwIjoxNzYyNzU3NzEwLCJuYmYiOjE3NjI2NzEzMTB9.bBu2_IA-NiB0tUnNdObV5bgnpAkiIshPlxdBZL8433w&shopId=69919178965&productId=9138514362581&quantity=1&timezone=Asia/Kuala_Lumpur&location=690b0237afd366440bc8aabc&resources[]=68ff156140f40c9ea54fc142

From observing the /availabilities endpoint, Shopify Theme was able to return the correct schedule/object meanwhile Hydrogen is simply returning an empty array.

hi @jackson_tan

thanks for the information

is it possible for you to point me to the page that you are working on so i could help you in debugging and provide you with solution

by the way why do you have backtick in the script src ?

Hi @Mohammad_Dehghani

Unfortunately this feature is still being locally developed, its not yet deployed online anywhere.

For staging site, my client’s Shopify Plan only allows for 1 public environment which is being used by production. So I’ll have to ask the client to add you as staff to access the staging site at https://staging-1232ab89dea3fae3e673.o2.myshopify.dev.

The script backtick was automatically generated when I tried to apply “preformatted text” with the text editor. Raw copy being this:

<Script src="https://cdn.sesami.co/storefront/latest/sesami-main.js" />

hi @jackson_tan

no problem at all

can i offer you a simple code snippet ! (this is what i used before)

import {useEffect} from ‘react’;

import {useCart} from ‘@shopifyshopify/hydrogen-react’;

export type UseSesamiProps = {

shopId: string;

productId: string;

variantId?: string;

merchandiseId?: string;

quantity?: number;

locale?: string;

buttonCustomizedSettings?: string;

autoAddToCart?: boolean;

skipCart?: boolean;

};

const SCRIPT_SRC = ‘https://cdn.sesami.co/storefront/latest/sesami-main.js’;

export const useSesami = (props: UseSesamiProps, containerId: string) => {

const {linesAdd} = useCart();

useEffect(() => {

// Inject the script if it hasn't been loaded yet

if (!document.querySelector(\`script\[src="${SCRIPT_SRC}"\]\`)) {

  const script = document.createElement('script');

  script.src = SCRIPT_SRC;

  script.async = true;

  document.body.appendChild(script);

}



// Render <sesami-experience> after script is ready

const render = () => {

  const container = document.getElementById(containerId);

  if (!container) return;



  container.innerHTML = '';



  const element = document.createElement('sesami-experience');



  element.setAttribute('shop-id', props.shopId);

  element.setAttribute('product-id', props.productId);

  if (props.variantId) element.setAttribute('variant-id', props.variantId);

  if (props.quantity)

    element.setAttribute('quantity', props.quantity.toString());

  if (props.locale) element.setAttribute('locale', props.locale);

  if (props.buttonCustomizedSettings)

    element.setAttribute(

      'button-customized-settings',

      props.buttonCustomizedSettings,

    );

  if (props.autoAddToCart) element.setAttribute('auto-add-to-cart', '');

  if (props.skipCart) element.setAttribute('skip-cart', '');



  container.appendChild(element);

};



const interval = setInterval(() => {

  if (customElements.get('sesami-experience')) {

    clearInterval(interval);

    render();

  }

}, 100);



// Event handlers



const handleCartAdd = async () => {

  await linesAdd(\[

    {

      merchandiseId: props.merchandiseId,

      quantity: props.quantity ?? 1,

    },

  \]);

  console.log('Product added to cart');

};



const handleCartSkip = () => {

  console.log('skip cart');

};



const handleModalOpened = (e: CustomEvent) => {

  const tagId = e.detail.tagId;

  const hiddenFieldsWrapper = document.getElementById(

    \`sesami-hidden-fields-${tagId}\`,

  );



  if (!hiddenFieldsWrapper) return;



  const sesamiDateInput =

    hiddenFieldsWrapper.querySelector<HTMLInputElement>(

      "\[name='properties\[Date\]'\]",

    );

  if (!sesamiDateInput) return;



  const handleDateChange = (e: Event) => {

    const target = e.target as HTMLInputElement;

    console.log('date changed', target.value);

  };



  sesamiDateInput.addEventListener('change', handleDateChange);

};



// event listeners

window.addEventListener('sesami:cart:add', handleCartAdd);

window.addEventListener('sesami:cart:skip', handleCartSkip);

window.addEventListener(

  'sesami:modal:opened',

  handleModalOpened as EventListener,

);



return () => {

  clearInterval(interval);

  window.removeEventListener('sesami:cart:add', handleCartAdd);

  window.removeEventListener('sesami:cart:skip', handleCartSkip);

  window.removeEventListener(

    'sesami:modal:opened',

    handleModalOpened as EventListener,

  );

};

}, [props, containerId]);

};

i then wrapped the productForm.jsx main div with

and used the useSesami in the AddToCartButton.jsx

useSesami(

{

  shopId: '',

  productId: '',

  variantId: '',

  merchandiseId: '',

  quantity: 1,

  locale: 'en',

  buttonCustomizedSettings:

    '%7B%22width%22%3A%22300px%22%2C%22height%22%3A%2250px%22%2C%22color%22%3A%22%23FFF%22%2C%22color_background%22%3A%22%2314146d%22%2C%22font_size%22%3A18%2C%22border_width%22%3A1%2C%22border_radius%22%3A12%2C%22border_color%22%3A%22%230f0f30%22%2C%22alignment%22%3A%22flex-start%22%7D',

  autoAddToCart: true,

  skipCart: true,

},

'sesami-container',

);

—————————————————————————————————————————————

<CartForm route="/cart" inputs={{lines}} action={CartForm.ACTIONS.LinesAdd}>

     …

      <div id="sesami-container" />

     …

</CartForm>

note : the merchandiseId is for addToCart event , you can remove he event section of useSesami if you wanted and please consider that this snippet is only for testing and you must write your own hook for your own project.

Hi @Mohammad_Dehghani,

I think we may have strayed apart from my main issue. The Sesami Experience works perfectly when booking for short durations like 2 - 4 hours where I am able to select the booking slot. Although I noticed in my integration as of writing this post, Sesami Experience has failed to load despite me not changing anything. Is there an ongoing maintenance going on your side?

My main issue is when trying to book items of multi-day like 36 hours Sesami Experience is unable to detect my resources which was configured to 12AM-12AM as full day available through Sesami Admin (Image below).