I'm making a workaround in order to be able to count the number marketing emails delivered but after a certain condition/date.
Since the native HubSpot field Number of marketing emails delivered is a number field that can't be adjusted based on other criteria, I'm making a Workflow that adds +1 to a new custom property, every time the Number of marketing emails delivered change (as well as and other criteria are met)
Since the Workflow is updating a custom number field, what code could I have that will take the existing value and add 1 ?
Example, its is 10 in the field, the workflow runs and update the custom field to 11.
This workflow will enroll contacts every time the Marketing emails delivered property updates and they meet the filter requirements (e.g. contact is a member of a list). Then an action increases the Custom Marketing Emails Delivered property by one.
If this would not work, is there criteria than cannot be checked through enrollment filters or active list filters?
Thanks for the tag @PamCotton! Fully agree with @JTBuys solution here, just wanted to add that even if you think you can do something in HubSpot Workflows with custom code, it's always better to look for a native solution using the workflow actions first. Custom code isn't highly supported, may break invisibly due to updates, and is harder for anyone that isn't you to maintain.
Glad the right solution was able to be surfaced here!
Thanks for the tag @PamCotton! Fully agree with @JTBuys solution here, just wanted to add that even if you think you can do something in HubSpot Workflows with custom code, it's always better to look for a native solution using the workflow actions first. Custom code isn't highly supported, may break invisibly due to updates, and is harder for anyone that isn't you to maintain.
Glad the right solution was able to be surfaced here!
This workflow will enroll contacts every time the Marketing emails delivered property updates and they meet the filter requirements (e.g. contact is a member of a list). Then an action increases the Custom Marketing Emails Delivered property by one.
If this would not work, is there criteria than cannot be checked through enrollment filters or active list filters?
You can achieve this by using HubSpot's custom code within your workflow. The code will fetch the current value of the custom field, add 1 to it, and then set the updated value back to the custom field.