> ## Documentation Index
> Fetch the complete documentation index at: https://partner-integrations.voyado.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Configuration guide

<Info>
  **BETA Disclaimer**

  This feature is currently in beta and is continuously being improved based on user feedback. While we aim to provide a stable and high-quality experience, you may encounter limitations, incomplete functionality, or unexpected behavior.

  The feature may be updated frequently, which could result in changes to functionality, performance, or user experience. We recommend using this feature with this in mind and avoiding reliance on it for business-critical workflows.

  Your feedback is highly valuable and will help us refine and enhance the feature moving forward.
</Info>

This extension connects an **online store powered by Adobe Commerce (Magento)** with **Voyado Engage**, which is Voyado's customer loyalty and marketing platform. Think of it as a bridge that keeps your webshop and your customer engagement tools in sync. Two major new capabilities have recently been added:

## Back in stock subscriptions

**The problem it solves:** A shopper visits your online store and finds a product they want, but it's currently out of stock. Previously, they'd just leave — and you'd lose that potential sale.

**What it does now:**

* When a product goes out of stock, the system automatically takes note of it behind the scenes.
* Shoppers can **sign up to be notified** when that product comes back. Their request gets sent to Voyado Engage, where it's recorded against their customer profile.
* If the shopper doesn't already exist in Voyado, the system **automatically creates a customer record** for them so nothing falls through the cracks.
* A scheduled job runs every day (by default at 8:15 AM) that checks which previously out-of-stock products now have inventory again.
* When stock arrives, Voyado Engage is notified — and it can then **automatically send an email or message** to all the customers who were waiting for that product.

**In short:** Customers can say "tell me when this is available again," and the system handles the rest — automatically.

***

## Inventory changes

**The problem it solves:** Voyado Engage needs to know how much stock you have for each product so it can make smart decisions — like not promoting a product that's about to sell out, or triggering those "back in stock" notifications at the right time.

**What it does now:**

* The system can **send stock levels from Magento to Voyado**, either one product at a time or **in bulk (batches)** for efficiency.
* The batch capability (the most recent addition from March 2026) means that instead of sending hundreds of individual updates, the store can send them all at once — which is **much faster and more reliable** when you have a large product catalog.

**In short:** Your online store keeps Voyado up to date on what's in stock and what isn't, so marketing campaigns and notifications stay accurate.

***

## **How it all fits together**

The extension is built in **three layers**:

| Layer                            | What it does                                                                                                                                                                         |
| :------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **API layer** (`/api`)           | A PHP library that knows how to talk to Voyado's web services (generated from Voyado's official API specifications).                                                                 |
| **SDK layer** (`/sdk`)           | A friendlier wrapper around the API — it handles things like finding or creating customer records and managing "back in stock" subscriptions.                                        |
| **Magento module** (`/magento2`) | The actual Magento extension that store owners install. It hooks into Magento's product catalog, inventory system, and customer management to trigger all the syncing automatically. |

The extension also handles many other things (syncing orders/receipts, promotions, vouchers, newsletter subscriptions, customer data, etc.), but the **back in stock notifications** and **batch stock level sync** are the headline new features.

## **Prerequisites**

