One web page per client. It shows spend, sales, ACoS and orders for the last 30 days, a daily chart, and the ten biggest campaigns and products. It sits behind a private link. ACoS is ad spend divided by ad sales.
You do not write the code. Claude, Cursor or ChatGPT writes it from the prompt below. You supply a key, a client account and a place to host it.
What you need
- A Build account at build.sellermate.ai with the client's account connected in the console.
- An AI assistant: Claude, Cursor or ChatGPT.
- A host for a small web app. Vercel is simple and has a free tier. Anything that runs server code works.
How it works
The browser never talks to Build. The page asks your own server, and your server calls Build with the key. A key in browser code is visible to anyone, so it stays on the server.
The server also caches each result for an hour. Ten visitors cost one set of requests, not ten.
Steps
- Create a read-only API key. Open the Build console, go to API keys and create a key with read access only. Keys look like
sm_live_.... The key is shown once, so copy it now. - Store it as a secret. Save it as
BUILD_API_KEYin your host's environment settings. Do not put it in the code. - Paste the prompt below into your assistant.
- Read what it builds. It should have one server route that calls Build, and one page that draws the result. The key should appear only in the server route.
- Run it locally and check the numbers (next section).
- Deploy it and set the same secret on the host.
The prompt
Read the API docs at https://www.sellermate.ai/api-docs first.
Build a small Next.js app that shows a private Amazon ads dashboard
for one client.
Rules:
- Base URL is https://api.sellermate.ai/public/v1. Every tool is
POST /tools/{name} with a JSON body and an X-API-Key header.
- Read the key from BUILD_API_KEY on the server only. Never send it to
the browser, never log it.
- Call get_user_context first and use the account it returns.
- Fetch on the server, in a route handler. The page calls that route.
- Show four numbers for the last 30 full days: spend, sales, ACoS and
orders. Use get_marketplace_summary.
- Show a daily chart of spend and sales for the same 30 days.
- Show a top-ten table of campaigns by spend, using
get_campaign_performance, and a top-ten table of products by spend,
using get_advertised_product_performance. Both need
amazon_account_id, start_date and end_date. Use sort_field,
sort_direction and page_size. If you need more rows, keep going while
pagination.hasMore is true.
- Cache each result on the server for one hour.
- On a 429 response, wait for the Retry-After header and retry once.
- If a call fails, show the last good data and an "updated at" time.
- Protect the page with a secret in the link (see below).
- Plain layout, readable on a phone.
- Include a README with the environment variables and the deploy steps.
Check it
Run the app locally. Pick the same 30 days in the Build console or in Seller Central. Spend, sales and orders should match.
If they do not, the date range is almost always the cause. Tell the assistant the exact first and last day and the time zone, then run it again.
Then check one campaign row and one product row the same way.
A few messages mean something specific:
401: the key is wrong or revoked.403: the key cannot see that account.429: too many requests. The limit is 60 a minute on Free and Build, and 300 on Scale. Caching keeps you far below it.
Keep it private
This page shows a client's numbers. Treat it that way.
- The key stays on the server. Open the page in a browser, view the source and search for
sm_live. It should not be there. Check the network tab too. - Use an unguessable link. Give each client a path with a long random token, such as
/c/k7Qm2x9.... Ask the assistant to return a 404 for any other path. One token per client, so you can rotate one without affecting the rest. - Or add a simple password. Ask the assistant to add one shared password per client with a login form and a cookie.
- Block search engines. Add a
noindextag.
A link can be forwarded. If that matters for a client, use the password.
Watch out for
- Recent days move. Amazon keeps adding sales to a click for several days, so the last two or three days can rise after you first see them. Label them or leave them out.
- Retention depends on your plan: 90 days on Free, 12 months on Build, 3 years on Scale. A 30-day view works on all of them.
- Check one client fully before you send links to the rest.