Appearance
Exercise 1: Create a New Service Agent
In this exercise, you will use your new Agentforce skills to create a new agent that you can distribute directly to your customers using Agentforce Service Agents. Creating a new agent is the first step in exposing an agent to your customers.
Step 1: Create a new agent
While the default Agentforce Service Agent is available for you to distribute to your internal Salesforce users, you can also create custom agents that you can use just about anywhere else. Adding a new agent is as simple as clicking a button and adding details.
In the Setup Quick Find, search for and select Agents.
Click +New Agent.
Leave Agentforce Service Agent selected and click Next.
Deselect all of the pre-created topics and click Next.
Set field values as follows:
Field Value Label Coral Cloud Agent
Description This is the Coral Cloud Agent that helps customers learn more about Experiences as well as book sessions.
Role The agent's job is to assist users in navigating and managing bookings for different experiences offered by Coral Cloud Resorts, ensuring a seamless customer service experience by providing accurate information and resolving issues promptly.
Company Coral Cloud Resorts is a fictitious seaside resort that manages guests and their reservations. It offers a rich set of experiences.
Agent user New Agent User Enrich event logs with conversation data True Click Next.
Click Create.
TIP
Each agent has a designated running user and will have access to all of the data and metadata that that user can see. Ensure that you start with a minimum access profile and only give the agent access to the data that it needs.
Step 2: Configure the Coral Cloud Agent
Configure the agent with topics and actions that it can use to support your customers.
In Agent Builder, click on the New drop down and click on New Topic.
Configure the topic as follows:
Field Value Topic Label Customer Experience Support
Classification Description This topic addresses customer inquiries and issues related to booking experiences at Coral Cloud Resorts, including making reservations, modifying bookings, and answering queries about experience details.
Scope The agent's job is to assist users in navigating and managing bookings for different experiences offered by Coral Cloud Resorts, ensuring a seamless customer service experience by providing accurate information and resolving issues promptly.
Instruction If a customer would like more information on Activities or Experiences, you should run the action 'Get Experience Details' and then summarize the results with improved readability. Always ensure you know the customer before running this action.
Click on Next.
Do not select any actions.
Click Finish.
Step 3: Create custom service agent actions
Create custom actions for your agent to access data in Salesforce.
Create the Get Experience Details action
In Agent Builder, select the Customer Experience Support topic.
Click on the This Topic's Actions tab in the topic details.
Click on the New drop down and click on New Action.
Configure the action as follows:
Field Value Reference Action Type Flow
Reference Action Get Experience Details
Agent Action Label Keep default Agent Action API Name Keep default Click Next.
Leave the default instructions in.
Check Require input for the
experienceName
input.Check show in Show in Conversation for the
experienceDetails
output.Click Finish.
Test out the instructions in the Conversation Preview. If prompted that you are about to use Einstein, click on Got It.
Click on the refresh button to reset the conversation.
Enter this prompt in the dialog box:
txtCan you let me know more about the full moon beach party experience?
Create the Get Customer Details action
Click on the New drop down and click on New Action.
Configure the action as follows:
Field Value Reference Action Type Flow
Reference Action Get Customer Details
Agent Action Label Keep default Agent Action API Name Keep default Click Next.
Leave the default instructions in.
Check Require input for both inputs (
email
andmembershipNumber
).Check show in Show in Conversation for the
contactDetails
output.Click Finish.
Create the Get Sessions action
Click New Agent Action.
Configure the action as follows:
Field Value Reference Action Type Flow
Reference Action Get Sessions
Agent Action Label Keep default Agent Action API Name Keep default Click Next.
Leave the default instructions in.
Check Require input for both inputs (
experienceId
andstartDate
).Check show in Show in Conversation for the
sessions
output.Click Finish.
Create the Create Booking action
Click New Agent Action.
Configure the action as follows:
Field Value Reference Action Type Flow
Reference Action Create Booking
Agent Action Label Keep default Agent Action API Name Keep default Click Next.
Leave the default instructions in.
Check Require input for all three inputs (
contactId
,numberOfGuests
, andinstructions
).Check show in Show in Conversation for the
createdBooking
output.Click Finish.
Step 4: Add actions to the Coral Cloud Agent
Click on the Topic Configuration tab in the Topic Details.
Click on the New Instruction Button to create a new instruction, repeat for each of the following instructions:
Field Value Customer Validation Instructions If the customer is not known, you must always ask for their email address and their membership number. Get their Contact record by running the action 'Get Customer Details' before running any other actions.
Session Query Instructions If asked to get sessions for the experience use the 'Get Sessions' action. Ask for the date of the sessions if not provided. Use the Id of the Experience__c from the 'Get Experience Details'.
Create Booking Instructions If asked to book, use the action 'Create Booking'. The Contact__c is the contact ID from the 'Get Customer Details'. The Session__c is the ID of the session from the action 'Get Sessions'. If multiple sessions are present ask to select one of the sessions and use that Session as the ID for the Session__c. Prompt for the Number of Guests and use that for the Number_of_Guests__c
.Click Save.
Test out the instructions in the Conversation Preview. If prompted that you are about to use Einstein, click on Got It.
Enter this prompt:
txtCan you let me know more about the full moon beach party experience?
Press your Return/Enter key and notice the response, asking you to validate your identity before proceeding.
txtMy email address is sofiarodriguez@example.com and my membership number is 10008155
Follow the prompts to create a booking.
Click on Activate to activate the agent.
Summary
You have just created a custom service agent that can be used to interact with your customers. Next, we will use the service deployment capabilities in Service Cloud to deploy the agent to a customer-facing Experience Cloud site.