Filters

In WunderAutomation, you add one or more filters to determine if the actions should be executed or not. Filters can be combined with logical and / or operations so that it’s possible to create to fine tune the workflow to a great extent.

All built in filters are found here.

A filter contains up to three different elements:

Filter type #

The filter type determines what the filter should compare with. When you select a filter type from the dropdown you will notice that only the filter types that works with the specific trigger are enabled. For instance, it’s not possible to use the “order payment method” filter in workflows that are triggered by a new comment being submitted. The built in filter types handles most variables on post, user, comment and order objects. It’s also possible to filter on some non object specific things, like the “Request initiator” filter type that checks if the workflow was triggered by a normal post save or a REST API call to WordPress.

Filter types with field definition #

Some filter types needs an extra input box to define a field name. Typically this is used when you want to set up a filter that checks the value on a specific custom field.

This extra field are used by the built in filter types for custom fields (standard and via the Advanced Custom Fields plugin). Some addons to WunderAutomation also uses this extra input field.

Operators #

Depending of the filter type, the dropdown to select the filter operator will contain different values that suits the selected filter type.

Text fields

Number fields

Multi select fields

You can read more about how each operator works on the comparison operator page.

Comparison values #

The comparison values work together with the operators to tell WunderAutomation how to evaluate each filter. For some filter types, the comparison values are a simple text input, for other filter types it can be a multi select list.

Text input values

Text input boxes are standard free text input field where you can type the comparison value directly. This type of input is often used for filter types that expect text or numerical values.

Note that text fields also have basic support for comma separated lists. If you use a filter that returns a text value AND supports “Is one of” or “Is not one of” it means you can write your own list with commas, example:

Multi select value with fixed values

A multi select value input with fixed values will show you all available values as soon as you click the input. You can also start typing in the input box to filter the available values to easier find the desired value.

Multi select value input with active lookup

A multi select value input requires you to start typing the value you are looking for, as you type, the dropdown will update with values from the server. This type of input is used for i.e. product categories and tags.

Combining filters #

By default, filters are combined together using a logical AND rule. Most common workflows uses one or more filters that are AND’ed together and if all the filters pass, the actions are executed:

With the two filters above, the workflow actions will only be executed if the billing country is one of USA and Canada AND the payment method is “Check”.

It’s also possible to use a logical OR to determine if the actions should be executed or not. To do this, you need to add an extra filter group:

In the above example we have added a new filter group with a filter that checks if the email domain of the customer contains “example.com”. Each filter group can contain an unlimited number of filters and a workflow can have an unlimited amount of filter groups.

Even if it’s possible to create very complex logical rules for when a workflow should run, we advice you not to go overboard. In many cases it might be easier in the long runt to create multiple workflows using the same trigger but different filters to achieve the same goal.

All built in filters are found here.

Powered by BetterDocs

Leave a Reply

Your email address will not be published. Required fields are marked *