Here are some different ways to handle conditional logic in MESA.
Watch The Demo
1. Splitting A Workflow – Simple Version
Let’s say that you want one thing to happen under one condition and another thing to happen under another condition. We don’t currently have standard if/else type blocks, but it’s usually pretty easy to workaround that with a little bit of custom code.
This one works by hitting Edit Code on the Filter by MESA step and adding this code to the else condition,, where the string shopify_2 is the key of the workflow step after the else condition:
2. Splitting A Workflow Using A Sub-Workflow
This one can be useful for longer or more complicated workflows where you want to fire off a separate sub-workflow in the else condition.
This one works by hitting Edit Code on the Filter by MESA step and adding some this code to the else condition, where the key you’re passing in is the key of the subworkflow:
And here is the sub-workflow being called:
Learn how to make Shopify work easier with your business processes.