Explanation
The business needs an OmniScript to improve customer satisfaction by allowing customers to rate their satisfaction (1-5 scale) and, if the rating is less than 2, request a callback on a specific date and create a case with a list of bills from an external system for the last 5 months in the case description. The OmniScript elements must be arranged in a logical order to achieve this flow.
Let’s break down the requirements and evaluate the correct order:
Requirements and Element Mapping
Customer rates satisfaction (1-5 scale):
Use a Radio Input element to present a 1-5 rating scale, allowing the customer to select their satisfaction level. This element is ideal for single-choice selections with predefined options.
If satisfaction is less than 2, allow callback request:
Use a Date Input element to let the customer select a callback date. This element should be conditionally displayed based on the Radio Input value (e.g., satisfaction < 2) using Conditional View settings.
Retrieve list of bills from external system (last 5 months):
Use an HTTP Action to call an external system’s API (e.g., REST or SOAP) to fetch billing data for the last 5 months. This action retrieves the bill list to include in the case description.
Create a case with bill list in description:
Use a DataRaptor Post Action to create a Case record in Salesforce, populating the description with the bill list retrieved from the HTTP Action.
Correct Order: A. Radio Input, Date Input, HTTP Action, DataRaptor Post Action
Step 1: Radio Input:
The OmniScript starts with the Radio Input element to capture the customer’s satisfaction rating (1-5). This is the first interaction, as the subsequent steps depend on the rating value. The Radio Input can be configured with options (1, 2, 3, 4, 5) and stores the selected value for conditional logic.
Example: In the OmniScript Designer, create a Radio Input element with values 1-5, labeled “Rate your satisfaction.”
Step 2: Date Input:
If the satisfaction rating is less than 2, the Date Input element is displayed to allow the customer to select a callback date. This element uses Conditional View logic (e.g., Satisfaction_Rating < 2) to show only when the condition is met. This step follows the Radio Input because the rating determines whether the callback request is needed.
Example: Configure a Date Input element with a label like “Select Callback Date” and a condition to display if Satisfaction_Rating < 2.
Step 3: HTTP Action:
After capturing the rating and callback date (if applicable), the HTTP Action retrieves the list of bills from the external system for the last 5 months. This action requires customer context (e.g., Customer ID) and may use a date range filter (e.g., last 5 months). It follows the Date Input because the bill list is needed for the case creation, and the OmniScript flow should collect all user inputs before making external calls.
Example: Configure an HTTP Action to call a REST API (e.g., GET /bills?customerId={customerId}&startDate={5_months_ago}) to fetch the bill list, storing the response in a JSON node.
Step 4: DataRaptor Post Action:
Finally, the DataRaptor Post Action creates a Case record in Salesforce, including the bill list from the HTTP Action in the case description. If the satisfaction rating was less than 2, it also includes the callback date. This action is last because it depends on the data collected from the Radio Input (rating), Date Input (callback date), and HTTP Action (bill list).
Example: Configure a DataRaptor Post Action to create a Case with fields like Subject = "Low Satisfaction Follow-Up", Description = "Bills: {bill_list_from_HTTP}", and Callback_Date__c = {date_from_Date_Input}`.
Why Other Options Are Incorrect
B. Date Input, Radio Input, HTTP Action, DataRaptor Post Action:
Incorrect because the Date Input (callback date) should only appear if the satisfaction rating is less than 2, which requires the Radio Input to come first. Placing Date Input before Radio Input disrupts the conditional logic and user flow, as the rating hasn’t been captured yet.
C. HTTP Action, DataRaptor Post Action, Date Input, Radio Input:
Incorrect because starting with the HTTP Action to fetch bills is premature, as the satisfaction rating (Radio Input) and callback date (Date Input) are needed first to determine whether a case should be created. Similarly, creating the case (DataRaptor Post Action) before collecting user inputs (Date Input, Radio Input) is illogical, as the case depends on those inputs.
D. HTTP Action, Radio Input, Date Input, DataRaptor Post Action:
Incorrect because the HTTP Action (fetching bills) should occur after the user inputs (Radio Input for rating, Date Input for callback) are collected. Fetching external data before knowing whether the rating is less than 2 is inefficient, as the bill list is only needed for case creation in that scenario.
Why Option A Is Efficient
Logical Flow: The order follows the user journey: capture satisfaction rating (Radio Input), conditionally collect callback date (Date Input), fetch external bill data (HTTP Action), and create the case (DataRaptor Post Action).
Conditional Logic: The Radio Input’s value controls whether the Date Input is shown, ensuring the callback request only appears for ratings < 2.
Data Dependency: The HTTP Action and DataRaptor Post Action rely on prior inputs (rating, callback date, customer context) to fetch and save the correct data.
Declarative Design: This sequence leverages OmniStudio’s declarative tools to create a seamless, guided process without requiring custom code.
Additional Notes
Conditional View: In the OmniScript Designer, set a Conditional View on the Date Input element (e.g., Satisfaction_Rating < 2) to ensure it only displays when needed.
Data Integration: The HTTP Action may require an Integration Procedure to format the bill list or handle complex API calls, but the HTTP Action itself is sufficient for a single REST/SOAP call.
Case Creation: The DataRaptor Post Action maps the bill list (from HTTP Action) and callback date (from Date Input) to the Case record’s fields, ensuring all required data is included.
References
Salesforce Help: OmniScript Element Types – Describes Radio Input for rating scales and Date Input for date selection.
Salesforce Help: Conditional Views in OmniScript – Explains how to use Conditional Views to show elements like Date Input based on conditions (e.g., rating < 2).
Trailhead: OmniStudio Integration Procedures – Covers HTTP Action for external system calls, such as fetching bills.
Salesforce Help: Omnistudio Data Mapper Post Action (Managed Package) – Details creating records (e.g., Case) with data from prior OmniScript elements.