Explanation
Explanation
The health provider company needs to display medical test reports (a custom object related to the Patients object) for each patient, showing fields like report name, date requested, and date generated, with the ability to perform three actions (Approve, Print for Review, Send for Retest) per report. OmniStudio tools, such as FlexCards and OmniScripts, are well-suited for creating a modern, user-friendly interface with actionable functionality.
Let’s evaluate the options:
Single FlexCard with multiple actions (D):
Why it fits: A FlexCard is ideal for displaying data in a concise, customizable format, such as a list of medical test reports for a patient. The FlexCard can use a Data Table or Repeat Block to dynamically display the required fields (report name, date requested, date generated) for each medical test report, retrieved via a DataRaptor Extract Action querying the Medical Test Report custom object related to the Patient record. The FlexCard can include multiple Actions (e.g., buttons or links) for each report to trigger the required actions:
Approve: An Action invoking an OmniScript or Integration Procedure to update the report’s status (e.g., set a Status field to "Approved").
Print for Review: An Action triggering a process to generate a printable report, possibly via an OmniScript or Integration Procedure that formats data for printing.
Send for Retest: An Action invoking an OmniScript or Integration Procedure to initiate a retest request, potentially updating fields or creating a new record.
The FlexCard can be embedded in a Lightning page or Experience Cloud site, providing a 360° view of the patient’s reports with actionable buttons for medical officers. This solution is efficient, scalable, and aligns with OmniStudio’s declarative design capabilities, meeting all requirements in a single, cohesive interface.
How it works: In the FlexCard Designer, configure a Data Table or Repeat Block to display medical test report records, with a DataRaptor Extract to fetch data (e.g., SELECT Name, Date_Requested__c, Date_Generated__c FROM Medical_Test_Report__c WHERE Patient__c = :patientId). Add Action elements (e.g., buttons) for Approve, Print for Review, and Send for Retest, each linked to an OmniScript or Integration Procedure for processing.
Salesforce list view with custom buttons/links (A):
Why it’s incorrect: While a Salesforce list view can display medical test reports with custom buttons or links (created via Lightning App Builder or custom code), it is not an OmniStudio tool and lacks the advanced customization and integration capabilities of FlexCards. List views are limited to standard Salesforce UI patterns and don’t support complex, guided processes or external system integrations as seamlessly as OmniStudio. Additionally, custom buttons/links may require more custom code (e.g., Apex, Visualforce) to implement actions like Print for Review or Send for Retest, making it less efficient than a declarative OmniStudio solution.
Multiple FlexCards with single action (B):
Why it’s incorrect: Creating multiple FlexCards, each with a single action, is inefficient and unnecessary. A single FlexCard can handle multiple actions per record (Approve, Print for Review, Send for Retest) using a Data Table or Repeat Block. Multiple FlexCards would lead to redundant configurations, increased maintenance, and a fragmented user experience, as users would need to navigate multiple cards for the same patient’s reports. This approach doesn’t align with the requirement for a unified view of all reports with multiple actions.
OmniScript with multiple Step elements (C):
Why it’s incorrect: OmniScripts are designed for guided, interactive processes (e.g., wizards for data entry or updates), not for displaying lists of records with actions. While an OmniScript could be used to handle the actions (e.g., Approve, Print, Retest), it’s not suited for displaying a dynamic list of medical test reports in a tabular or card-based format. Using multiple Step elements to list reports would be cumbersome and non-intuitive, as OmniScripts are sequential and process-oriented, not optimized for data presentation like FlexCards.
Recommended Solution
Create a single FlexCard to display medical test reports for a patient, using a Data Table or Repeat Block to list records with fields: report name, date requested, and date generated.
Configure a DataRaptor Extract Action to fetch Medical Test Report records related to the Patient (e.g., SELECT Name, Date_Requested__c, Date_Generated__c FROM Medical_Test_Report__c WHERE Patient__c = :patientId).
Add multiple Actions to the Data Table or Repeat Block:
Approve: Triggers an OmniScript or Integration Procedure to update the report’s status (e.g., Status__c = 'Approved').
Print for Review: Invokes an OmniScript or Integration Procedure to generate a printable report, potentially using a DataRaptor Transform to format data or a REST API to a printing service.
Send for Retest: Launches an OmniScript or Integration Procedure to create a retest request, updating fields or creating a new record (e.g., Retest_Requested__c = true or a new Medical Test Report record).
Embed the FlexCard in a Lightning page or Experience Cloud site for medical officers to access within the application.
Optionally, use Conditional Visibility or States to filter reports (e.g., show only pending reports) or style the UI based on report status.
This solution leverages FlexCards’ strengths for data display and actionability, ensuring a clean, efficient interface that meets all requirements.
References
Salesforce Help: Create a Flexcard (Managed Package)
– Explains configuring FlexCards with Data Tables or Repeat Blocks to display related records and add multiple actions.
Trailhead: OmniStudio FlexCards – Covers using FlexCards for data presentation and triggering actions like OmniScripts or Integration Procedures.
Salesforce Help: Add Actions to a FlexCard – Details how to configure multiple actions (e.g., buttons) to invoke processes for tasks like approving or printing.
Salesforce Help: Omnistudio Data Mapper Extract Action (Managed Package) – Describes retrieving related records (e.g., Medical Test Reports) for display in a FlexCard.