WORKFLOWS

How to add a condition to a workflow

A condition splits a workflow into two paths. The If / else step tests the enrolled record. Records that match go down the Yes branch. The other records go down the No branch.

An example: a workflow starts when a deal moves to a new stage. A condition tests the deal value. Large deals get an email. Small deals get a tag.

Before you start

Make a workflow and choose a trigger first. Read "Build your first workflow" for these steps.

Step 1: Add the If / else step

  1. Click a round + button on the canvas.
  2. In the Add a step dialog, click If / else.

The step goes on the canvas. It shows two branches, Yes and No.

Step 2: Open the condition builder

Click the If / else card. The inspector opens on the right.

The If / else inspector with the Match box, one rule, and the Add rule button

Step 3: Choose the match mode

Click the Match box at the top of the inspector.

Mode What it does
All rules The record must match every rule.
Any rule The record must match one rule or more.

The default mode is All rules. The mode applies to all the rules in the step.

Step 4: Make a rule

Each rule has three parts: a field, an operator, and a value.

  1. Click the Search fields box.
  2. Click a group tab to make the list shorter. The tabs are All, Contact, Company, Deal, Lead, and Task.
  3. Type part of the field name. Then click the field that you want.
  4. Click the operator box. Click the operator that you want.
  5. Type the value in the Value box.

NOTE: The WooCommerce tab shows only when the WooCommerce plugin is active. The group tabs show only when the list has 8 fields or more.

The operators

Operator What it does
is The field is equal to the value.
is not The field is not equal to the value.
contains The field contains the value.
does not contain The field does not contain the value.
is greater than The field is more than the value.
is less than The field is less than the value.
is empty The field has no value.
is not empty The field has a value.
has tag The record has the tag.
does not have tag The record does not have the tag.

The is empty and is not empty operators use no value. FlyCRM hides the Value box for them.

The value box is always a text box. The operator decides how FlyCRM reads the text:

  • is greater than and is less than change the two sides into numbers. Use these operators with a number field, for example a deal value or an order total.
  • is and is not compare two numbers when both sides are numbers. If not, they compare the text. Letter case makes no difference.
  • contains also looks in a list. To test a WooCommerce order for one product, use contains with the product ID or the product SKU.
  • is empty is true when the field is empty, has no value, or holds an empty list.

Step 5: Add more rules

Click Add rule. A new rule opens below the first rule. A new rule starts with the operator is.

To remove a rule, click Remove rule at the top right of the rule. There is no confirmation and there is no undo.

CAUTION: A step with no rules always takes the Yes branch. The builder shows this message: Add a rule, or the condition always takes the Yes branch.

Step 6: Apply and save

  1. Click Apply.
  2. Click Save.

The card on the canvas shows the number of rules. For example, 2 conditions.

Fill the two branches

A condition does nothing without steps below it.

  1. Click the + below the Yes branch. Add the steps for the records that match.
  2. Click the + below the No branch. Add the steps for the other records.

An empty branch ends the run for those records.

Before you publish

The step needs at least one rule. If the step has no rule, the publish dialog shows this message:

Step 5 (If / else) needs at least one condition.

The number in the message is the number of the step. Add a rule, then publish again.

CAUTION: If you delete an If / else step, FlyCRM also deletes the full No branch. There is no confirmation and there is no undo. Save your work before you delete a branching step.