How do I test branching logic in workflows?

Last updated: May 15, 2018

Applies to:

Marketing Hub
Professional, Enterprise
Sales Hub
Professional, Enterprise

After you've built your workflow, you have the ability to test the steps of your workflow to ensure they're set up as intended. The "test workflow" feature executes all steps immediately and delays between steps do not apply, which means it may not execute workflows with branching logic as intended. 

For example, if you set up a workflow with an if/then branch that is dependent upon a contact opening an email from a previous step and use the "test workflow" feature, there will not be enough time for the test contact to interact with the email by the time they reach the branch (because the test workflow feature removes all delays). The test contact will follow the NO branch automatically because they weren't able to interact with the email by the time they reached the branch in the workflow.

Instead of using the Test function, you can decrease the time of any delays for testing purposes, turn on your workflow, and actually enroll a test contact to execute the actions of the workflow with the intended delays:

  • Decrease any delays you've set up - a few minutes for each will ensure that your test contact has time to meet the appropriate criteria while going through the workflow, but is still short enough for testing.
    Note: It's important to add delays before any branches that are dependent on a contact engaging with an asset from a previous action within the workflow (i.e. contacts opening an email that is sent in a previous action). If you don't have delays set up for these branches, do so by c
    licking the + icon before your branching logic step. Choose Add delay from options > place a number of minutes in the appropriate textbox > click Save.
  • Once you've edited and/or added delays, click Review then click Activate to turn on your workflow.
  • Manually enroll your test contact. Check out this article for step-by-step instructions. 
  • Make sure that your test contact engages with any received asset(s) as necessary to meet the criteria of your if/then branches. If your first step is set up to send your contact an email and the branching logic moves you through IF YES only if you open the email from the previous step, make sure you open that email within the timeframe(s) of your delay(s) to test the IF YES branch.
To test both branches (YES and NO) of your if/then branches, you'll need to create and enroll multiple test contacts, one who meets the criteria of your if/then branch and one who does not. Alternatively, turn on reenrollment and manually enroll your original test contact again, making sure to change any properties/engage with assets accordingly to test the opposite branch. 
Once you've tested your if/then branches and ensured that they're working as intended, make sure you reset your delays to the correct amount of time and begin enrolling your contacts.