本文是《Superbadge: Advanced Agentforce Flow Administration | Superbadge 高级 Agentforce Flow 管理》的练习操作步骤。阅读原文请见:Superbadge: Advanced Agentforce Flow Administration | Superbadge 高级 Agentforce Flow 管理。
1. Create a Subagent for Equipment Case Management
- Review the Get Store And Asset With Input flow and the CCC Toronto 325 account / Grandioso 7 Espresso Machine asset.
- In agent Brewster, remove the General FAQ subagent; retain Off-topic and Ambiguous Question.
- Create subagent
Equipment Case Management(with a description). - Add action
Get Store and Asset Details(descriptionGets the store (Account) and asset details for the running (logged in) user) associated with the Get Store And Asset With Input flow. - Save and commit.
2. Create a Flow That Gathers Recent Cases
- Create resources: variable
accountInfo(descriptionProvides the Account ID, single Account record) andassetName(descriptionThe name of the equipment associated with the case). - Add a Get Records element
Get Asset(Get_Asset), filtering by accountInfo and assetName. - Add a Get Records element
Get recent 5 cases related to the store, filtering Account ID, Asset ID (from prior element), and Case Type Equipment Malfunction; sort descending by created date, store up to 5 records. - Add a Loop element
Loop Casesand, within it, a Add Prompt Instructions elementCase Prompt Instructionsthat sets Case Subject and Case Description from loop values. - Name the flow
Gather 5 Most Recent Cases(APIGather_5_Most_Recent_Cases) and activate it.
3. Update a Prompt Template with Recent Cases
- In Equipment Repair or Replace Recommendation, set the input values for Store and Equipment to dynamically reference the
Gather 5 Most Recent Casesflow. - Review the EquipmentRecommendationDTO Apex class and EquipmentRecommendation Lightning type; make the template ready for use.
4. Create Equipment Malfunction Cases
- Create an autolaunched flow (callable as an action) with the required variables (Account ID, Asset ID, Description, Subject, Case ID, recommendation, rationale).
- Add a Create Records element
Create Case Record, setting Account ID, Asset ID, Description, Subject, and Case Type Equipment Malfunction, storing the Case ID. - Add Get Records elements
Get Account DetailsandGet Asset Details(filter by the Account/Asset ID variables). - Add a Call Prompt Template element
Get Equipment Recommendation(Equipment Repair or Replace Recommendation), setting Asset and Store inputs. - Add an Assignment element
Set Recommendation and Rationale Valuesmapping recommendation and rationale to the prompt response outputs. - Name the flow
Create Case Brewster(APICreate_Case_Brewster) and activate. - Add action
Create Case(descriptionCreate new case) to the Equipment Case Management subagent, associated with this flow; save and commit.
5. Complete the Approval Flow
- In Approval flow for Regional Manager, add a decision element
Is request Approved or Rejected?after the Regional Manager Approval Stage. - Outcome
Approved(condition: approval decision equalsApproved) and defaultRejected. - Add final action stage
Final Approval Action Stageto the Approved path, with a background stepCreate Task for Store Manager to Order New Machine(start when stage starts, run as Automated Process User). - Add final rejection action stage
Final Rejection Action Stageto the Rejected path, with a background stepCreate Task for Store Manager for Service Request. - Add action
Approval flow for Regional Manager(descriptionSubmitting Approval Request to Regional Manager) to the Equipment Case Management subagent; save and commit.