NBA Node: Filter

Alex Edelstein
2 min readMay 18, 2018

--

Filter nodes act on a single child branch and thus a single set of propositions.

Propositions will pass through a Filter node if the expression you specify evaluates to true. Note that if the point-and-click expression builder doesn’t support the complexity you need, you can switch to formula mode. We believe we support the full Salesforce formula engine.

Comparing Filter nodes and Gate nodes

Gate nodes act likegates that turn branches on or off, while Filter nodes filter a set of propositions and pass forward a subset.

One way to decide which to use:
If your expression includes only context (e.g. record) data then you should use an if node. If your expression uses any proposition data then you should use a filter node.

Note: whilst it is possible to use a filter node with an expression which uses only context (record) data this is much less efficient and should be avoided. With if nodes the strategy will only execute child nodes where the corresponding expression is true so this can eliminate the need to execute parts of the strategy and the expression is only evaluated once for that branch, not once for each proposition.

Troubleshooting Filters

Make sure your Load Propositions nodes are loading any fields that this filter is going to need.

Filters act on the Propositions that are loaded with the Load Propositions node. But the Crafter isn’t currently smart enough to automatically ensure that custom fields are loaded. So if you use a custom field in your filter, like this:

…you need to enter Formula Mode and make sure that each Load Propositions nodes loads it in, like this:

General Node Information (applies to all nodes)

For more information:
Filter Developer Reference (Must be in Salesforce pilot to access)

return home

--

--