2 Ways To Split A Workflow And Handle Conditional Logic

This guide provides different methods to manage conditional logic in MESA, enabling you to create more dynamic and responsive workflows. Learn how to split workflows based on specific criteria and implement conditional actions to streamline your processes. Enhance your automation capabilities and tailor your workflows to meet your unique business needs with these versatile approaches.

Watch the demo

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.

workflow steps: splitting workflow version 1

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:

Mesa.output.send('shopify_2', payload);

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.

workflow steps: Splitting a workflow: Using a sub-workflow

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:

Mesa.automation.send('splitting-a-workflow---advanced-version---subworkflow', context.steps);

And here is the sub-workflow being called:

sub workflow steps

Questions about this workflow demo? Contact:

Kalen Jordan

MESA Service Partner

What you should do next

Whenever you’re ready…follow these 4 simple steps to get started:

  1. Add MESA to your Shopify store. The best way to get started is by adding the MESA app from the Shopify App store. Every plan includes the first 7-days free so you can be assured your workflow is running properly.
  2. Questions? Contact Kalen Jordan. MESA Service Partners can help personalize workflows or make any automations your business requires.
  3. If you know another merchant who’d enjoy reading this, share it with them via LinkedIn, YouTube, Twitter, or Facebook.

Automate anything and get more from your apps.
For free.

Start free trial
background: abstract lines

Automate everything with MESA

Make any workflow and get more from your existing apps.

Try MESA for free, 7-day trial included.