How to Calculate Average Order Frequency

We’re looking to have a custom contact property that shows the average order frequency. We’d like to see this so we can get flagged if someone hasn’t ordered as usual and needs to be reached out to. Any thoughts on how to create a calculation property in order to do so?
I reached out to HubSpot support and they noted there isn’t any easy solution, and recommended reaching out here as there might be a more complex solution.

Hi @candiceann,

Thanks for reaching out to the Community!

This is an excellent question!

Let’s bring in some of our experts to this conversation and see if they’ve built something similar or if they have any advice to share!

Hi @Lucila-Andimol, @JuanGomez0818, @LautaroDelPlato, @Gilempert, happy Tuesday :slightly_smiling_face: Any thoughts on this question? Any advice for @candiceann?

Thanks! :orange_heart:

Diana

Hi @candiceann

I think you can achieve this but not with 1 calculated property but various and workflows.

Depending on the exact use case it depends on what to do exactly.

A more easy approach is to calculate all of this with a custom coded action with Operations Hub.

Hope this helps

Hey @candiceann ,

I’ve asked a similar question recently: “Calculate deals count over a given period of time” : https://community.hubspot.com/t5/Tips-Tricks-Best-Practices/Calculate-deals-count-over-a-given-period-of-time/td-p/1048538

I had the following goal:

- Calculate deal count for the first quarter of the year

- Calculate deal count for the second quarter of the year

- Identify contact (create a list) that have a lower deal count for the second period of time (second quarter < first quarter)

Here is what was done in the end (which worked perfectly, but requires Operation Hub Pro):

  1. Create a boolean property at deal level : Purchased between the last 12 and 6 months.
  2. Create a boolean property at deal level : Purchased in the last 6 months.
  3. Setup a daily workflow that will verify time range deal has been created.
  4. Create custom rollup property (for me, at contact level) for each Time range I want to calculate the count. Property label is, for example “Last 6 months deal count”.
    1. So, one rollup property at contact level with Sum Rollup type. Select deal as associated record and Purchased between the last 12 and 6 months as property.
    2. Create another rollup property for Purchased in the last 6 months
  5. Create the final custom calculation property (comparing previous 2 calculation property) that will determine if deal count is decresing over time for a contact.
    • if(([properties.nombre_de_transaction_6_derniers_mois] < [properties.nombre_de_transaction_entre_12_et_6_derniers_mois]), true, false)

Hope it helps, let me know if you are blocked at any step!

Does this only calculate for new contacts going forward then?

Hi @TNiakan,
Thank you for posting to the Community! Tagging in our Top Contributor to see if they are able to answer this one.
Hi @Lucila-Andimol, do you happen to know if your Accepted Solution only calculates for contacts moving forward?
Thank you!
Cassie, Community Manager

Hi @chighsmith and @TNiakan

Yes, a custom coded action would work in any scenario defined

as it is a custom solution instructed to work they way needed.

If going for the Calculated properties approach

it could also work for any existing contact,

again, depending on the definitions made for the properties

but it usually calculates for all existing records.

Hey @TNiakan ,

This solution works as long as you have deals associated with your contacts. It works for both already existing and new contacts!