> ## Documentation Index
> Fetch the complete documentation index at: https://help.maestra.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Viewed Product Is Back in Stock Flow

Send a campaign to a customer when a product they recently viewed becomes available again. This flow brings shoppers back to items they showed real intent on, right at the moment those items are buyable.

## Before you start

Before you build the flow itself, prepare the campaign you want to send when the trigger fires.

**1. Create an automated campaign**

Create an automated campaign in the channel you plan to use: email, SMS, Viber, mobile push, or web push.

**2. Insert the viewed product**

Use the `ProductView` parameter to render the viewed product inside the campaign, or build the content in the new editor, which lets you pull in the product without configuring parameters manually.

> [!TIP]
>
> You can also add a block of related items or personalized recommendations so the customer has something to fall back on if the original product is no longer the best fit.

## How the trigger works

The flow launches on the **Viewed Product Changed — Product Returned to Availability** event.

> [!NOTE]
>
> * The trigger fires **every time** a product transitions from out of stock back to in stock. If a product cycles in and out of availability, each return to stock can trigger the flow again.
> * The trigger fires **per product**. If several products that a customer viewed come back in stock at the same time, the flow runs separately for each one.

Because of this behavior, you should add frequency caps and delays so a single customer does not receive a burst of messages at once.

## Build the flow

**1. Add the trigger**

Set the flow to start on the **Viewed Product Changed — Product Returned to Availability** event. Apply a per-customer frequency cap so the customer cannot enter the flow multiple times in parallel.

**2. Restrict send times**

Add a condition that prevents the campaign from going out at night. If you run other product-availability campaigns in parallel, add a delay so this flow does not collide with them.

**3. Validate the product view and stock**

Add filters that confirm:

* The product view happened recently (so you don't message customers about something they looked at months ago).
* The product is currently in stock at the moment the campaign is about to send.

**4. Check subscription and contact data**

Confirm the customer still has an active subscription for the channel you're using and that you have valid contact information (email address, phone number, push token, etc.) for that channel.

**5. Send the campaign**

Send the prepared campaign. Optionally include related products or personalized recommendations alongside the viewed product.

## Notes on cost and pacing

> [!WARNING]
>
> Because the trigger fires per product and on every return to stock, an unfiltered flow can generate a large volume of sends. Use the recency filter on the product view, the stock check, the nighttime restriction, and the per-customer frequency cap together to keep volume reasonable and to protect customer experience. Sending costs are billed in \$ based on your channel pricing.

## Recap

A well-built "Viewed Product Is Back in Stock" flow includes:

* An automated campaign prepared in your chosen channel with the viewed product rendered inside it.
* The **Viewed Product Changed — Product Returned to Availability** trigger with a per-customer frequency cap.
* A nighttime restriction and a delay to coordinate with other availability flows.
* Filters confirming a recent product view and current stock.
* A subscription and contact-data check for the channel.
* The send step, optionally enriched with related products or recommendations.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.