I want to trigger a Company workflow when the “Number of Associated Contacts” increases but not when it decreases.
I want to have our team call a company when multiple new employees join their team and become users of our software within any one month. The users are automatically associated with the company so I just need to know when the “Number of Associated Contacts” has increased by more than one in the last 30 days.
I had initially set this up by setting the enrolment criteria as “Number of Associated Contacts is known” (with re-enrolment turned on) and then with a delay until “Number of Associated Contacts is known” for up to thirty days. That should mean that any company where the number changes is enrolled and if it changes again within the next 30 days, they’ll meet the second filter and a call task will be generated.
However, this means that the workflow will trigger if the number of associated contacts decreases as well as when it increases. I don’t want my team calling the company if they’ve in fact lost team-members so I need to limit the workflow to only trigger on a value increase. Is that possible with either the default setup or through some kind of data formatting step with a secondary property holding a previous value of the “Number of Associated Contacts” property?
Hi @MPenfold,
This can be done with a second property, correct. You would create a custom property “Number of associated contacts (delayed by 5 minutes)” and use a workflow to enroll records then “Number of associated contacts” changes, then waits for 5 minutes, then copies the value over to “Number of associated contacts (delayed by 5 minutes)”.
You can now create a third property, a calculation property, which calculates the difference between those two properties.
In your original workflow, triggered by the change in “Number of associated contacts”, you can now branch after enrollment to check whether that calculation property value is positive or negative – and send a notification accordingly.
Let me know if I should explain any step in more detail!
Thanks for the swift response @karstenkoehler! I came up with a similar solution after I posed the question, but it only gets me part of the way as the workflow triggers when one new users joins the company, but I only want to trigger the call task if multiple new users join the company in any one month.
I’m not sure if it’ll work, but I think perhaps I can trigger as you suggested and include the branch for positive/negative on the calculation property, and then delay until the Number of Associated Contacts changes again (for up to thirty days) and then, if it does, check the calculation property again and if still positive I’ll know there’s two new users.