Conditional workflow: what it is and how you can implement it

conditional workflow

Your workflow automations’ performance often hinges on how good of a job you’ve done at applying conditional logic.

Implemented effectively, you can prevent duplicate data, avoid unnecessary API calls (and their associated costs), ensure that data is accurate and complete, notify colleagues when they need to review and approve something (e.g. discounted quote)—and much more.

To help you better understand how conditional logic works and the various ways you can leverage it, we’ll define it, break down a few ways to use it, and share best practices for implementing it. 

What is a conditional workflow?

It’s a workflow that uses IF or IF/ELSE conditions at least once. Implemented effectively, the workflow will only run when it’s supposed to, and certain actions will only occur when they need to.

Related: What is a process flow?

Examples of conditional workflows

To help you make sense of this definition, let’s break down a few automations that use conditional workflows.

Message an employee in Slack when there isn’t a description in a case they submit

As your customer-facing employees submit tickets, they may forget to fill out all of the fields. In turn, your support team (or whoever else manages cases) may experience difficulties in troubleshooting and resolving these issues. They’ll likely need to go back to the case owner and ask them for more context—which is not only tedious but also limits their ability to resolve issues quickly.

The following conditional workflow can help mitigate any back and forth, as it asks the case owner to fill out missing fields (in this case, the description):

A workflow where any time a case gets created without a description, the case owner gets notified via Slack

Once a case gets created or updated, the workflow gets triggered. The first action uses an IF/ELSE condition. If the description field is present, the workflow ends. But if the description field isn’t present, the case owner would receive a message in Slack that notifies them of the issue and asks them to fix it. The message can also include a link to the case so that they can access it easily and add the description quickly.

Create an incident in ServiceNow when a case gets added to Salesforce

Once a customer success manager or sales rep uncovers an issue at an account, they’ll need to notify the appropriate colleagues as soon as possible so that it can get resolved quickly.

To support this effort, you can build the following conditional workflow:

A workflow that keeps cases in Salesforce in sync with incidents in ServiceNow

It’s triggered once a new case gets added by the sales rep/CSM in Salesforce. The workflow then uses two conditions, where one operates within the other:

  • If the incident doesn’t exist in ServiceNow, the next step is to search for the user who is associated with the incident. However, if the incident exists, the workflow ends
  • If the user doesn’t exist in ServiceNow, both the user and the incident get created; if the user already exists, only the incident gets added

Related: Examples of powerful workflow automations

Upload files from a Salesforce account to a folder in Box

As your sales reps engage with prospects, they’ll likely collect a variety of documents that need to be stored securely in a file storage application like Box.

To help facilitate this need, you can implement some version of the following conditional workflow:

A workflow where files from a new account in Salesforce get added to that account's folder in Box

The workflow starts with a condition that determines when it runs (when a new account gets added to Salesforce with attachments); otherwise, the workflow doesn’t run. 

Once running, the workflow uses another condition: If the account’s associated folder in Box doesn’t exist, it goes on to add it; otherwise, it just moves onto the next step of the workflow, which involves downloading the file attachments and uploading them to the account’s folder.

Best practices for using conditional workflows

As you look to incorporate IF and IF/ELSE logic into your workflows, there’s a variety of considerations to keep in mind. Here are just a few worth considering:

Incorporate conditional logic in issue-centric workflows

As you build workflows for the various issues that can take place at your organization—from invoice errors to product bugs—, you’ll need to ensure that issues marked as high priority (or something similar) get seen and addressed by your team faster. Conditional logic can accommodate this by layering on additional steps for such issues (e.g. messaging a specific channel in an application like Slack).

Test your conditional logic

This can help you pinpoint any flaws in the design and fix them before pushing the workflow automation to production. It’s also considered best practice to test your workflow as you build it, regardless of its logic, so try to incorporate testing for any workflow you build. 

Add conditional logic to approval workflows

Employee expenses, customer quotes, paid time off, and countless other requests can be approved automatically if they meet certain criteria. That said, if they don’t, your conditional logic can go into action by asking the designated approvers whether to accept or reject the request.

Related: A guide to implementing visual workflows

Leverage conditional logic across your workflows with Workato

Workato, the leader in enterprise automation, offers the conditional logic functionality highlighted above as well as an auto-retry feature, where a certain step(s) in a workflow can automatically re-run if a predefined error occurs.

Workato also provides:

  • A low-code/no-code UX, empowering both business teams and IT to integrate applications and implement automations quickly
  • Hundreds of thousands of automation templates and more than a thousand pre-built application and database connectors to help your teams brainstorm and implement automations quickly
  • Workbot®, a platform bot that can bring automations directly to your business communications platform, whether that’s Slack or Microsoft Teams
  • Enterprise-grade governance and security controls via features like role-based access control and activity audit logs
Learn more about Workato by scheduling a demo with one of our automation experts.

About the author
Jon Gitlin Content Strategist @ Workato
Jon Gitlin is the Managing Editor of The Connector, where you can get the latest news on Workato and uncover tips, examples, and frameworks for implementing powerful integrations and automations. In his free time, he loves to run outside, watch soccer (er...football) matches, and explore local restaurants.