Skip to main content

Get Agent-Ready

Learning Objectives

In this project you’ll:

  • Improve a prompt template.
  • Use Einstein Studio to configure the agent model.
  • Update a flow for an agent to use.
  • Customize topics and actions for a service agent.

As Coral Cloud Resorts becomes more and more popular as a vacation destination, support cases on its website are increasing significantly. Customers interested in its new beach resort activities need lots of assistance—especially during the peak holiday seasons. This puts a strain on the customer service team, leading to longer response times and lower customer satisfaction.

Conscious of the cost and ramp time for seasonal service representatives, Coral Cloud Resorts is using Agentforce for Service to help. The team at Coral Cloud Resorts is enabling Agentforce for Service in their Salesforce org, but they need to further customize the agent to better fit their unique needs.

Get the Org Ready and Update Details

Before Coral Cloud admins can start customizing its agent, the team enables all the required org features. Here’s what they do.

  1. Click Setup and select Setup. The Setup page opens in a new tab.
  2. In the Setup Quick Find box, search for and select Einstein Setup.
  3. Ensure the Turn on Einstein toggle is set to On.
  4. Refresh your browser to reload Setup.
  5. In the Setup Quick Find, search for and select Agentforce Agents.
  6. At the top of the Agents page, click the Agentforce toggle, and ensure it is set to On.

Agentforce toggle set to On.

  1. Click the Enable the Agentforce (Default) Agent toggle, and ensure it is set to On.

Enable the Agentforce Agent toggle set to On.

Update User Details

The company name is used later in a prompt, so now is a good time to update it.

  1. In the Setup Quick Find, search for and select Users.
  2. Select the Edit action next to the EinsteinServiceAgent User.
  3. Update Company to Coral Cloud Resorts.
  4. Update the Profile for this user to Einstein Agent User.
  5. Leave everything else as-is.
  6. Click Save.

Improve a Prompt Template

Coral Cloud has an existing prompt template that needs to be refined.

  1. In the Setup Quick Find, search for and select Prompt Builder.
  2. Scroll down and select the prompt with the name Generate Personalized Schedule.
  3. In the Prompt Template Workspace, move your cursor to the very beginning of the prompt. Click enter/return to add a blank line to the beginning of the prompt.
    • Enter this text: Your name is . You work in the guest success team at .
    • Place your cursor before the first period after the word is.
    • Click + Insert Resource and select Current User > First Name.
    • Place your cursor after User.FirstName and click the spacebar to add a space.
    • Click + Insert Resource and select Current User > Last Name.
    • Place your cursor before the second period after the word at.
    • Click + Insert Resource and select Current User > Company Name.
  4. Find the line just below the username variables, which starts with “Present the list of”.
  5. Delete Present the list of and replace with Always introduce yourself with your full name, then present the list of
  6. Review the newly updated section of the prompt:

Your name is User.FirstName User.LastName. You work in the guest success team at User.CompanyName.

Always introduce yourself with your full name, then present the list of resort activities happening today that match the guest's interests.

  1. Find the line near the bottom that says: Tell the guest to reach out if they’d like to book any of these activities.

Tell the guest to… line highlighted.

  1. With your cursor at the end of that line after the word “activities.”, press enter/return to add a blank line.
  2. Enter this text: Information about the guest is here:
  3. With your cursor at the end of that line after “here:”, press spacebar to add a blank space, and then click + Insert Resource and select myContact > Record Snapshot. (The list is not alphabetical.)

Record Snapshot selected.

  1. Press enter/return to add a blank line after the RecordSnapshot. Enter this text:
    Use this information about the guest, but do not address the contact by pronoun or assume their gender if you don't have data. Use a casual style of writing.
  2. The updated section of the prompt should look like this:

Information about the guest is here: Record Snapshot: myContact

Use this information about the guest, but do not address the contact by pronoun or assume their gender if you don’t have data. Use a casual style of writing.

