0% found this document useful (0 votes)
459 views13 pages

Get Started with Agentforce-Exercise-Guide

Uploaded by

vasireddysrk92
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
459 views13 pages

Get Started with Agentforce-Exercise-Guide

Uploaded by

vasireddysrk92
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

We love feedback!

Get Started with Agentforce

EXERCISE GUIDE
EXERCISE GUIDE
Get Started with Agentforce

Log in to Salesforce

Instructions:

1. Navigate to the Salesforce login page.


a. Open Google Chrome or another internet browser.
NOTE: Google Chrome is recommended.
b. Enter https://login.salesforce.com into the browser’s address bar.
c. Press Enter.
2. Log in using the username and password provided to you by your instructor.

Optionally, open the related Quip document at http://sfdc.co/viwcopypaste for this session to
find text that you can copy and paste as you complete the exercises.

© Copyright 2024 salesforce.com, inc. All rights reserved. 1


EXERCISE GUIDE
Get Started with Agentforce

Exercise 1: Get Started with Agents

Instructions:

Task 1: Enable Einstein Features

1. Open Setup from the Setup menu at the top right.


2. Enable Einstein:
a. Use Quick Find to locate and open Einstein Setup.
b. Verify that Einstein is turned on. If not, toggle the Turn on Einstein slider to On.
c. Refresh your browser page if you had to turn it on.
3. Enable Agents (formerly Einstein Copilot):
a. Use Quick Find to locate and open Agents.
b. Verify that Agents is turned on. Toggle the Einstein Copilot for Salesforce slider to
On.
4. Configure the agent with a standard topic and activate.
a. In the list of agents at the bottom of the screen, select Einstein Copilot.
b. Select Open in Builder.
c. Assign the standard topic to the agent.
i. Verify the agent is deactivated. If not, deactivate it.
ii.
Verify the Topics section of the sidebar is open.
iii.
Open the dropdown menu (down arrow). It is located above the Search
topics… field and to the right.
iv. Select Add from Asset Library.
v. Locate General CRM and check its box.
vi. Select Finish.
vii. Select the Activate button to activate the agent.
viii. Refresh the page
5. Review the actions in the agent.
a. Open the Actions sidebar by selecting .
b. Note the standard actions assigned to the agent. These actions power the default
capabilities of Einstein Agent.
c. Select the back arrow button to leave Agent Builder and return to Setup.

© Copyright 2024 salesforce.com, inc. All rights reserved. 2


EXERCISE GUIDE
Get Started with Agentforce

Task 2: Explore Standard Actions in an App

1. Use the App Launcher to open the Coral Cloud App.

2. Select the Einstein icon in the upper-right corner to open the Einstein sidebar.
Note: If you don’t see the Einstein icon, refresh the browser.
3. Enter the following utterance in the Einstein sidebar to check for high priority cases:
Are there any high priority cases open?

4. Enter the following utterance to learn more about the case:


Can you summarize the first case?

5. Enter the following utterance to learn more about the customer:


Can you give me an overview of the contact?

6. Enter the following utterance to see how many contacts there are in Minnesota:
How many contacts do we have in the state of Minnesota?

Task 3: Explore Standard Actions in the Agent Builder

1. In Setup, use Quick Find to locate and open Agents.


2. Select Einstein Copilot in the list of agents.
3. Select Open in Builder.
4. View the standard actions used to execute your prompts in the Dynamic Plan panel.
a. Observe how Einstein uses the Query Records action (that it selects from the
EmployeeCopilot_GeneralCRM topic) by entering the following utterance:
Are there any high priority cases open?
b. Observe how Einstein uses the Get Record Details action (that it selects from the
EmployeeCopilot_GeneralCRM topic) by entering the following utterance:
Can you summarize the first case?
c. Determine what Einstein does when you enter the following utterance:
Can you give me an overview of the contact?

i. What topic was selected?


ii. What action was selected?
d. Observe how the agent uses the Query Records with Aggregate action (that it
selects from the EmployeeCopilot_GeneralCRM topic) by entering the following
utterance:
How many contacts do we have in the state of Minnesota?
5. Select the back arrow button to return to Setup.

© Copyright 2024 salesforce.com, inc. All rights reserved. 3


EXERCISE GUIDE
Get Started with Agentforce

Exercise 2: Extend the Agent with a Flow Action

Instructions:

Task 1: Create the Agent Flow Action

1. From Setup, open Agent Actions.


2. Select + New Agent Action.
3. Configure the action as follows:
a. Reference Action Type: Flow
b. Reference Action: Issue Resort Credit
c. Copilot Action Label: [keep default]
d. Copilot Action API Name: [keep default]
e. Select Next.
f. Leave the default instructions in.
g. Check Require Input for the amount.
h. Under the the Output section on right side for creditId, Select the checkbox- Show
in conversation
4. Select Finish.

Task 2: Add the Action to the Agent

1. From Setup, open Agents.