* **Correct version of the extension** -`10.6.0 and higher` or `8.6.0` depending on Adobe Commerce version. *See more details [here](https://partner-integrations.voyado.com/docs/ecom/adobe-commerce/introduction#prerequisites)*.
* **Product feed connected and active** - Your Shopify product feed must be imported into Engage and updating regularly.
* **Back in stock module enabled** - The Back-in-Stock feature must be activated in the Engage tenant.
* **Back in stock email/SMS template ready** - There is at least one template (usually email) that can be used for the notification.
* **All relevant products exist in the feed** - If a product isn’t in the feed, Voyado can’t send Back-in-Stock notifications for it.

<Danger>
  If any of these are missing, it's vital that you fix them first (this is usually done together with your Voyado CSM or implementation team).
</Danger>

## **Configure Back in stock**

<Steps>
  <Step title="Enable back in stock">
    Still in the Magento Admin under **Stores → Configuration → Voyado Engage**:

    **1a.** Scroll to the **Back in stock** section:

    | Field                    | Value  | Notes                                                  |
    | :----------------------- | :----- | :----------------------------------------------------- |
    | **Enable**               | Yes    | Turns on the subscription form and the stock sync      |
    | **Ask for phone number** | Yes/No | Optional — adds phone + SMS consent fields to the form |

    **1b.** Save the configuration.
  </Step>

  <Step title="Configure the out-of-stock product visibility setting">
    This is a **critical** Magento catalog setting that the indexers depend on.

    Navigate to:

    > **Stores → Configuration → Catalog → Inventory → Stock Options**

    Set `Display Out of Stock Products` (`cataloginventory/options/show_out_of_stock`) based on your Magento version:

    | Magento Version      | Setting |
    | :------------------- | :------ |
    | **2.4.6 and lower**  | **No**  |
    | **2.4.7 and higher** | **Yes** |

    <Warning>
      Getting this wrong means the indexers won't correctly detect stock transitions, and the back-in-stock flow will silently fail.
    </Warning>
  </Step>

  <Step title="Set the indexers to 'Update by Schedule'">
    The two Voyado indexers **must** run in scheduled (MView) mode, not "Update on Save". Run:

    ```bash bash theme={null}
    bin/magento indexer:set-mode schedule voyado_backinstock
    bin/magento indexer:set-mode schedule voyado_backinstock_msi
    ```

    Verify they are set correctly:

    ```bash bash theme={null}
    bin/magento indexer:show-mode voyado_backinstock
    bin/magento indexer:show-mode voyado_backinstock_msi
    ```

    Both should report "Update by Schedule".
  </Step>

  <Step title="Verify RabbitMQ and the Message Queue Consumer">
    The extension publishes all Voyado API calls to a RabbitMQ topic called `voyado.api`. A consumer processes them asynchronously.

    * Confirm RabbitMQ is running and Magento is connected to it (check `app/etc/env.php` for the `queue` → `amqp` connection).
    * Ensure the Voyado message queue consumer is running. In production you would typically use `supervisord` or a similar process manager:

    ```bash bash theme={null}
    bin/magento queue:consumers:start voyado.api.consumer
    ```

    <Tip>
      Without the consumer running, subscription messages and stock level updates will pile up in the queue and never reach Voyado Engage.
    </Tip>
  </Step>

  <Step title="Verify the cron job is registered">
    The back-in-stock cron is defined to run **daily at 08:15** server time:

    ```text theme={null}
    voyado/adobe-commerce-extension-copy/magento2/src/etc/crontab.xml
    ```

    ```text theme={null}
    <job instance="Voyado\Magento2\Cron\BackInStock" method="execute"\
         name="voyado_magento2_cron_backinstock">\
        <schedule>15 8 * * *</schedule>\
    </job>
    ```

    Verify your Magento cron is running properly:

    ```bash bash theme={null}
    bin/magento cron:run
    ```

    Check the schedule is registered:

    ```bash bash theme={null}
    bin/magento cron:status
    ```

    <Tip>
      If you need the stock check to run more frequently (e.g., every hour), you can override the cron schedule in your Magento configuration, but the default is once per day.
    </Tip>
  </Step>

  <Step title="Test the complete flow">
    Test the subscription flow:

    1. Go to a product detail page in your storefront.
    2. If the product is in stock and Back in Stock is enabled, you should see a **"Notify me when available"** form with an email field (and optionally phone).
    3. Select a product variant that's out of stock, fill in your email, and click **"Notify me"**.
    4. Confirm the message was queued: check the `queue_message` table in the database or your RabbitMQ management console for a message with event `back_in_stock_subscription`.
    5. Confirm the consumer processed it: check Magento logs (`var/log/`) for Voyado API call records.

    Test the inventory change flow:

    1. Set a product to out-of-stock in the Magento admin (or set quantity to 0).
    2. Wait for the indexer to run (or trigger it manually: `bin/magento indexer:reindex voyado_backinstock voyado_backinstock_msi`).
    3. Verify a record appears in the `voyado_backinstock_index` table.
    4. Set the product back to in-stock (increase quantity).
    5. Either wait for the 08:15 cron, or trigger it manually: `bin/magento cron:run --group=default`.
    6. Verify the record has been removed from `voyado_backinstock_index` (meaning it was processed).
    7. Check logs to confirm a `back_in_stock_update_stock_levels` message was sent to Voyado Engage.
  </Step>
</Steps>
