PieSync Help Center

Explore our help center for quick answers

How do the IF/THEN rules work?

Jan Bogaert

The IF/THEN rules can seem daunting at first. Understanding how they work and what they do is probably one of the more important parts of setting up a connection, but arguably also one of the more difficult parts. So in this article we’ll talk you through everything there is to them so that you can begin to confidently configure them.

Too Long; Didn’t Read

The IF/THEN rules define which contacts PieSync will keep in sync and which contacts will not. This means that you can consider each rule to be like an independent search. Any PieSync connection will come with two IF/THEN rules by default. One for each app that is connected. So by default PieSync will sync all contacts in these apps with one another. You can add filters which will help you narrow down the search criteria of the connection rule. And actions can be added to let PieSync do something in addition to keeping the contact in sync.

Default Rules

PieSync’s IF/THEN rules (otherwise called Connection Rules or simply Rules) are one of the first things you see when opening up a connection between two apps. Any PieSync connection will come with two rules by default. One rule for each one of the apps you have connected. Below you’ll find an example of what the default rules for a two-way KWCommand - Dotloop connection look like:

If/Than rules KW

These connection rules define which contacts PieSync will keep in sync and which contacts it will not sync. This means that you can consider each rule to be like an independent search. So what does that say about the two default rules? Well, the rule at the top will look for any contact in KWCommand and the bottom rule will look for any contact in Dotloop. So in short: by default PieSync will sync all contacts.

Adding Filters

We’ve established that each connection rule will individually look for contacts to sync. This means that the IF-clause of each rule must define the search criteria. Here we’ll explain how you can change which contacts are kept in sync.

Continuing with the aforementioned example, the reason why all contacts will be synced between KWCommand and Dotloop is because the sole default criteria is that a contact should either be ‘in KWCommand’ or ‘in Dotloop’. There are no additional requirements. However you can add some by clicking ‘add filter’.

Filters will help you narrow down the search criteria of the connection rule. They can be added to the IF-clause of each rule. There is no limit to the amount of filters you can use within one rule, but keep in mind that the more filters you add, the more contacts you might exclude. If there are too many requirements, then it’s entirely possible that no contact qualifies all of them, which would mean no contacts are synced. Below you’ll find a screenshot of how PieSync will only sync Dotloop contacts whose role is ‘Buyer’. Because only contacts with the Role ‘Buyer’ are synced, any other Dotloop contact will be excluded.

IF/Than rules

Adding Actions

If the IF-clause defines which contacts should be synced, then the THEN-clause must decide how they are synced, right? Well, yes and no. You actually cannot change how contacts are synced, but there is an ‘add action’ button similar to the ‘add filter’ button. Actions can be added to do something in addition to keeping the contact in sync.

Continuing with the same example, you see in the screenshot below that the action ‘add tag Buyer’ has been added to that rule. By adding this action, PieSync will now not only keep any Dotloop contacts who have the role ‘Buyer’ in sync with KWCommand, it will also give them all the tag ‘Buyer’ in Command. Doing this makes it very easy to identify those types of customers whether you’re looking for them in Dotloop or KWCommand.

KW IF/THAN

Adding Multiple Rules

We’ve already discussed that PieSync will provide you with two rules by default and that you can add filters to narrow down their scope. However adding too many filters can cause the search criteria of your rule to not deliver any results. This can sometimes happen when a rule is configured like in the screenshot below.

KW if/than wrong rules

The reason why this rule will not deliver any results is because it is telling PieSync to sync any contact in Dotloop that is both a ‘Buyer’ and a ‘Seller’. As it is not possible in Dotloop that a contact is a ‘Buyer’ and a ‘Seller’ at the same time, no contacts match the criteria so none will sync.

In case you want to sync all Dotloop contacts with the role ‘Buyer’ and all the contacts with the role ‘Seller’, you’ll have to configure your connection differently. Since each rule acts as an independent search, you’ll need two rules to achieve this goal: one rule will search for Buyers and the second one will search for Sellers. You can create an additional rule by clicking ‘add another rule’ underneath the bottom rule.

KWIfthan

And that’s how PieSync’s IF/THEN rules work and how you can configure them to achieve your goals. Should you have any outstanding questions regarding rules or about your configuration, please contact support@piesync.com.

On this page