> ## Documentation Index
> Fetch the complete documentation index at: https://codebeans-cb-notifylyst.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Find restock opportunities

> Waiting-list demand joined to live Shopify inventory — what to notify now, what to restock.

The example to try first. It needs two lookups joined — what people are waiting for, and what is
actually in stock right now — which is exactly the thing a dashboard cannot do for you.

**Saved prompt:** `find_best_opportunities`

## The prompt

```text You theme={"system"}
Which products are people waiting for that I already have stock of somewhere?
Tell me which to notify first.
```

![Screenshot to add — images/c1a-prompt.png: the prompt typed into the chat, with the agent beginning to work on it.](https://mintcdn.com/codebeans-cb-notifylyst/9nOO5K-JDyu4jS3x/images/c1a-prompt.png?fit=max\&auto=format\&n=9nOO5K-JDyu4jS3x\&q=85\&s=f65d8203797bd8f41643656cb7067566)

## What the AI does

1. Calls `get_analytics` with the `most_wanted` report for the variants with the most demand.
2. Takes the top variants and calls `shopify_product_lookup` with inventory included, reading
   live stock per location straight from Shopify.
3. Compares the two:
   * **Long queue + stock available somewhere** → revenue sitting still. Notify these now.
   * **Long queue + no stock anywhere** → your restock list, ranked by demand.

![Screenshot to add — images/c1b-tool-calls.png: the two tool calls in sequence — get\_analytics for most\_wanted, then shopify\_product\_lookup with live inventory.](https://mintcdn.com/codebeans-cb-notifylyst/9nOO5K-JDyu4jS3x/images/c1b-tool-calls.png?fit=max\&auto=format\&n=9nOO5K-JDyu4jS3x\&q=85\&s=1a1e2af45c5a02eff74341f52dd03dd9)

![Screenshot to add — images/c1c-result.png: the finished answer: a ranked list of variants to notify now versus restock.](https://mintcdn.com/codebeans-cb-notifylyst/9nOO5K-JDyu4jS3x/images/c1c-result.png?fit=max\&auto=format\&n=9nOO5K-JDyu4jS3x\&q=85\&s=fa2de98a887832df066ff7eeeeebd85f)

## Why it beats the report page

The waiting-list report knows demand but not current stock. The Shopify inventory screen knows
stock but not who's waiting. Joining them by hand means two tabs and a spreadsheet; here it's one
question, and the ranking comes with it.

## Good follow-ups

Stay in the same chat — the agent already has the context:

```
Who exactly is waiting for that variant?
```

→ `get_entity_details` returns that variant's sign-ups (up to 100).

```
Send me a test alert for it so I can see what the customer gets.
```

→ `send_test_notification`, if your token allows change tools. It sends a real message and uses
your allowance, and it only goes to your store's own addresses. The AI previews it first and sends
only after you confirm.

```
Export the sign-ups from the last 30 days as a CSV.
```

→ `export_analytics_csv` returns a download link, valid for 24 hours. The most-wanted list itself
can't be exported through the connector — download it from the app's **Analytics** page.

## Related

* [All 16 tools](https://codebeans-cb-notifylyst.mintlify.site/mcp/reference/tools.md) — which `get_analytics` reports are available
* [Weekly recovery briefing](https://codebeans-cb-notifylyst.mintlify.site/mcp/examples/weekly-briefing.md) — the recurring version of this habit


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