Skip to main content

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:

CategoriesProduct Metrics
DateDealerUUIDDealerAssociateUUIDDepartmentOrderTypeBrandPayTypeCPAmountRangeOnlinePaymentIndexOnlinePaymentsPaidROs
01/01/2023Dealer1User1ServiceROBMWCustomer1001-200050510
01/01/2023Dealer1User1ServiceROMINICustomer1-100010011
01/01/2023Dealer1User2ServiceROBMWCustomer,Warranty2001-3000001

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:

CategoriesProduct Metrics
DateDealerUUIDDealerAssociateUUIDOnlinePaymentIndexOnlinePaymentsPaidROs
01/01/2023Dealer1User155611
01/01/2023Dealer1User2001

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.