Loading
Ongoing maintenance for Salesforce HelpRead More
Feature degradation | Gmail Email delivery failureRead More
Business Rules Engine
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Create a Flow for Prior Authorization Check

          Create a Flow for Prior Authorization Check

          A Salesforce Flow brings the Context Service and Business Rules Engine components on a single platform and helps you run the scenario to experience how these components work together to give the expected results. Create a flow to test the Health Cloud scenario and verify if you're getting the expected results. In this flow, you first add a screen component to capture the user inputs. Then, use the Get Records elements to fetch the Context IDs that you use to hydrate context data. Add a loop element to find the prior authorization and benefit details for each service code. Use a Build Context action element inside the loop to hydrate data from the Member Plan object and its child nodes. Then, add an action element to call the expression set that uses the hydrated data to get the prior authorization check status for each service code and the corresponding coverage benefit details and approval status.

          Required Editions

          Available in: Lightning Experience
          Available in: Enterprise and Unlimited Editions for clouds that have Business Rules Engine enabled
          User Permissions Needed
          To create a flow: Manage Flow
          To invoke an expression set: Rules Engine Runtime
          1. From Setup, in the Quick Find box, enter Flows, and then select Flows.
          2. Click New Flow.
          3. Select Start From Scratch, and then click Next.
          4. Select Screen Flow, and then click Create.

          Create a User Input Screen

          1. Click Add Elements.
            A new Flow page.
          2. Select the Screen interaction element.
            The various options under Add Elements.
          3. In the Screen Properties section, enter Enter Details as the label.
          4. Drag the Text component from the Components list to the Header component.
            The Edit Screen to customize the screen properties.
          5. Add the Text details.
            • Label: Member Number
            • API Name: MemberNumberInput
          6. Select Require.
            The Edit Screen to customize the screen properties.
          7. Drag the Date component from the Components list to the Member Number text component.
          8. Under Date, enter Date of Service as the label.
          9. Select Require.
          10. Drag the Text component to the Date of Service date component.
          11. Under Text, enter Member Plan Type as the label.
          12. Similarly, add these service code details in sequence.
            Component Label
            Text Service Code 1
            Text Service Code 2
            Text Service Code 3
            Text Service Code 4
            The completed New Screen page with the corresponding screen properties.
          13. Click Done.
          14. Save your changes.
          15. Enter Health Care Prior Authorization Check as the flow label.
          16. Save your changes.

          Assign Variables to Service Codes

          1. Click Add Elements after the Enter Details element.
          2. Select the Assignment element.
          3. In Label and API Name, enter ServiceCodeList.
          4. Enter the variable values.
            1. Click in the Variable field.
            2. Select New Resource from the dropdown.
              Search variables
            3. Select Variable as the resource type.
            4. Enter c_ServiceCode as the API name.
            5. Select Text as the data type.
            6. Select Allow multiple values (collection).
            7. Click Done.
            8. Select Add as the operator.
            9. Click in the Value field, and select the Service Code 1 screen component.
            10. Click Add Assignment.
            11. Similarly, add these variable values.
              Variable Operator Value
              c_ServiceCode Add Service Code 2
              c_ServiceCode Add Service Code 3
              c_ServiceCode Add Service Code 4

          Add Context IDs

          1. Click Add Elements after the ServiceCodeList element.
          2. Select the Get Records element.
          3. Enter Get Context Definition Id as the label.
          4. Select Context Definition as the object.
          5. Under Filter Context Definition Records, add these details.
            1. Select All Conditions Are Met (AND) as the condition requirement.
            2. Select DeveloperName as the field.
            3. Select Equals as the operator.
            4. Enter Get_MemberPlan_Details as the value.
          6. Save your changes.
          7. Click Add Elements after the Get Context Definition Id element.
          8. Select the Get Records element.
          9. Enter Get Context Version Id as the label.
          10. Select Context Definition Version as the object.
          11. Under Filter Context Definition Version Records, add these details.
            1. Select All Conditions Are Met (AND) as the condition requirement.
            2. Select ContextDefinitionId as the field.
            3. Select Equals as the operator.
            4. Enter Context Definition from Get_Context_Definition_Id > Context Definition Id as the value.
          12. Save your changes.
          13. Click Add Elements after the Get Context Version Id element.
          14. Select the Get Records element.
          15. Enter Get Mapping Id as the label.
          16. Select Context Mapping as the object.
          17. Under Filter Context Mapping Records, add these details.
            1. Select All Conditions Are Met (AND) as the condition requirement.
            2. Select ContextDefinitionVersionId as the field.
            3. Select Equals as the operator.
            4. Enter Context Definition Version from Get_Context_Version_Id > Id (Context Definition Version Id) as the value.
          18. Save your changes.

          Add Loop

          1. Click Add Elements after the Get Mapping Id element.
          2. Select the Loop element.
          3. Enter Loop through Service Codes as the label.
          4. Select c_ServiceCode as the collection variable.
          5. Select First item to last item as the direction.

          Hydrate Member Plan Object and Child Nodes Data

          1. Click Add Elements after For Each.
          2. Select the Action element.
          3. Find and select the Build Context action.
          4. Enter Hydrate data from Member Plan Object and its child nodes as the label.
          5. Under Set Input Values for the Selected Action, add these details.
            1. Select Context Definition from Get_Context_Definition_Id > Context Definition Id as the context definition.
            2. Turn on Context Data and enter {"MemberPlan":[{"id":"<record id>","businessObjectType":"MemberPlan"}]}. To get the record ID, open the Cigna Medicare Advantage Plan member plan record that you created earlier and copy the record ID from the URL. Paste the record ID in the <record id> placeholder. For example, 0SqdN0000000ExRSAU is the record ID shown in the screenshot.
              Record ID value is to be copy pasted from the URL.
            3. Turn on Context Mapping and select Context Mapping from Get Mapping Id > Context Mapping Id as the context mapping.
          6. In the Show advanced options section, select Let the flow decide (Recommended) as the transaction control.
          7. Save your changes.

          Assign Service Code

          1. Click Add Elements after the Hydrate data from Member Plan Object and its child nodes element.
          2. Select the Assignment element.
          3. In Label and API Name, enter Assign Service Code.
          4. Under Set Variable Values, add these details.
            1. Click in the Variable field.
            2. Select New Resource from the dropdown.
            3. Select Variable as the resource type.
            4. Enter ServCode as the API name.
            5. Select Text as the data type.
            6. Click Done.
            7. Select Equals as the operator.
            8. Click in the Value field, and select Current Item from Loop Loop_through_Service_Codes.
          5. Save your changes.

          Fetch Expression Set Details

          1. Click Add Elements after the Assign Service Code element.
          2. Select the Action element.
          3. Find and select the Member Plan Status Check-Bre action.
          4. Enter Member Plan Details as the label.
          5. Under Set Input Values for the Selected Action, add these details.
            1. Turn on DateOfService and select Enter Details > Date of Service as the date of service.
            2. Turn on MemberNumberInput and select Enter Details > Member Number.
            3. Turn on Get_MemberPlan_DetailsId select Outputs from Hydrate data from Member Plan Object and its child nodes > Context Id.
            4. Turn on ServiceCode and select ServCode.
          6. Save your changes.

          Assign Output Values

          1. Click Add Elements after the Member Plan Details element.
          2. Select the Assignment element.
          3. Enter Output Values from Expression Set as the label.
          4. Enter OutputValues as the API name.
          5. Under Set Variable Values, add these details.
            1. Click in the Variable field.
            2. Select New Resource from the dropdown.
            3. Select Variable as the resource type.
            4. Enter c_PriorAuthDetermination as the API name.
            5. Select Text as the data type.
            6. Select Allow multiple values (collection).
            7. Click Done.
            8. Select Add as the operator.
            9. Click in the Value field, and select Outputs from Member_Plan_Details > PriorAuthDetermination.
          6. Save your changes.

          Show Results

          1. Click Add Elements after the Output Values from Expression Set element.
          2. Select the Screen element.
          3. Enter Result Screen as the label.
          4. Drag a Display Text component to the Header component.
          5. Enter Results as the API name.
          6. In the text input field, enter Prior Authorization Determination - and click in the Insert a resource field.
          7. Find and select Outputs from Member_Plan_Details > PriorAuthDetermination.
          8. Click Done.
          9. Save your changes.
          10. Click Activate.
           
          Loading
          Salesforce Help | Article