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.
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 |