Using GroupBys
Now that you are familiar with product metrics and calculated columns and how they are divided into categories, we can discuss how GroupBys
are used to group data together. In our Insights dashboards almost all of the table views are grouped by DealerAssociateUUID
. This combines all the metrics in every category for each associate. We can also group by DealerUUID
which will combine all the metrics in every category for each dealer (if you have access to multiple dealers). We do that in our Insights Group View. Here is a list of all the currently possible GroupBy
values that you can pass to our Dealer Stats API:
- DealerUUID
- Dealer
- DealerName
- DealerAssociate
- DealerAssociateUUID
- UserName
- RoleName
- Department
- OrderType
- Monthyear_Date
- Date
- ApptCreateCategory
- Brand
- RoVolume
- AssociateDMSID
In our previous example we saw the following API result for OnlinePaymentsIndex
, OnlinePayments
, and PaidROs
metrics:
Categories | Product Metrics | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
Date | DealerUUID | DealerAssociateUUID | Department | OrderType | Brand | PayType | CPAmountRange | OnlinePaymentIndex | OnlinePayments | PaidROs |
01/01/2023 | Dealer1 | User1 | Service | RO | BMW | Customer | 1001-2000 | 50 | 5 | 10 |
01/01/2023 | Dealer1 | User1 | Service | RO | MINI | Customer | 1-1000 | 100 | 1 | 1 |
01/01/2023 | Dealer1 | User2 | Service | RO | BMW | Customer,Warranty | 2001-3000 | 0 | 0 | 1 |
Since our data is divided by many categories it is almost always necessary to group by at least one category or column. In this case if we wanted the total OnlinePaymentsIndex
for User1
we could simply GroupBy
the DealerAssociateUUID
category. You will get a result like this:
Categories | Product Metrics | ||||
---|---|---|---|---|---|
Date | DealerUUID | DealerAssociateUUID | OnlinePaymentIndex | OnlinePayments | PaidROs |
01/01/2023 | Dealer1 | User1 | 55 | 6 | 11 |
01/01/2023 | Dealer1 | User2 | 0 | 0 | 1 |
You can see that the two records for User1
were grouped together which gave them 11
total PaidROs
, 6
total OnlinePayments
, which equals to rounded OnlinePaymentIndex
total of 55%
. This would be the total for all departments, all order types, all brands, and all pay types and CP values because we didn't provide any filters in our example. If we were to provide a Brand
filter for BMW
in this example, and include our DealerAssociateUUID
group by value, we would get 50%
for the OnlinePaymentIndex
.
In our next section we will cover how to make the Dealer Stats API request.