getEmployeeStats

Retrieve some total figures about employee sales performance. Currently this method only returns information about the currently authenticated user. Calling this method does not require any user rights.

This method returns only one record, with the fields described below.

These figures may be approximate, Erply may use optimizations to return these figures quickly (eg. to cache the calculated values). For authoritative sales data, see API call getSalesReport.

Unfortunately, timeclock records are not available over the API yet.

This call has been built for Berlin POS, and might not be useful for other use cases.

Input parameters

Parameter name Description Possible value Required
getPricesWithTax By default the api will return the prices without tax or with tax based on the account country. This parameter can be used to force the api to return either on demand skipping the country based logic. Do not pass the parameter for default logic. 0 - without tax, 1 - with tax

Response

Field name Type Description
totalSalesThisMonth number Cumulative sales for this employee this month. (Total sales = sum of all invoices created by this employee. Advanced commission sharing options — sharing one invoice between multiple people, associating an invoice line with a particular attendant — are ignored). The figure is net total or total with VAT, depending on the region.
totalSalesThisWeek number Cumulative sales this week. Uses locale-specific beginning of week (Sunday or Monday).
totalSalesYesterday number
totalSalesToday number
timeWorkedThisMonth number Employee's cumulative work time according to timeclock, in hours
timeWorkedThisWeek Decimal
timeWorkedYesterday Decimal
timeWorkedToday Decimal
lastClockInUnixTime integer Unix timestamp. Last clock-in time. This allows the API client to calculate today's worked hours in real time. If this user is not currently clocked in, the value is 0.