# Inventory

> Work out days of stock per SKU, alert before you run out, and pause ads on Amazon when stock is low.

- Amazon: Reads: yes · Writes: yes

## What you get

Know when to reorder, and stop paying for ads on stock you do not have. The result is a Sheet and a Slack alert with the reorder date for every SKU, and on Amazon a nightly pause and resume of ads.

_To write: the output mock for this recipe: a screenshot or sample of the real result, with numbers blurred_

## The prompt

Paste a prompt into your AI tool. Each one points the tool at the docs and at your key, which stays in `BUILD_API_KEY`.

### Days of stock and reorder

For n8n. Schedule: Every morning at 7.

Prompt for n8n:

```
Read https://build.sellermate.ai/SKILL.md. My key is in BUILD_API_KEY. Every morning, work out days of stock per SKU from my Amazon Seller stock and the last 30 days of orders, write the reorder date to a Google Sheet, and post a Slack message to #reorder for any SKU inside its 35 day lead time.
```

### Stock-out ad protection

For n8n. Schedule: Every night at 2.

Prompt for n8n:

```
Read https://build.sellermate.ai/SKILL.md. My key is in BUILD_API_KEY. Build me an n8n flow that every night checks stock for each SKU with live Amazon Ads, pauses ads when fewer than 5 days of stock are left, resumes them after a restock, and logs every change to the Google Sheet stock-log.
```

> **Amazon only: The change step runs on Amazon accounts only**
>
> It needs a key with the read and write scope. It uses a dry run first, caps, a 24 hour undo and an audit log. See [Writes and guardrails](https://build.sellermate.ai/docs/guides/writes-and-guardrails.md).

_To write: which tool applies the change in this recipe (negatives or an ad pause): the API reference lists update_target, and the negatives tool is not listed yet_

## Steps

1. **Get a key**

   Create a key in the console and save it as `BUILD_API_KEY` in your tool's secrets. See [Get a key](https://build.sellermate.ai/docs/get-started/get-a-key.md).
2. **Paste the prompt**

   Pick the prompt above for your tool and paste it. Change the names in it, such as the channel or the Sheet, to yours.
3. **Run it once**

   Check the first result against your own numbers before you schedule it.
4. **Schedule it**

   Ask your tool to run it on the schedule shown with the prompt.

## Calls it makes

_To write: the sequence of Build calls this recipe makes, with one real request and response in CodeTabs_

## Data used

- [`get_inventory`](https://build.sellermate.ai/docs/api-reference/get-inventory.md)
- [`get_orders_report`](https://build.sellermate.ai/docs/api-reference/get-orders-report.md)

## Variants

Add one of these to the prompt:

- Use 45 days as the lead time.
- Group SKUs that share a parent.
- Alert only on the red ones.
- Leave your top three SKUs alone.
