Product trends
get_product_trendsHow product sales moved through the period, in buckets (grain day, week or month by the period's length; buckets[i].complete false = a part bucket, don't read it as a drop): revenue (before returns, so never call it net sales), units and orders per bucket for the whole catalogue, revenue per bucket for the top products (titles), and lifecycle stages (launch, growth, maturity, decline) with how many products and how much revenue sit in each. repeatBuyers lists per product how many identified customers bought it and how many bought it again (2+ orders of it). Use for 'which products are growing or declining', 'is product X picking up', 'which products bring customers back'. Optional from and to (inclusive YYYY-MM-DD, both or neither, never after today) read another span instead of the default period. A named month, a week or two dates the operator gave MUST be sent here: without them this reads the last 30 days, which is not that month.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Last day of the span, inclusive, as YYYY-MM-DD; not after today. Send together with `from`, or omit both to read the default 30-day period. | |
| from | No | First day of the span, inclusive, as YYYY-MM-DD. Send together with `to`, or omit both to read the default 30-day period. |