2. Select Einstein Copilot in the list of agents.
3. Select Open in Builder.
4. Deactivate the agent to add your new custom action. Select OK.
5. Create a new topic and add the agent flow action to that topic.
a. With the Topics sidebar open, remove the MigrationDefaultTopic topic by selecting
the dropdown arrow next to it and selecting Remove from Agent.
b. Select New Topic in the dropdown menu next to the Search topics… field.
c. Configure the topic as follows:

© Copyright 2024 salesforce.com, inc. All rights reserved. 4


EXERCISE GUIDE
Get Started with Agentforce

Field Value

Topic Label Experience Management

This topic addresses customer inquiries and issues


Classification related to booking experiences at Coral Cloud Resort,
Description including making reservations, issuing resort credits,
and answering queries about experience details.

The agent's job is to assist users in navigating and


managing bookings and refunds for different
Scope experiences offered by Coral Cloud Resort, ensuring a
seamless customer service experience by providing
accurate information and resolving issues promptly.

When a user asks for an issue of resort credit, use


Instruction the Issue Resort credit action in the topic Experience
Management to issue the resort credit.

d. Select Next.
e. Add the Issue Resort Credit action by checking its box.
f. Add the Identify Record by Name action by checking its box.
g. Select Finish.
6. Activate the agent.
7. Click the back arrow to exit the Builder.

Task 3: Test the action

1. Test in the Coral Cloud App.


a. Use the App Launcher to open the Coral Cloud App.
b. Navigate to the contact record for Sofia Rodriguez.

c. Open the Einstein Copilot by selecting the Einstein icon .


d. Enter the following utterance:
Issue $100 resort credit to this contact
e. Go to the Related tab and scroll down to Credits. Verify the resort credit you just
issued is there.
f. Remove the credit by going to the dropdown arrow next to it and selecting Delete.
g. Copy Sofia’s Contact Id in the url to use in the next step.
2. Test the action in the Agent Builder.
a. From Setup, open Agents.
b. Select the Einstein Copilot in the list of agents.

© Copyright 2024 salesforce.com, inc. All rights reserved. 5


EXERCISE GUIDE
Get Started with Agentforce

c. Select Open in Builder.


d. Enter the following utterance:
Issue $250 resort credit to [Sofia contactId]
i. What topic was selected?
ii. What action was selected?

© Copyright 2024 salesforce.com, inc. All rights reserved. 6


EXERCISE GUIDE
Get Started with Agentforce

BONUS Exercise 3: Extend Agent with an Apex Action

Task 1: Create the Apex Class

1. From Setup, go to Apex Classes.


2. Select New.
3. Enter the following code and then Save the file:

public with sharing class CheckWeather {


@InvocableMethod(label='Check Weather' description='Check weather at
Coral Cloud Resort at a specific date')
public static List<WeatherResponse> getWeather(List<WeatherRequest>
requests) {
// Retrieve the date for which we want to check the weather
Datetime dateToCheck = (Datetime) requests[0].dateToCheck;
WeatherService.Weather weather =
WeatherService.getResortWeather(dateToCheck);
// Create the response for Copilot
WeatherResponse response = new WeatherResponse();
response.minTemperature = weather.minTemperatureC;
response.maxTemperature = weather.maxTemperatureC;
response.temperatureDescription = 'Temperatures will be between ' +
weather.minTemperatureC + '°C ('+ weather.minTemperatureF +'°F) and ' +
weather.maxTemperatureC + '°C ('+ weather.maxTemperatureF +'°F) at Coral
Cloud.';
return new List<WeatherResponse>{ response };
}
public class WeatherRequest {
@InvocableVariable(required=true description='Date for which we want to
check the temperature. The variable needs to be an Apex Date type with
format yyyy-MM-dd.')
public Date dateToCheck;
}
public class WeatherResponse {
@InvocableVariable(description='Minimum temperature in Celsius at Coral
Cloud Resort location for the provided date')
public Decimal minTemperature;
@InvocableVariable(description='Maximum temperature in Celsius at Coral
Cloud Resort location for the provided date')
public Decimal maxTemperature;
@InvocableVariable(description='Description of temperatures at Coral
Cloud Resort location for the provided date')
public String temperatureDescription;
}
}

© Copyright 2024 salesforce.com, inc. All rights reserved. 7


EXERCISE GUIDE
Get Started with Agentforce

Task 2: Create the Agent Action

1. From Setup, open Agent Actions.


2. Select + New Agent Action.
3. Configure the action as follows:
a. Reference Action Type: Apex
b. Reference Action: Check Weather
c. Copilot Action Label: [keep default]
d. Copilot Action API Name: [keep default]
e. Select Next.
4. Notice that the instructions fields are pre-filled based on the descriptions provided in the
Apex code.
5. Check Collect data from user for the input dateToCheck.
6. Check Show in conversation for the temperatureDescription output.
7. Select Finish.

Task 3: Add the Action to the Agent

1. From Setup, go to Agents.


2. Select Einstein Copilot in the agent list.
3. Select Open in Builder.
4. Deactivate the agent. Select OK.
5. Add the action to the Experience Management topic.
a. Select Edit from the dropdown menu next to the topic Experience Management.
b. Go to the This Topic’s Actions tab.
c. Select the plus sign button to add the action.
d. Check the Check Weather action and then select Finish.
e. Go to the Topic Configuration tab.
f. Update the topic configuration with the following:

© Copyright 2024 salesforce.com, inc. All rights reserved. 8


EXERCISE GUIDE
Get Started with Agentforce

Field Value

This topic addresses customer inquiries and issues


related to booking experiences at Coral Cloud Resort,
Classification
including making reservations, issuing resort credits,
Description and answering queries about experience details and
providing weather information.

Scope Leave as-is

New Instruction No new instructions are needed

g. Select Save.
6. Activate the Copilot.
7. Test it.
a. In the Conversation Preview panel, enter the following prompt:
Check weather at Coral Cloud Resort for tomorrow
b. Now try for the specific date

Check weather at Coral Cloud Resort for [Enter Tomorrow's Date]

Check weather at Coral Cloud Resort for 2024-10-04

© Copyright 2024 salesforce.com, inc. All rights reserved. 9


EXERCISE GUIDE
Get Started with Agentforce

BONUS Exercise 4: Extend Agent with a Prompt Template Action

Task 1: Create the Flex Prompt Template

1. In Setup, locate and open Prompt Builder.


2. Select New Prompt Template and configure a new Flex Prompt Template based on guest
contact records:
a. Prompt Template Type: Flex
b. Prompt Template Name: Generate Personalized Schedule
c. API Name: [this is auto-filled, leave as default]
d. Template Description:
Generates a personalized schedule that includes the time and
location of resort experiences that are available today, and
that match the guest's interests.
e. Source Name: Contact
f. API Name: myContact
g. Source Type: Object
h. Object: Contact
i. Select Next.
3. Add the following into the Prompt Template Workspace:
Your name is {!$User.FirstName}. You work in the guest success team
at {!$Organization.Name}.
Introduce yourself, then present the list of resort activities
happening today that match the guest's interests.
For clarity, use a bullet list.
For each activity, include name, time, location and duration on a
single line. Do not include the date.
Tell the guest to reach out if they'd like to book any of these
activities.
List of activities happening today that match the guest's interests:
4. In the Preview panel, verify the Resolution is enabled.
5. Select Sofia Rodriguez in the Contact field.
6. Select Save & Preview.
7. Review and activate.
a. In the Resolution panel, review the prompt that was generated.
b. In the Response panel, review the response.
c. Activate the prompt template.
8. Select the back arrow to return to Setup.

© Copyright 2024 salesforce.com, inc. All rights reserved. 10


EXERCISE GUIDE
Get Started with Agentforce

Task 2: Create the Agent Action

1. In Setup, open Agent Actions.


2. Select New Agent Action, and configure the action as follows:
3. Enter the following:
a. Reference Action Type: Prompt Template
b. Reference Action: Generate Personalized Schedule
c. Copilot Action Label: [keep default]
d. Copilot Action API Name: [keep default]
e. Select Next.
4. For the Copilot Action instructions, enter the following:
This action is used to generate a personalized schedule for a
contact. The personalized schedule includes a list of resort
experiences the contact may be interested in and a suggested schedule
for the day. You must use the QueryRecords action to fetch the contact
before executing the action.
5. For the Input instructions, enter the following:
Contact for which the personalized schedule should be generated. Must
be a valid JSON representing the contact info, chained from having
executed the QueryRecords action.
6. For the Prompt Response Output, check Show in conversation.
7. Select Finish.

Task 3: Add the Action to the Agent

1. From Setup, open Agents.


2. Select Einstein Copilot in the Agent list.
3. Select Open in Builder.
4. Deactivate the agent.
5. Add the action to the Einstein Copilot Agent.
a. Select Edit from the dropdown menu next to the topic Experience Management.
b. Go to This Topic’s Actions and select the plus sign.
c. Check the Generate Personalized Schedule action and then select Finish.
d. Go to the Topic Configuration tab.
e. Update the topic configuration with the following:

© Copyright 2024 salesforce.com, inc. All rights reserved. 11


EXERCISE GUIDE
Get Started with Agentforce

Field Value

This topic addresses customer inquiries and issues


related to booking experiences at Coral Cloud Resort,
Classification including making reservations, issuing resort credits,
Description and answering queries about experience details,
generating personalized schedules, and providing
weather information.

Scope Leave as-is

New Instruction No new instructions are needed

6. Select Save.
7. Activate the agent.
8. Test in the Action Builder Conversation Preview.
a. Refresh the conversation preview panel.
b. Enter the following prompt in the Conversation Preview:
Generate a personalized schedule for contact named Sofia
Rodriguez

© Copyright 2024 salesforce.com, inc. All rights reserved. 12

You might also like