This Badge Requires a New Custom Agentforce Playground
You’ll have limited time to complete this badge and any other badge requiring a Agentforce Playground. If you run out of time, you’ll lose access to this Playground and may need to start over.
Update a Flow, Agent Action, and Topic
Beyond prompt template customizing, Coral Cloud Resorts needs additional information added to its agent, which requires adjustment to flows, actions, and topics. As it pertains to agents, topics are categories of actions related to particular jobs to be done—these actions dictate what agents do. Actions can be based on flows, prompt templates, and more.
Basically, topics contain actions, and actions can use flows to execute tasks. And even after topics, actions, and flows are initially created and connected, they can always be edited or updated.
Update the Get Experience Details Flow
A flow can be triggered by an agent when it needs to retrieve some information. That means the agent uses this flow when it needs it. The Get Experience Details flow currently returns details about Coral Cloud Resorts experiences, but not the price of the experience. Here’s how to fix that.
- In the Setup Quick Find box, search for and select Flows.
- Scroll down and select the flow named Get Experience Details.
- Click the Get Experience by Name element.
- Click Edit Element.
- On the right, scroll down to the bottom of the page and click the Add Field button.
- In the Field box, enter
price
, then select Price_c from the list.
- Click on the Assign Experience Record element.
- Click Edit Element.
- Change the description to:
Assign an Experience__c record for presentation back to the user with details about the requested experience.
- Click Save As New Version then click Save in the Save As dialog box.
- Click Activate.
- Click the back arrow in Flow Builder to get back to Setup.
Update the Corresponding Agent Action
The Get Experience Details flow is updated, so the corresponding agent action now needs to be updated.
- In the Setup Quick Find, enter and select Agent Actions.
- Select the Get Experience Details action.
- Scroll down to the green box, click the pencil icon next to the instructions for the output variable called experienceRecord.
- Enter the new instructions:
Assign an Experience__c record for presentation back to the user with details about the requested experience.
- Click Save.
Update the Customer Experience Support Topic
The topic needs to know what details it can get from the action. Adding instructions to the topic makes that happen.
- In the Setup Quick Find, enter and select Agents.
- Select the Coral Cloud Experience Agent.
- Select Open in Builder.
- Ensure the agent is deactivated. If the button in the upper right says Deactivate, click it to deactivate the agent.
- Select the Customer Experience Support topic.
- Scroll down and click the Add Instructions button. This adds a sixth instruction textbox.
- Add the new instruction:
If asked about an experience’s Name, Description, Activity Level, Type or Price, then call the Get_Experience_Details action.
- Click Save.
Add the Generate Personalized Schedule Action
One last task. The agent needs the Generate Personalized Schedule action added to Customer Experience Support topic. This action uses the Generate Personalized Schedule prompt template that was customized earlier.
- Click Customer Experience Support topic.
- Click This Topic’s Actions.
- Click New and then select Add from Asset Library.
- Select the checkbox next to Generate Personalized Schedule. Note: This action is based on the Generate Personalized Schedule prompt that you edited earlier.
- Click Finish.
- Click Activate above the Conversation Preview.
Test the Updates
Now that the flow, action, and topic have been updated, you can see all the moving parts of the agent in action.
- Click the refresh icon at the top of the Conversation Preview.
- Enter this prompt to get it started:
Can you generate a personalized schedule of experiences for me?
- After the agent responds, enter the next prompt:
I am sofiarodriguez@example.com and my membership number is 10008155
.
The Output on the Generate Personalized Schedule includes Sofia’s name, because it’s already come back from the LLM through the Einstein Trust Layer, and it has been de-masked.
- Pick one of the presented resort activities and ask for more details. For example:
Tell me more about white water rafting.
Note: Price is now included in the response because the price field was added to the Get Experience Details flow.
Prompts, prompt templates, models, topics, actions, flows—all these features customize the agent to meet Coral Cloud Resorts’ unique needs. Their agent can now provide quick, personalized responses and answer routine inquiries.
It’s only fitting to prompt AI to summarize everything covered in these two steps:
Prompt: Summarize this Trailhead project.
Response: By following these steps, the Coral Cloud Resorts agent can better manage customer interactions autonomously, retrieve accurate resort information, and handle a wide range of inquiries. This enhances customer service efficiency, providing quick and consistent responses while reducing the workload on human agents.