When it comes to B2B business, there are complex and endless tasks that you would need to manage, especially if you have a lot of contacts. A CRM can make it much easier to handle. But at times, you might need a hand with the CRM to make full use of the system. 

Time Doctor was a client that came to us with the objective of sending emails to the customer's ‘Admin' about the recent changes in the paid seats of their subscription plan. All the data was stored in the company properties as the client's target audience was also businesses.

HubSpot Workflow is something that can help businesses nurture leads, manage sales pipeline, and do marketing automation easily. You can checkout this blog on hubspot workflow examples to know more. 

Let us see how webdew's HubSpot team identified the problem and provided a solution on how to leverage HubSpot Custom Coded Workflows. 

Problem Statement

The requirement of the client was quite complex. This was because of the way the data was stored in their HubSpot CRM. The client had over 12 lakh contacts. As the client was an old HubSpot user, the ‘Association Labels' concept was new to them. 

The client had marked their contacts as ‘Admins,' and the requirement of sending out an email to these admins was a big concern. Marketing the ‘Admins' from such a big record set seemed quite not possible.

That was not all. They had a requirement that if there was a decline in seats (5 or more than 5), an internal notification would be sent to whoever made a sudden decline. Also, they wanted to send out an automated email. So, to calculate and trigger a notification was altogether another task. 

Solution: Custom Coded Workflows

Our HubSpot experts identified the problem and were clear on the requirements. They had no doubts regarding the solution being custom-coded workflows. 

Firstly we calculated the drop in seats from the current value and the old existing value that is stored in the company properties. If the drop is more than 5 then we were required to send out the email to the Admin that is associated with that company along with all the other users (ranging from 2 – 1000).

Here is how we went about it step-by-step:

  • Step 1: We created contact based workflows. This was because even though all the information about the drop-in seats is stored in the Company Properties, we had to send out the emails only to specific contacts. 
  • The workflow needed re-enrollment, and for that reason, we had to have contact based properties. This is because only then will re-enrollment work for the same object properties in which the workflow is created.
  • Step 2: The next step was creating all the properties (company properties) that we needed to use. This was because enrollment triggers into the Contact's Properties and it could also put in re-enrollment triggers.
  • Step 3: After creating the properties, we created workflows to copy the necessary company information into their associated contacts properties. 
  • Step 4: In this step was the main challenge of creating custom code that could fetch the current and last value, that too from cross-object property (company property), and then compare it. Lastly, if the difference exceeds some specific value, it needs to be branched to one of the if/then branches. We created a custom code according to the requirements and branched the contacts into YES and NO branches.
  • Step 5: After the contact goes to the YES branch, there's another if/else branch. This was so to re-check that the contact enrolled is the ‘Admin.' Post this, an external email is sent to the record. 

On the contrary, if the contact goes to the NO branch, it means either there is no drop or the drop is less than 5. In this case, nothing happens.

Wrapping Up

The client was quite satisfied with the services. At times, when there are quite a large number of contacts to manage, aligning the CRM might need assistance. Such was the case here. 

With the rise in SaaS businesses, the effectiveness of growth can be said to be dependent on the efficiency of the CRM.

Get a free consultation with our HubSpot professionals and find out how you can make the most out of HubSpot CRM to level up your marketing and sales.

Contact us to know more about leveraging HubSpot workflows from our dedicated HubSpot team.

                                                                                                                           Editor: Amrutha

Frequently Asked Questions

Yes, you can add your own code to a HubSpot landing page. To do this, go to the specific landing page you want to edit. Then, click on the “Settings” tab for that page. In the advanced options section, you'll find a spot to paste your custom code into the “Head HTML” box. Once you've added the code, save your changes and publish the page. This way, you can customize and enhance your landing pages with your own code to meet your unique needs.

Custom code in HubSpot (available in Operations Hub Professional and Enterprise versions) empowers users to write and run JavaScript within their workflows. This feature enhances workflow capabilities both inside and outside of HubSpot. It creates custom actions, facilitating unique and tailored automation that meets specific business needs. Custom code actions provide a versatile solution for businesses seeking to expand the functionality of their HubSpot workflows by leveraging the power of JavaScript, making it a valuable tool for advanced automation and customization.

In HubSpot, when you use custom code within your workflows, there are certain limits to keep in mind. These custom code actions need to complete their tasks within 20 seconds, and they can't use more than 128 megabytes (MB) of memory. Going beyond these limits will lead to errors in the process. So, it's essential to work within these boundaries when implementing custom code in HubSpot workflows to ensure they run smoothly and without issues.

HubSpot custom properties are like special boxes where you keep different information. They help you organize details about things, like where a company is based. HubSpot already provides some default boxes for you, but you can also make your own custom boxes for specific, unique information that matters to your business. These custom properties are like personalized labels that help you sort and store the specific details you need to track for your company's growth and success.