Actions32
- Analytics Actions
- Batch Actions
- Customer Actions
- Order Actions
- Product Actions
- Purchase Actions
- Raw Request Actions
- System Actions
- Vendor Actions
- WhatsApp Actions
Analytics → Get Product Leaderboard
AI-generatedSummary
Fetches a ranked list of product sales analytics (quantity sold, revenue, profit, average price) from the VitePOS analytics API for a chosen date range. Sends a GET request to /wp-json/vtpl/v1/analytics/products.
Inputs
- Range — Preset time window: today, yesterday, last 7/30 days, this/last month, this/last year, or custom. Defaults to this_month. Choose 'custom' to use the Date From/Date To filters.
- Period — Grouping period: day, week, month or year (default day). Sent as the 'period' query parameter.
- Analytics Filters — Optional collection of query filters. Category ID, Customer ID and Product ID narrow the data. Date From/Date To (trimmed to YYYY-MM-DD) and Month (e.g. 2026-06) set the dates. Group By sets product or parent grouping. Include Orders and Include Returns are booleans sent as 1/0. Limit sets the row count (default 50). Order Statuses is a comma-separated list such as wc-processing,wc-completed. Sort sets the ranking by profit, revenue, quantity_sold or average_price (default profit). Order is asc or desc.
Output shape
One item per input item. The JSON is the API response, with a human-readable 'response' summary string added at the top. For this operation the summary reads like 'Product analytics returned N product rows for
Filter defaults shown in the UI are only sent if the filter is added to the collection. If the API reports status/success false, the 'response' field holds its error message. With Continue On Fail enabled, failures return {error: message} for that item. If the API response already has a 'response' key, the original is returned under 'raw'. Requires VitePOS Bridge API credentials with a site URL.
Examples
Example 1: Top 10 products by revenue this month
Range=This Month; Analytics Filters: Sort=Revenue, Order=Descending, Limit=10.
Example 2: Last 30 days best sellers by quantity in one category
Range=Last 30 Days; Filters: Category ID=12, Sort=Quantity Sold, Include Returns=true.
Example 3: Custom date range leaderboard
Range=Custom Dates; Filters: Date From=2026-09-01, Date To=2026-09-30, Sort=Profit.