List of activities happening today that match the guest’s interests:

Apex: PersonalizeGuestExperiences

Test the Prompt

  1. Click the Preview Settings icon Preview Settings icon highlighted to expand the Preview Settings section.
  2. In the Contact box, search for and select Sofia Rodriguez.
  3. Click Save & Preview Preview button highlighted to see the Generated Response.
  4. Review the Response section to see how the prompt template affects the test response. Feel free to toggle the Preview Languages to review the response in various languages. Just return the language back to English when you’re done.

Update the Prompt Template Model

The leadership at Coral Cloud Resorts wants the agent to have a more predictive response than it does now. They can use the Prompt Template model to control tone/style, point of view, ethical considerations, and so on, of the agent’s response. The model can be modified using the Einstein Studio.

  1. While still in Prompt Builder, click the Properties icon to open the Template Settings section.
  1. Expand the Inputs section and ensure the Model Type is set to Standard.
  2. Select GPT 4 Omni Mini from the Models dropdown menu.

OpenAI GPT 4 Omni Mini model selected.

  1. Click the Preview Settings icon, ensure Sofia Rodriguez still appears in the Contact box.
  2. Ensure the Preview Language is set to English.
  3. Click Save & Preview. Notice that the response is slightly different than before.
  4. Click the Properties icon.
  5. Click View this model in the Model section to open the Einstein Studio.

View this model link highlighted in the Configuration panel.

  1. With the Einstein Studio open, click the Edit button.
  2. In the Model Configuration side panel, select the Create model radio button.
  3. Change the Temperature to 0.3 by moving the dot on the slider. Leave all other settings as-is.

The Model configuration showing Create Model selected and the Temperature set to 0.3.

Note

Changing the Temperature setting on an LLM (large language model) model affects the randomness of the generated responses. A lower temperature value (closer to 0) makes the model’s output more deterministic and focused, meaning it produces more predictable and repetitive responses. Conversely, a higher temperature value (closer to 1) increases the randomness and creativity of the responses, making them more diverse and less predictable.

  1. To see a sample of this writing, enter this prompt: Write a 200-word article about how surfing got started. Include specific facts, people, and dates.
  2. Click Generate. Feel free to test the surfing prompt with different temperatures to see the difference in writing style output. Make sure the temperature is set back to 0.3 before saving.
  3. Click Save. Note: The model is being saved, not the example prompt. The 200-word article about surfing was created to give a sense of the writing style this model produces.
  4. Enter this information:
    • Name: Business Writing
    • Description: This model will be less creative, and therefore should hallucinate less.
  5. Select Create Model.
  6. After you create your new model, click Close.

Close button highlighted.

Test the Model

Time to experience the updated model settings in Prompt Builder.

  1. If the Generate Personalized Schedule Prompt Template is not still open in another tab, click the Setup icon and select Setup.
  2. In the Quick Find, search for and select Prompt Builder.
  3. Select the Generate Personalized Schedule prompt.
  4. Ensure the Template Settings section is open.
  5. In the Model settings section, select the Model Type dropdown list.
  6. Select Custom.
  7. Ensure Business Writing is selected in the Model dropdown.

Model Type set to Custom and Models set to Business Writing.

  1. Click Save.
  2. Click Preview Settings.
  3. In the Contact box, search for and select Sofia Rodriguez.
  4. Click Preview. Review the phrasing and structure of the response as it changes when the Model Type is updated. Note that the response is now more business-like due to the model settings.
  5. Click Activate.
  6. Click the back arrow to return to Setup.

back arrow highlighted.

Now the agent is enabled for Coral Cloud Resorts, the prompt template is improved, and there’s a new business writing model. In the next unit, all of these features come together to enhance the actions that the agent can execute.

Share your Trailhead feedback over on Salesforce Help.

We'd love to hear about your experience with Trailhead - you can now access the new feedback form anytime from the Salesforce Help site.

Learn More Continue to Share Feedback