The requirement involves creating a quoting process within an OmniScript where an agent selects a product (with a unit price), specifies grade and size, looks up a discount factor based on those inputs, and calculates the final quote. Two OmniStudio tools are needed to achieve this: Decision Matrix and DataRaptor Extract.
Here’s why C. Decision Matrix and D. DataRaptor Extract are the correct answers:
C. Decision Matrix:
Purpose: A Decision Matrix in OmniStudio is a tool used to look up values based on multiple input conditions, returning a result that can be used in calculations or processes. It’s essentially a configurable lookup table stored as a Salesforce custom object (DecisionMatrixDefinition).
Application: In this scenario, the Decision Matrix is ideal for determining the discount factor based on the combination of grade (A, B, C, D, E) and size (Small, Medium, Large, X-Large). For example:
Grade A + Small = 0.9 (10% discount)
Grade B + Large = 0.85 (15% discount)
And so on for all 20 combinations (5 grades × 4 sizes).
Integration with OmniScript: The OmniScript can call the Decision Matrix via an Integration Procedure or directly reference it in a Calculation Action, passing Grade and Size as inputs and receiving the DiscountFactor as output.
Why It Fits: The requirement explicitly states “look up a discount factor,” and Decision Matrix is purpose-built for such multi-variable lookups, making it more efficient than manual coding or other tools.
D. DataRaptor Extract:
Purpose: A DataRaptor Extract retrieves data from Salesforce objects and maps it into a JSON format usable by OmniScripts or other components.
Application: The product details, including the UnitPrice, are passed to the OmniScript when the agent selects a product. A DataRaptor Extract is needed to fetch this product data from a Salesforce object (e.g., Product2 or a custom object like QuoteLineItem__c) based on the selected product’s ID. The extracted data (e.g., { " ProductId " : " 01t... " , " UnitPrice " : 100 }) is then available in the OmniScript’s data JSON.
Role in Calculation: After the Decision Matrix provides the discount factor, the OmniScript can use a Calculation Action to multiply the UnitPrice (from the DataRaptor Extract) by the DiscountFactor (from the Decision Matrix) to compute the quote (e.g., 100 * 0.9 = 90).
Why It Fits: The process starts with product selection, and DataRaptor Extract is the standard OmniStudio tool for retrieving Salesforce data like unit price.
How They Work Together:
DataRaptor Extract: Fetches product details (e.g., UnitPrice) when the agent selects a product.
Decision Matrix: Looks up the discount factor based on Grade and Size inputs.
Calculation Action in OmniScript: Multiplies UnitPrice by DiscountFactor to return the quote.
Now, let’s examine why the other options are incorrect:
A. DataRaptor Transform: A DataRaptor Transform manipulates or reshapes data (e.g., converting JSON structures or applying formulas) but doesn’t retrieve data from Salesforce or perform lookups like a Decision Matrix. While it could theoretically calculate the quote after data is fetched, it’s not needed here since a Calculation Action within OmniScript can handle the multiplication, and it doesn’t address the lookup requirement.
B. Expression Set: An Expression Set defines reusable formulas or conditions in OmniStudio, often used in Integration Procedures or Calculations. While it could compute the final quote (e.g., UnitPrice * DiscountFactor), it doesn’t retrieve data or perform lookups based on grade and size. It’s a supporting tool, not a primary solution for this requirement.
[References:, , Salesforce OmniStudio Documentation: Decision Matrix Overview – Describes using Decision Matrices for multi-condition lookups., Salesforce OmniStudio Developer Guide: DataRaptor Extract – Details retrieving Salesforce data for OmniScript use., , , , , ]