What you need
Data sources
- POS database — Transaction line items with SKU, quantity, revenue, cost of goods sold, and date
- Returns database — Return records with SKU, quantity returned, return reason, and date
- Inventory management system — Current stock on hand, days since last sale, and receiving dates
Knowledge spaces
- Merchandising guidelines — Category assortment rules, minimum margin thresholds, and seasonal planning calendars
- Markdown policies — Rules for when to markdown, clearance timing, and minimum margin floors
| Component | Name | Definition |
|---|---|---|
| Object | SKU | Maps to the POS item master. Represents a product with its full sales, returns, and inventory history |
| Metric | ContributionMargin | Revenue minus cost of goods sold minus returns value, per SKU over the period |
| Metric | ReturnRate | Units returned divided by units sold, expressed as a percentage |
| Dimension | PerformanceTier | Categorization: top 10% (best seller), middle 80% (core), bottom 10% (underperformer) |
| Dimension | Category | Product categorization: apparel, electronics, home goods, grocery, seasonal |
Agent setup
Create the agent
Go to Agent Space → New agent.
| Field | Value |
|---|---|
| Name | Merchandising Assistant |
| Role | Product performance analyst |
| Goal | Identify top-performing and underperforming products to optimize the assortment |
Set the description
You analyze product performance across channels. Compare sales, margins, and return rates by category, brand, and SKU. Present findings as ranked lists with clear metrics. When recommending assortment changes, back them with data: what to keep, what to drop, and what to test. Use a neutral, analytical tone. Never recommend discontinuing a product without showing the supporting data.
Scope data access
Grant access to:
- POS database (transactions, line items)
- Returns database (return records)
- Inventory management system (stock levels)
- Merchandising guidelines knowledge space
- Markdown policies knowledge space
SKUobject,ContributionMarginandReturnRatemetrics,PerformanceTierandCategorydimensions
Add skills
Rank product performance
Rank product performance
Trigger: User asks about product performance or weekly review
- Pull sales, cost, and return data for the requested category or time period from the POS and returns databases.
- Calculate contribution margin for each SKU: revenue minus COGS minus returns value.
- Rank SKUs by contribution margin in descending order.
- Assign performance tiers: top 10% as best sellers, bottom 10% as underperformers, middle 80% as core.
- For underperformers, enrich with: units sold, return rate, days since last sale, current stock on hand, and carrying cost.
- Recommend an action for each underperformer: keep (if seasonal uptick expected), markdown (if stock is high), discontinue (if return rate is high and sales are declining), or investigate (if data is inconclusive).
Category gap analysis
Category gap analysis
Trigger: User asks about assortment gaps or buying planning
- Pull the full SKU list for the requested category with sales velocity and margin data.
- Identify price point gaps: ranges where competitors have products but you do not (based on merchandising guidelines).
- Identify feature gaps: attributes present in top sellers but missing from underperformers.
- Calculate the revenue opportunity for each gap based on the average performance of adjacent SKUs.
- Present a prioritized list of gaps with estimated revenue opportunity and recommended product attributes.
Automation
Playbook: Weekly product performance digest
Build the workflow
- Query the POS database for sales and return data from the previous 7 days across all categories.
- Loop through each product category:
- Calculate contribution margin and return rate for every SKU.
- Rank and assign performance tiers.
- Identify any SKU that moved between tiers compared to the prior week.
- Condition: If any SKU in the bottom 10% has more than 30 days of stock on hand, flag it for markdown review.
- Aggregate into a category-by-category summary with movement highlights (new best sellers, new underperformers).
Configure delivery
Send an email to the merchandising and buying teams with the subject line: “Weekly product performance — [date]”. Highlight tier changes at the top. Include the full ranked list per category as an attachment.
What’s next
Price elasticity monitoring
Understand how price changes affect demand so your assortment and pricing strategies work together.
All retail use cases
See the full list.

