APIs & Integrations

lasseschou
Member

Unenrollment from workflow

I'm trying to set up a workflow to do the following:

  • When receiving an event from our custom app, fire an email.
  • If the event fires again within a short period, don't fire more emails
  • Next month, when the event fires again, fire the email again.

So in short, we'd like to unroll users after a while so they can be re-enrolled next month.

My initial thought was to set up the enrollment triggers so the custom event (using the "Occurred" property) would be within 0 and 5 days. However I can't set up the "between 0 and 5 days" condition - only between two absolute dates (which cannot be used).

Any ideas?

Lasse

0 Upvotes
13 Replies 13
cbarley
HubSpot Alumni
HubSpot Alumni

Unenrollment from workflow

Right @lasseschou, the contact would not continuously re-enroll just because the condition that the event occurred was less than 2 days ago. In fact, I just tested, and the contact will be re-enrolled only the next time the event occurs. This means they'd be enrolled every time the action was completed as long as the workflow enrollment criterion is still valid.

If they clicked the action twice, they'd be enrolled once, complete the workflow, then get enrolled again. That said, there appeared to be some latency with this, as my contact did not re-enroll when waiting just under a minute. I waited two more minutes and added another timeline event to the contact record, and they did re-enroll after that time.

0 Upvotes
lasseschou
Member

Unenrollment from workflow

Ok, but that sounds like the solution then. Thanks.

Next challenge is that I want to send an email when it's more than 30 days since the last login. If the user logs in, and then waits another 30 days, the email should fire again.

The "login" is an event we push in via the Timeline API, and when that happens, we also set the last_login_time property on the contact.

Do you have a good solution for that? I tried setting up a workflow with "Contact property last_login_time Occurred more than 30 days ago", but the problem was that I can't enable re-enrollment on that criterion for some reason. Any suggestions?

Thanks.

0 Upvotes
cbarley
HubSpot Alumni
HubSpot Alumni

Unenrollment from workflow

Hey @lasseschou, is the property you're looking at called login property from your app? If so, it seems like when I use this one as as an enrollment criteria that I'm able to re-enroll based off of this: https://app.hubspot.com/workflows/5087120/flow/3739736/edit

0 Upvotes
cbarley
HubSpot Alumni
HubSpot Alumni

Unenrollment from workflow

I made a test list that you can see, but I don't know if this is the functionality you'd be looking for: https://app.hubspot.com/contacts/5087120/lists/186.

0 Upvotes
lasseschou
Member

Unenrollment from workflow

Hi Connor,

What happens if I have a workflow with this enrollment trigger: "Credit refill occurred less than 2 days ago", and I add the re-enrollment option? Would that:

  1. Fire every time the Credit refill event occurred. Then re-enroll contacts who first dropped out of the criterion, and then later passed the criterion again? Or:
  2. Fire every time the Credit refill event occurs, and then immediately after re-enroll, meaning that the workflow fires indefinitely within those 2 days?
    If I didn't describe it good enough, I'm simply trying to find a convenient way to send an email every time the Credit refill event occurs (which it does around once per month).
0 Upvotes
cbarley
HubSpot Alumni
HubSpot Alumni

Unenrollment from workflow

Hey @lasseschou, digging into this one deeper, it doesn't seem like there's really any solid way to do this in the tool. Events are normally one-time things that occur, so it doesnt seem like we built the functionality to support re-enrollment on these types of things. Most date properties overall in the CRM can't be used for re-enrollment.

One possible workaround that I'm thinking that might work is perhaps enrolling contacts based off of a smart list. If you use the qualifier "is more than X days ago" or "is less than X days ago", this would technically be a rolling date you could leverage to then use as an enrollment/re-enrollment criterion. Otherwise, I think the way to go is perhaps enrolling contacts manually through a workflow via API.

You could trigger enrollment of contacts into a workflow via this endpoint after the event is created and set your enrollment/re-enrollment criteria to be manual. Programmatically doing this might make a bit more sense if you always want the contact to go through a workflow. Otherwise, I don't see any way in-app to re-enroll contacts using this property.

0 Upvotes
cbarley
HubSpot Alumni
HubSpot Alumni

