The ‘IF node’ in App Connect provides a great piece of functionality that is easy to use and helps our users solve many business and technical challenges. It enables you to choose from a variety of conditional operators that evaluate against one another and execute different actions depending on the outcome. The conditional operators included in App Connect are:
- Is greater than or equal to
To demonstrate this powerful capability, we are going to set up a flow to check the purchase history of a customer when there is a new opportunity and, if they have spent more than $2m, make sure someone in the sales team actions it immediately.
To this end, we will use a variety of connectors; Salesforce, Netsuite, Slack and Gmail and you guessed it; one of the new operators for the ‘If node‘. Our final flow will look like this;
So let‘s break it down. Firstly we add the ‘New Opportunity’ trigger from Salesforce, followed by an action to retrieve an Account using the “accountID” field from the Opportunity;
We then ask Netsuite for the customers which match the account name;
From here, we retrieve the purchase orders associated with that customer;
Now we add an ‘If node‘ and start to use the new conditional operators, in this case the ‘is greater than’ operator. The logic of the ‘If node‘ is; post to the “sales team” Slack channel if the total purchases are greater than $2m, otherwise notify the sales team email account via the Gmail connector. In order to figure out the total purchases we use JSONata to simply sum each individual purchase total.
(More about JSONata
here)
The Slack configuration;
The Gmail configuration;
That’s all there is to it!