Breww QL & 'within range' query

Thanks for the question, Steve.

Unfortunately, what you’re trying to achieve isn’t really possible right now, sorry! The limitation is that each of the variables that you can filter on are evaluated independently. For example, number_of_invoiced_orders and average_order_value are both for all orders from this customer ever, and not just for orders that match another part of the filter (i.e. the last_order_date > "X months ago" bit).

Following the BrewwQL expansion request, last_activity_date has been added (this is just for CRM activities, orders are not included in this), but there has been no progress on a total invoice value in a period yet as that’s far, far more complicated (I don’t think Matt realised this in his reply on that other thread, to be honest!). I’ll update that thread too, to avoid any confusion.

We have some plans to further improve the Raw Data Explorer to add grouping (e.g. by customer) and aggregate functions (sums, counts, averages, etc). If you could then filter on the result of an aggregate function, that could get you to the list that you’re looking for. I realise there are a few extra steps to get this into an automatically updating customer list, but it would be a step in the right direction.

I’m not that good with Excel, to be honest, but I believe it would be possible to get the list your looking for by exporting invoice data from the Raw Data Explorer and then grouping by the customer and filtering on the number of invoices orders and last order date in Excel.

1 Like