Service Agent Customization with Prompts, Flows and Actions — 服务代理自定义(练习操作步骤)

《Service Agent Customization with Prompts, Flows and Actions — 服务代理自定义》的分步练习操作指南。...

📅 2026/10/2 ✍️ ponybai 🏷️ agentforce, prompt builder, flow, salesforce

本文是《Service Agent Customization with Prompts, Flows and Actions — 服务代理自定义》的练习操作步骤。阅读原文请见:Service Agent Customization with Prompts, Flows and Actions — 服务代理自定义。

1. Get the Org Ready and Update Details

  1. Click the Setup icon and select Setup. The Setup page opens in a new tab.
  2. In the Setup Quick Find, search for and select Salesforce Go.
  3. In the Search features... textbox, enter and select Agentforce Studio.
  4. Click Get Started.
  5. Click Turn On.
  6. Click Confirm.

2. Update User Details

  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 to Einstein Agent User.
  5. Click Save.

3. Improve a Prompt Template

  1. In the Setup Quick Find, search for and select Prompt Builder.
  2. Scroll down and select the prompt named Generate Personalized Schedule.
  3. Enter this text: Your name is . You work in the guest success team at .
  4. Place your cursor before the first period after the word *is*. Click + Insert Resource and select Current User > First Name.
  5. Place your cursor after User.FirstName, click the spacebar to add a space. Click + Insert Resource and select Current User > Last Name.
  6. Place your cursor before the second period after the word *at*. Click + Insert Resource and select Current User > Company Name.
  7. Find the line starting with "Present the list of". Delete Present and replace with Always introduce yourself with your full name, then present.
  8. Find the line: Tell the guest to reach out if they'd like to book any of these activities. Put cursor at end, press Enter, and add: Information about the guest is here:
  9. Place cursor after "here:", press spacebar, click + Insert Resource and select Contact > Record Snapshot.
  10. Press Enter, then enter: Use this information about the guest. Use a casual style of writing.

### Test the Prompt

  1. Click the Preview Settings icon to expand the Preview Settings section.
  2. In the Contact box, search for and select Sofia Rodriguez.
  3. Click Save & Preview.
  4. Review the Response section to see how the prompt template affects the test response.

4. Update the Prompt Template Model

  1. In Prompt Builder, click the Template Settings icon to open the Template Settings section.
  2. Expand the Inputs section and ensure the Model Type is set to Standard.
  3. Select OpenAI GPT 4 Omni Mini from the Models dropdown menu.
  4. Click the Preview Settings icon and ensure Sofia Rodriguez still appears in the Contact box. Ensure Response Language is English.
  5. Click Save & Preview.
  6. Click the Template Settings icon, then click View this model in the Model section to open the AI Models editor.
  7. Click Edit.
  8. In the Model Configuration side panel, select Create model radio button.
  9. Change the Temperature to 0.3 by moving the slider. Leave other settings as is.
  10. Enter this prompt: Write a 200-word article about how surfing got started. Include specific facts, people, and dates. Click Generate to test.
  11. Click Save.
    • Name: Business Writing
    • Description: This model will be less creative, and therefore should hallucinate less.
    • Select Create Model.
  12. After creating the model, click Close.

### Test the Model

  1. If the Generate Personalized Schedule prompt is not still open, go to Setup > Prompt Builder > select Generate Personalized Schedule.
  2. Ensure the Template Settings section is open. Set Model Type to Custom.
  3. Ensure Business Writing is selected in the Model dropdown.
  4. Click Save.
  5. Click the Preview Settings icon. In Contact box, search for Sofia Rodriguez. Click Preview.
  6. Click Activate.
  7. Click the back arrow to return to Setup.

5. Update the Get Experience Details Flow

  1. In the Setup Quick Find, search for and select Flows.
  2. Scroll down and select the flow named Get Experience Details.
  3. Click the Get Experience by Name element.
  4. On the right, scroll down and click Add Field.
  5. In the Field box, enter price, then select Price__c from the list.
  6. Click the Assign Experience Record element (close the AI assistant if needed).
  7. Change the Description to: Assign an Experience__c record for presentation back to the user with details about the requested experience.
  8. Click Save As New Version then click Save.
  9. Click Activate.
  10. Click the back arrow in Flow Builder to return to Setup.

6. Update the Corresponding Agent Action

  1. Click Setup icon and select Setup.
  2. In the Setup Quick Find, enter and select Agentforce Assets.
  3. Click the Actions tab.
  4. Select the Get Experience Details action.
  5. Scroll down to Output, click the pencil icon next to the instructions for the output variable experienceRecord.
  6. Enter the new instructions: Assign an Experience__c record for presentation back to the user with details about the requested experience.
  7. Click Save.

7. Import a New Agent with Agent Builder

  1. Click the App Launcher icon, search for and select Agentforce Studio.
  2. Click the down arrow next to New Agent and select New from Script.
  3. Paste in the provided Agent Script.
  4. Click Create Agent.
  5. If necessary, click Service Agent Coral Cloud to open the agent.
  6. Click Save (upper right corner).
  7. In the Assign a user record section, select Select User.
  8. Click Search users… and select EinsteinServiceAgent User.
  9. Click Save.

8. Update the Topic Instructions

  1. In the AI assistant in the Agentforce pane on the right, enter:

Add two additional instructions to the Customer Experience Support subagent: 1.If asked about an experience Name, Description, Activity Level, Type or Price, then call {!@actions.Get_Experience_Details}. 2.If asked to recommend experiences that a user might be interested in, use {!@actions.Generate_Personalized_Schedule} to generate a schedule based on the contacts interests. Use the contact record from {!@actions.Get_Customer_Details} and pass it into the Contact input.

  1. Click Accept All.
  2. Click Save.
  3. Click Commit Version and then click Commit Version again to confirm.
  4. Click Activate and then click Activate again to confirm.

9. Test the Updates

  1. Click the Preview tab.
  2. Click the Live Test Mode dropdown at the top and select Simulate Mode. Click Switch.
  3. Enter: Tell me more about the Guided Nature Walk. (Note: Price is now included in the response.)
  4. Enter: book 2 people for a Guided Nature Walk for tomorrow and pick a time to complete the booking.
  5. Enter: I am sofiarodriguez@example.com and my membership number is 10008155.
  6. Enter: Can you generate a personalized schedule of experiences for today?