Unenrollment from workflow

Hey @lasseschou, to get on the same page, I'd like to reiterate what you're looking to accomplish. Correct me if I'm wrong. I'll also be asking clarifying questions along the way.

  1. You're sending an event from your custom app to HubSpot, which then fires an email.
  2. This is the tricky step. There's not really a great way to sort of "rate-limit" your custom events (if my assumption from part 1 is relevant). You could refine your enrollment criteria based on when they triggered the event -- see screenshot: http://prntscr.com/lt8hav. Filtering based on exact number of completions wouldn't work, because if they completed the event more than once, but your enrollment criteria only grabs contacts that have completed the event one time, those contacts would not be enrolled in the workflow which would be bad.
    • I'm thinking that you'd use many workflows, and use the Enroll in Workflow option as the last option in each of your workflows, so that when people complete your event during a specific date range, they'd be enrolled, complete the workflow, then be enrolled in another one. The next workflow would have the event completion by absolute date range in the future.
    • Your workflows would look like this. 1: http://prntscr.com/lt8iq9 2: http://prntscr.com/lt8jg6 and so on.
    • You mentioned that you cannot feasibly use an absolute date range -- is there a specific reason this is not the case?

Let me know what you think. If you have any more details you can provide me that might give me more info on the wider picture, please let me know! Thanks

0 Upvotes
lasseschou
Member

Unenrollment from workflow

Hi Connor.

  1. We are sending events via the Timeline API (https://developers.hubspot.com/docs/methods/timeline/timeline-overview) through an app we created through our developer account.

  2. Let me explain a much simpler scenario. I want to fire an email each time a certain event is received. Let's call the event "credit-refill". Whenever that event is received, an email should be fired. How is that possible using workflows? The main problem is the enrollment concept which doesn't really work here unless I've missed something. Because in order to receive the email more than once, you need to be unenrolled and re-enrolled, right?

0 Upvotes
cbarley
HubSpot Alumni
HubSpot Alumni

Unenrollment from workflow

Got it @lasseschou, thanks for the clarification.

  1. Can you send me your App ID, and the HubID of the account you're doing your automation through workflows in?
  2. If you just need to re-enroll you contacts into the workflow each time a timeline event is created in HubSpot, you should simply be able to enable re-enrollment on the workflow
0 Upvotes
lasseschou
Member

Unenrollment from workflow

Sure, App ID: 183341, HubID: 5087120 (I think). Workflow ID: 3732306

The enrollment criterion is set up - it's supposed to enroll whenever the custom event is fired. Using your system the way I've done it is create a criterion that says "The Credit refill property Occurred is more than 0 days ago" (it would be better if I could just choose that the event occurred - any idea?)

When I'm in the re-enrollment modal, I can choose to re-enroll users when the same criterion is met ("The Credit refill property Occurred is more than 0 days ago"), but that doesn't sound right to me.

Let me know what your suggestions are.

0 Upvotes
cbarley
HubSpot Alumni
HubSpot Alumni

Unenrollment from workflow

Welcome @lasseschou! Have you consulted Support about this? They should be more than capable, and faster responding (we aim to answer queries here in under 2 business days) so it would be a better place to start. All of your goals sound possible with workflows except maybe your second point, but it may benefit you to talk through this with Support first. I'd recommend starting there first, and circling back here if your question is overly technical or involves using our publicly facing API docs: https://developers.hubspot.com/docs/overview

0 Upvotes
lasseschou
Member

Unenrollment from workflow

Yeah, support keeps referring to you guys whenever it gets technical. I can try again, but it’s really hard to navigate the support when you refer to each other all the time.

0 Upvotes
cbarley
HubSpot Alumni
HubSpot Alumni

Unenrollment from workflow

Hmm, that's not what we should be doing @lasseschou . Do you have a ticket number I can refer to for a support case? happy to be your main POC here instead of going back to Support, but just want you to be aware of our public agreement on time to response and expectations of what we normally handle vs what support should. Let me dig into your issue and I'll respond back here. In the meantime if you do have those ticket numbers I'd love to check them out

0 Upvotes