APIs & Integrations

jgalloway
Participant

Manually enrolling deal in workflow or sending internal email from API

Hello,

I'm working on an internal CRM extension. We have a couple workflows that trigger an internal email when certain deal properties are set. We'd like to instead trigger this email via a more explicit CRM extension action/webhook to more easily support repeat enrollments (any given deal should be able to trigger the workflow/email as many times as a user wants). Given the repeatability requirement using property triggers doesn't really fit unless I manually toggle the trigger property back and forth which seems.. hacky.

 

So I started at looking at ways to either a) trigger the internal email directly in Hubspot or b) enroll the deal in the the workflow via the Hubspot API.

 

From the API documentation it looks like neither of these operations are supported? Has anyone done anything similar? I don't think using a marketing email is super viable since I'd have to manage all the recipients and deal properties which is probably a hassle.

 

Am I missing any other feature in Hubspot analogous to the workflow internal email UI/feature? The ability to easily set recipients and build a template with the deal properties is exactly what we need but if we can't trigger the workflow/email via the API we're kind of stuck. 

 

 

0 Upvotes
5 Replies 5
WendyGoh
HubSpot Employee
HubSpot Employee

Manually enrolling deal in workflow or sending internal email from API

Hey @jgalloway,

 

You're spot on. Currently, there isn't a way to enroll deal in a deal based workflow via API.

 

While I have yet come across similar use cases, it is possible to send email via API and for this, you may want to explore more here: Transactional Email Overview.

 

Additionally, could you share a little deeper on your team use case? Such as, when will your team enroll a deal into the workflow? E.g. deal amount change? deal stage change? 

 

 

jgalloway
Participant

Manually enrolling deal in workflow or sending internal email from API

Hi @WendyGoh, thanks for the sanity check.

 

I did briefly look at the transactional email support within Hubspot but it didn't seem to scratch the itch. If I have to manage recipients and template data I'm 90% to just sending it out from our own email infrastructure. Obvious downside to this is the lack of easy templating, which is the main reason firing off the internal email inside the workflow would be perfect.

 

I'm happy to share more about our use case. We're an engineering services business so our deals closed as won map to projects. A significant portion of these projects are on a time and material basis, essentially contracting. One of our primary goals for Hubspot is to streamline document management for sales staff. We've developed process and tooling (partially through the CRM extension) toward this end. Anyway, when a deal is closed as won the sales user uploads the PO and some other docs to the deal.

 

Where the current requirement comes in is it's very common for projects to generate change orders or purchase order adjustments - sometimes weekly for the lifetime of the project, potentially months or years. We'd like the sales staff to attach these change orders to the deal, update the deal amount, and then kick off the internal email so our backend admin staff can process it.

 

Right now we have a custom checkbox field that shows up on deals closed as won. When this is checked, the workflow kicks in and the email is sent. We can obviously support mutliple enrollments by double toggling the field back and forth but it's not the ideal user experience for our sales staff. Hence the goal of enabling a CRM extension button that shows up on deals closed as won that effectively fires off the workflow/email.

0 Upvotes
WendyGoh
HubSpot Employee
HubSpot Employee

Manually enrolling deal in workflow or sending internal email from API

Hey @jgalloway,

 

Thanks for sharing over a detailed use case. 

 

In this case, if each time the sales staff attached these changes, they would also update the deal amount; maybe we can explore the option of using the following deal enrollment trigger, together with re-enrollment set up:

dealsEnrollment.pngdealReenrollment.png

 

Basically, this workflow will enroll deals where the deal amount has been updated in the last 1 day. What do you think of this set up?

jgalloway
Participant

Manually enrolling deal in workflow or sending internal email from API

Hey thanks! Hadn't thought of that but it's definitely a possible solution. We try to avoid too much behind the scenes magic with respect to the sales staff but this might be an acceptable hedge if we make sure they know updating the amount triggers the workflow.

 

While we're on it, is there a quick rundown on how the updated in last x days type triggers work? I couldn't easily find anything in the workflow docs. Do they run on a schedule cron style or will it trigger quasi immediately when the property is changed? The timing would be pretty important as they're sometimes in a hurry to get things processed.

0 Upvotes
WendyGoh
HubSpot Employee
HubSpot Employee

Manually enrolling deal in workflow or sending internal email from API

Hey @jgalloway,

 

While there's no documentation on how the updated in last x days type workflow enrollment trigger works, I was able to confirm how things work by running some test on my end. In this case, if you're looking to enroll deal almost instantly when e.g. amount is changed, using the 'Amount is known' enrollment trigger would be a better option. 

 

I have tested this out and the re-enrollment is almost instantly whenever I changed a deal amount. 

 

Go ahead and try it out and let me know if it works the same for you!

0 Upvotes