Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • getsimio.com
English (US)
US English (US)
FR French
  • Home

Edit Shopify Theme

Written by etienne.dubujet

Updated at September 18th, 2025

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Introduction
  • Account configuration
    Set up your WhatsApp account Synchronize your apps
  • Collect opt-ins
    General Collect with Shopify Collect with Klaviyo Collect with Meta ads
  • Create automations
    General Create automations with Shopify Create automations with Klaviyo Create automations with Splio
  • Create campaigns
  • Learn more
+ More
  1. Go to the Shopify theme

  1. Find the file of a product page
  2. Add the code to collect the number
<input
  class=""
  type="text"
  id="phone-number"
  name="phone-number"
  placeholder="Phone number"
>
<button
  type="button"
  id="whatsapp-button"
  style="display:block;width:100%;font-size:16px;font-weight:700;margin-top:10px;line-height:21px;"
  class="bttn"
  disabled
>
  Notify me on WhatsApp
</button>

4. Then add the code that passes this information to Simio

<!-- SIMIO BACK IN STOCK -->
<script>
    const phoneNumberInput = document.getElementById('phone-number');
    const whatsappButton = document.getElementById('whatsapp-button');

    function handleWhatsAppAlert() {
        whatsappButton.disabled = true;
        whatsappButton.textContent = 'Subscription in progress...';

        const phoneNumber = phoneNumberInput.value.trim();
        const customerId = "{{ask support}}";

        if (phoneNumber.length > 8) {
          whatsappButton.disabled = true;
          whatsappButton.textContent = 'Subscription in progress...';

          fetch('https://app.getsimio.com/backinstock/subscribe', {
              method: 'POST',
              headers: {
                  'Content-Type': 'application/json'
              },
              body: JSON.stringify({
                  phoneNumber: phoneNumber,
                  customerId: customerId,
                  variantId: {{ product.selected_or_first_available_variant.id }},
              })
          })
          .then(response => {
              if (response.ok) {
                  return response.text();
              }
              throw new Error('Error during query.');
          })
          .then(data => {
              whatsappButton.textContent = "Understood, we will notify you as soon as it is back in stock!";
          })
          .catch(error => {
              console.error(error);
              whatsappButton.textContent = "An error occurred";
          });
      }
  }

    phoneNumberInput.addEventListener('input', function() {
        if (phoneNumberInput.value.trim().length > 8) {
            whatsappButton.textContent = "Notify me on WhatsApp";
            whatsappButton.removeAttribute('disabled');
        } else {
            whatsappButton.setAttribute('disabled', 'true');
        }
    });

    whatsappButton.addEventListener('click', handleWhatsAppAlert);
</script>

<!-- --------- -->

 

5. Adjust the style to your site

 

Was this article helpful?

Yes
No
Give feedback about this article

Related Articles

  • 📐 Format and dimensions on WhatsApp
  • Frequently asked questions (FAQ)
  • Frequently asked questions (FAQ)
  • 📯 [META] Collect opt-ins with a Click-to-WhatsApp ad
  • Contact Simio

© 2025 SIMIO Logo Simio by Alcmeon Logo Alcmeon

WhatsApp LinkedIn
Expand