Returns the first true result from a series of logical tests in Salesforce Spiff. This function is similar to multiple if() functions. You can include multiple conditions and return different values based on the result of each condition.
Required Editions
Available in: both Salesforce Classic (not available in all orgs) and Lightning
Experience
Available in: Enterprise, Unlimited, and Developer
Editions
Available for an additional cost in: Professional Edition with Web
Services API Enabled
Syntax
ifs(list_of_condition_value_pairs)
Arguments
Argument
Required?
Description
list_of_condition_value_pairs
Required
A list of each condition to test and each value to return, enclosed in brackets and separated by commas, such as [condition 1, value 1, condition 2, value 2].
Example
A rep is paid a commission rate for each opportunity, but the rate depends on the opportunity's ARR.
If the ARR exceeds $30,000, the rep receives a 10% rate.
If the ARR is under $20,000, the rep receives an 8% rate.
If the ARR is under $10,000, the rep receives a 6% rate.
Because this function returns the first condition that's true, carefully arrange your test conditions so that the most exclusive condition is first. If the ARR is greater than $30,000, both the first and second conditions are true, but you make to make sure that you return the 10% rate, not 8%.
To provide a catch-all condition or fallback value when all other conditions are false, the last condition can always be true.
We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required Cookies
Always Active
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional Cookies
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising Cookies
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.