We’re looking to create a generic workflow that will handle all form submissions on our site (we have a few dozen of them).
Currently, we set the enrollment trigger to be “form submission” and we check off all of the forms we want to consider. Fine.
The problem is that later in the workflow, we may want to take different actions depending on *which* form triggered the workflow. As far as we can tell, there’s no way in the workflow to determine this. Why is this a problem? Consider this scenario:
- We’ve got two forms - form A and form B
- Our workflow trigger is submission of either form
- For both forms, we’ll perform some common actions - setting contact properties, sending internal emails, etc.
- Later in the workflow, we have an if block that will:
- Check if form A was submitted and send a follow up email
- Check if form B was submitted, send a follow up email and set additional contact properties that we didn’t set for form A
The problem with this model is the “if” block. We can determine that a contact has filled out a form but we don’t know that the running instance of the workflow was triggered as a result of form A or form B. So, if a contact fills out form A and then later fills out form B, the if block will check their form submission history and see that they’ve filled out form A. It will never get to the form B branch.
Now, we’ve worked around this by adding a condition in the if block that checks “last page seen” on the contact record so we can say “did they fill out form A from a particular page” but this isn’t something that’s going to scale as we add more forms. Additionally, “last page seen” isn’t reliable because the contact could have navigated elsewhere on our site so that value won’t line up with the value we want in order to determine which form they submitted.
What we’d really like to see is some sort of variable in the workflow that indicates which form was submitted. If we had that, our if blocks would just check that variable and act accordingly.
How are other people handling this? We know we can create a 1:1 mapping between forms and workflows but that will make maintaining all of this really challenging so we’d prefer to keep the logic in a single workflow, if possible.
Thanks.
- Terence