Loading
Feature degradation | Gmail Email delivery failureRead More
Service
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
          Sample Flow Approval Process for Lightning Knowledge

          Sample Flow Approval Process for Lightning Knowledge

          To help you get started creating your own Flow approval process for articles, here’s an example.

          Required Editions

          Available in Lightning Experience. View supported editions.
          User Permissions Needed
          To view Knowledge Settings in Setup: Knowledge User license
          To open, edit, or create an autolaunched approval orchestration in Flow Builder: Manage Flow, Run Flow, and “Read” access to the Approval Submission object

          This example makes sure that new content is accurate and reviewed by a senior editor, a member from a legal team, and the author’s coach.

          1. Initiate the Flow Approval Process to Get Information from User and Article Records
            Start by collecting the necessary data from the record. This involves setting up a subflow to gather information such as the user ID and record ID. Use this data to fetch additional details like the user’s role and any specific attributes from the Knowledge article.
            • Build a new Flow Orchestration from scratch with the Autolaunched Approval (No Trigger) type.
            • Add a Get Records element for the User object, and filter User records by Field ID equals the Value userID. Don’t sort user records.
            • Store only the first record, and choose to store record data by fields and assign variables (advance).
            • Store fields in separate variables where Field Coach_c equals the Variable coachId and Field UserRoleID equals the Variable roleId.
            • Click Save, then Activate.
          2. Decide Whether the User’s Article Requires Additional Reviews
            Determine the role of the user. If the user is a knowledge writer, you might choose to bypass additional reviews. If the user is a service rep or another role, proceed to the next review stage.
            • Build a new Flow Orchestration from scratch with the Autolaunched Approval Orchestration (No Trigger) type.
            • Add a Stage named Initiate with a background step to get record data, and add a condition to start the step when the stage starts.
            • Select the Flow you created earlier to get record data as the action to run, and set the input values for the action as recordId for knowledgeArticleVersionId and submitter for UserId.
            • Run the Action as the Automated Process User.
            • Click Save.
          3. Assign the Article to a Senior Editor for Review If The User's Role Requires It
            Lock the article record to prevent further edits until the review is complete.
            • Add a Decision element named Author's Role Equals?.
            • Include an Outcome Order of Service Rep with Resource roleDeveloperName equals the Value Service_Rep.
            • Include another Outcome Order of Knowledge Writer, and click Save. Service Rep and Knowledge Writer appear as two separate paths in the flow.
            • Under Service Rep, add a Stage named Senior Editor Review with a condition to complete the stage when all steps have been marked complete, the stage is marked completed. Click Save.
            • In the Senior Editor Review Stage, add a step named Assign to Senior Editors Public Group.
            • Add a condition to the step that when the stage starts, the step starts.
            • Select an Action to run an Approvals Workflow: Evaluate Approvals Request. This is a simple screen flow with an Evaluate Approval Request screen.
            • For the step’s Approver Type, select Group, and then a public group named Senior Editors.
            • Add recordId as the record to approve, and click Lock the record and Allow approver to edit the locked record.
            • Add a condition to complete the step when the assigned user has completed the action, the step is marked completed.
            • Click Save.
          4. Assign the Article to a Legal Review Group
            After the senior editor review, assign the article to a legal reviewers group. Ensure that the legal review step is completed before moving to the next stage.
            • Under the Senior Editor Review Stage, add a Decision element named Senior Editor Approved?.
            • Include an Outcome Order of Yes with a conditions requirement of All Conditions Are Met (AND) and Resource Outputs>approvalDecision equals the Value Approve.
            • Include another Outcome Order of No, and click Save. Yes and No appear as two separate paths in the flow. You might need to add an End element after No.
            • Under Yes and where Knowledge Writer meets in the flow, add a Stage named Legal Review with a condition to complete the stage when all steps have been marked completed, the stage is marked completed. Click Save.
            • In the Stage, add a step named Assign to Legal Reviewers Public Group.
            • Add a condition to the step that when the stage starts, the step starts.
            • Select an Action to run an Approvals Workflow: Evaluate Approvals Request. This is a simple screen flow with an Evaluate Approval Request screen.
            • For the step’s Approver Type, select Group, and then a public group named Legal Reviewers.
            • Add recordId as the record to approve, and click Lock the record and Allow approver to edit the locked record.
            • Add a condition to complete the step when the assigned user has completed the action, the step is marked completed.
            • Click Save.
          5. Publish the Reviewed Article
            Once all necessary reviews are approved, publish the article. Ensure that the approval decision is checked at each stage to confirm that the article can proceed to publication.
            • In the Legal Review Stage, add another step named Publish Article.
            • Add a condition to the step that when specified requirements are met, the step starts.
            • Select All Requirements are Met (AND) to start the step, and add Resource Outputs>approvalDecision equals Value Approve.
            • Select an Action to run a Publish an article. This is a simple autolaunched flow with a Convert to Collection Assignment and Publish Article Action.
            • Set the input values for the action to recordId, and run the action as the Automated Process User.
            • Click Save.
          6. Assign the Article to a Coach for Final Review
            If the article was not generated by AI, assign it to a coach for final review. This step ensures that human-generated content is reviewed by a knowledgeable individual.
            • Under the Legal Review Stage, add a Decision element named Legal Approved?.
            • Include an Outcome Order of Yes with a conditions requirement of All Conditions Are Met (AND) and Resource Outputs>approvalDecision equals the Value Approve.
            • Include another Outcome Order of No, and click Save. Yes and No appear as two separate paths in the flow. You might need to add an End element after No.
            • Under Yes, add a Decision named Article Was Generated By AI?.
            • Include an Outcome Order of No with a conditions requirement of All Conditions Are Met (AND) and Resource Outputs>largeLanguageModel is blank Value True.
            • Include another Outcome Order of Yes, and click Save. Yes and No appear as two separate paths in the flow. You might need to add an End element after Yes.
            • Under No, add a Stage named Coach Review with a condition to complete the stage when all steps have been marked complete, the stage is marked completed. Click Save.
            • In the Stage, add a step named Assign to Coach.
            • Add a condition to the step that when the stage starts, the step starts.
            • Select an Action to run an Approvals Workflow: Evaluate Approvals Request. This is a simple screen flow with an Evaluate Approval Request screen.
            • For the step’s Approver Type, select User Resource, and then Initiate>GetRecordData>Outputs>coachUsername.
            • Add recordId as the record to approve, and select the condition When the assigned user has completed the action, the step is marked complete. Click Save.
            • If not added, include End after the Coach Review Stage.
          7. Set Flow Approvals in Knowledge Settings
            In Approval Settings for Knowledge, select an activated Flow to automate how Knowledge articles are approved when users click Submit for Approval on articles.
            • From Setup, enter Knowledge in the Quick Find box and click Knowledge Settings.
            • On the Knowledge Settings page, click Edit.
            • In Approval Settings, select your Flow approval for articles.
            • Click Save.

          After you build an orchestration, activate it, and then test it to make sure that it’s working as you expect.

           
          Loading
          Salesforce Help | Article