get_promotion_roi
Calculates the return on investment (ROI) of promotional activities by matching promotion data with order sales within a specified date range.
Instructions
交叉比對促銷活動與銷售數據,計算各活動的 ROI。
【用途】取得指定時間區間內活躍的促銷活動,並比對訂單中的 promotion_items, 統計每個活動帶來的訂單數、營業額、折扣金額,計算平均每單折扣與折扣占比。 【呼叫的 Shopline API】
GET /v1/promotions(促銷活動列表)
GET /v1/orders/search(訂單查詢) 【回傳結構】dict 含 period、total_promotions、promotions(各活動 ROI 明細)。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| start_date | Yes | 起始日期 YYYY-MM-DD | |
| end_date | Yes | 結束日期 YYYY-MM-DD |