slam_products_for_collection
Retrieve products from a Shopify collection with sales metrics including variant count, orders, units sold, and revenue. Sort and filter results to analyze collection performance.
Instructions
Returns all products in a collection, each enriched with variant count and sales metrics (order_count, units_sold, total_revenue) from the product_sales view. Products with no sales show zeros.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"collection_id": "<collection_id>"
},
"name": "slam_products_for_collection"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| collection_id | Yes | The collection ID (Shopify GID) | |
| sort_by | No | Column to sort by: title, vendor, total_revenue, or units_sold | title |
| sort_order | No | Sort direction (default ASC) | ASC |
| limit | No | Max rows to return (1–100, default 25) | |
| offset | No | Number of rows to skip |