Agent Customization with Apex | 用 Apex 定制 Agent(练习操作步骤)

《Agent Customization with Apex | 用 Apex 定制 Agent》的分步练习操作指南。...

📅 2026/10/2 ✍️ ponybai 🏷️ agentforce, salesforce, ai

本文是《Agent Customization with Apex | 用 Apex 定制 Agent》的练习操作步骤。阅读原文请见:Agent Customization with Apex | 用 Apex 定制 Agent。

1. Build an Apex Agent Action

  1. Open the App Launcher and select Agentforce Studio.
  2. Click Agent Customization, then New Version.
  3. Under Subagents, select Answer Weather Questions.
  4. Under Actions Available For Reasoning, click Select action → Create a custom action.
  5. Action Name: Check Weather; Description: This action will return the local weather information.
  6. Reference Action Type Apex, Category Invocable Method, Reference Action Check Weather.
  7. Click Create and Open.
  8. Ensure dateToCheck has Require input to execute action checked.
  9. For the temperatureDescription output, check Show in conversation.
  10. Click Save, then Commit Version twice, then Activate twice.

2. Test the Agent

  1. In Agentforce Builder, click Preview (Live Test Mode).
  2. Enter What's the weather like this Monday? and press Enter.
  3. If prompted, select the date for next Monday and submit.
  4. Review the steps and confirm the agent selected the Check Weather action.