Appearance
Exercise 3: Extend with Standard Actions
In this exercise, you will extend the Customer Service Agent with Topics and Actions to give it broader access to Salesforce data.
Step 1: Create a new Topic
Open the Setup Menu and click Setup.
In the quick find, search for Agents and click Agentforce Agents (under Agent Studio).
In the list of agents (at the bottom of the screen), click Customer Service Agent (it's the only item in the list).
Click Open in Builder (upper right corner).
Once in the Agentforce Builder, Click Deactivate to deactivate the agent.
Now, let's create a new topic to handle Customer Service Tasks. Click the arrow down icon next to Manage the topics assigned to your agent, and select New Topic.
Agentforce will now use AI to help you scaffold a topic. Paste the following prompt into the What do you want this topic to do? (Optional) field to generate the topic details:
txtAct as a Hotel Customer Service Assistant who supports a Customer Service Representative in helping guests with any inquiries related to the resort. This includes tasks such as managing reservations, answering questions about experiences, summarizing records, querying and updating data, and drafting or refining emails.
Add one more instruction to the topic:
txtNever ask the user for an ID. Instead, ask for a record that's relevant.
Click Next.
Check the checkbox to the left of Agent Action that you would like to select and add the following actions:
- Draft or Revise Email
- Get Record Details
- Identify Object by Name
- Identify Record by Name
- Query Records
- Query Records with Aggregate
- Summarize Record
- Update Record
Click Finish.
Step 2: Explore the Standard Actions in Agentforce Builder
Refresh the Conversation Preview.
Enter the following prompt:
txtDo I have any high priority cases open?
Examine the plan in the middle of the screen. The plan is the iterative process by which the Agentforce reasoning engine determines how to complete the requested task. When you enter a prompt, the reasoning engine evaluates available actions and decides on the next step. This might involve executing an action or asking for more information. The reasoning engine then assesses the results and repeats this process until the original request is fulfilled. For this simple request, the reasoning selected the CustomerServiceAgent topic, used the Query Records standard action, and provided the response. For more complex requests, the reasoning engine may execute multiple actions.
Agents have the ability to select records out of the response and can future summarize them, enter the following prompt:
txtCan you summarize the first case for me?
To perform this task, the reasoning engine selected the Summarize Record standard action.
It can also continue the conversation but pulling out specific record types, enter the following prompt:
txtCan you give me an overview of the contact?
To perform this task, the reasoning engine selected the Get Record Details standard action.
As a customer service rep, you can also draft an email to the customer and include the context of the conversation, enter the following prompt:
txtCan you draft an email to the contact about their case and let them know we will do everything in our power to resolve the issue?
To perform this task, the reasoning engine selected the Draft or Revise Email standard action.
Agents also have the ability to aggregate data. Enter the following prompt:
txtHow many contacts do we have in the state of Minnesota?
To perform this task, the reasoning engine selected the Query Records with Aggregate standard action.
Summary
The pre-built standard actions are a great starting point, but the true power of Agentforce lies in agent customization. Leveraging your existing Salesforce skills, you can extend agents with custom actions. You can create three types of custom actions:
- Flow actions
- Apex actions
- Prompt Template actions
You'll create each type of action in the following exercises.