Salesforce Certified OmniStudio Developer — Question 35
A developer needs to configure a calculation procedure to calculate a subtotal using two different formulas depending on whether the input Boolean variable isCustomer is set to true or false.
How should a developer configure the calculation procedure to conditionally execute the correct formula?
Answer options
- A. Use a single Calculation Step with an IF statement directly in the formula definition to reference the isCustomer variable and conditionally perform the appropriate calculation.
- B. Use two separate Calculation Steps with the Conditional Step property selected; reference just the isCustomer variable in the Condition syntax (no comparison necessary).
- C. Use two separate Calculation Steps with the Conditional Step property selected; use the ISTRUE(isCustomer) and NOT(ISTRUE(isCustomer) functions in the Condition syntax.
- D. Use two separate Calculation Steps with the Conditional Step property selected; compare the isCustomer variable directly to the literal true and false values in the Condition syntax.
Correct answer: D
Explanation
The correct answer is D because it explicitly compares the isCustomer variable to the boolean values true and false, ensuring the correct formula is executed based on the variable's state. Option A is incorrect as it relies on an IF statement which is not necessary for this scenario. Option B fails because it does not provide a comparison, which is needed to determine which formula to use. Option C is also incorrect as using functions like ISTRUE is unnecessary when direct comparison is available.