Hello,
I am trying to create a custom code for Hubspot workflows which calculates the Base ARR. This means that all deals for the associated company has to be look through, and for all deals with a license start date which is a year before the enrolled deal, or less, are to be included in the base ARR Calculation.
As an example it could be that i have created a renewal for 01.07.2024. Then i want to look up all deals associated to the same company with a license start date of max 01.07.2023. Then, for all deals which meets this criteria, i want to add all their recurring revenue and save that in a output variable. The deals included also has to be closed_won == “True”
I have made this work for companies with not that many deals associated, but we also have customers with a very large amount of deals, which results in the workflow reaching the 20 second run limit.
I use Python 3.9 as the language in my coding environment.
@Mahe - I have no idea how complex your Pyton code is but, based on my experience, you are not going to shake HubSpot’s insistence ion the 20s execution limit. It’s claimed to be a function of the AWS Lambda environment, but their execution limits are an order or magnitude higher than HubSpot permits.
So you only options are probably to decompose the code somehow into two or more stages - especially trying to consolidate individual HubSpot API calls into batch operations if possible and storing intermediate results in some way.
Good luck!
Steve
