Sales Statistics
You frequently need to find out how you are doing in terms of sales performance. For this purpose, it is useful to report on sales statistics.
To get sales statistics, you build a query object with key parameters such as the start date of the period you wish to report on and the end date, as well as which statuses you want (e.g. completed sales only). The Sales Manager component then retrieves the information you need. Other query parameters that you can retrieve include:
- MIN - amount of the smallest sale
- MAX - amount of the largest sale
- Turnover
- Transaction Counts
The sample code illustrates how to retrieve completed purchases because this is probably what you want to see most, but of course you can retrieve whatever data you need. In the iOS code, the saleStatistics
object has the results of the query. In the Android code, the salesStatistics
has the results.
Tip
The Java code uses the term withFields
while the Objective-C code uses the term query
.
The Sample Code