Using BrewwQL for customer calls

I’m playing with BrewwQL so that we can drop some of the customer calling spreadsheets we use. Is it possible to do the following?

Create a custom field with a multiple choice, that can then be used as a variable to apply to another query? As an example:

Custom field named ‘order_frequency’ contains choice of: “7 days ago”, “14 days ago” or “21 days ago”

BrewwQL: last_order_date > order_frequency

I want it to return a result based on how often that specific customer likes to order, so we know when to call them.

Secondly…is there a way to customise which fields are displayed in the returned results, rather than just those showing? I can then add a custom field and sort by a call time.

OR/AND

Can I Sort within BrewwQL?

I understand that I may just be getting carried away with Breww, but 1 month in, and it has become a really useful tool and I want to get the most out of it. I’m also planning on it replacing me within 6 months so I can focus on more fun stuff.

Hi Phil,

Thanks for raising this on the community! It’s great to hear you’re getting so much out of Breww after just a month.

There are a few layers to your question, so let’s break them down in order:

1. Comparing Variables & Custom Fields

On your first point, BrewwQL currently doesn’t support comparing one variable to another. In other words, you can’t filter to show records where one field is greater than, less than, or equal to another dynamic field.

The second consideration here is data types. You can certainly create a custom dropdown field with options like “7 days ago” or “14 days ago”, but these are stored as text values. You’d be trying to compare a date (last_order_date) to a text string, which unfortunately won’t compute.

2. Customising Displayed Fields

At the moment, you can’t change which fields are displayed on the customer results page; these columns are preset.

3. Sorting within BrewwQL

BrewwQL is strictly a filtering tool, so it can’t currently be used to sort the on-screen list.

An Alternative Approach

All that said, there is still a way to get very close to what you’re looking for! Instead of using a custom field for their frequency, you could leverage the system’s built-in averages. For example, you could use a query like this:

last_order_date <= "7 days ago" and average_days_between_orders <= "7"

This would show all customers whose last order date was more than 7 days ago, but whose average days between orders is 7 or fewer. You could then save this query, and create separate ones for 14 days, 21 days, etc., depending on how you want to segment your daily call lists.

I hope that helps you get even more out of BrewwQL and drop those spreadsheets. I’m really glad to hear you’ve found the system useful so far, and if Breww has completely replaced you in 6 months, you’re very welcome to come back and write a case study for us! :joy: