Introduction

Once Agentforce Context Protocol (ACP) tools are enabled for Agentforce agents (via Salesforce Custom Actions), users can start leveraging them through natural language commands. This guide illustrates common patterns of interaction, showing how typical user requests can translate into actions performed by ACP tools.

These examples assume that the necessary ACP tools, Custom Actions, and Agentforce agent intent mappings/configurations are in place.

Pattern 1: Direct Action Request

Users often request direct actions, specifying the system and the desired operation.

Example 1: Sending a Slack Message

  • User Command: “Agentforce, send a message to the #project-alpha channel saying ‘Team, the new designs are ready for review in Quip.’”
  • Agentforce Agent Interpretation:
    • Identifies intent: SendSlackMessage
    • Extracts parameters:
      • channel_name: #project-alpha (or channel_id if Agentforce can resolve it)
      • message_text: “Team, the new designs are ready for review in Quip.”
  • ACP Custom Action Invoked: ACPSlackSendMessage
  • ACP Tool Called: slack_send_message
  • Expected Outcome: The message is posted to the #project-alpha Slack channel. The Agentforce agent confirms, “Okay, I’ve sent your message to #project-alpha.”

Example 2: Creating a Salesforce Task

  • User Command: “Agentforce, create a task for me to follow up with John Smith about the proposal by tomorrow.”
  • Agentforce Agent Interpretation:
    • Identifies intent: CreateSalesforceTask
    • Extracts parameters:
      • assignee: Current User (or allows clarification)
      • subject: “Follow up with John Smith about the proposal”
      • due_date: Tomorrow’s date
      • related_to_id (optional): If context (e.g., current record) provides a Contact ID for John Smith.
  • ACP Custom Action Invoked: ACPCreateSalesforceTask
  • ACP Tool Called: salesforce_create_record (with sobject_type: 'Task')
  • Expected Outcome: A new Task record is created in Salesforce. The Agentforce agent confirms, “Done. I’ve created a task for you: ‘Follow up with John Smith about the proposal’ due tomorrow.”

Pattern 2: Data Retrieval / Querying

Users frequently ask Agentforce agents to find or summarize information.

Example 1: Querying Data Cloud for Customer Profile

  • User Command: “Agentforce, show me the latest profile information for customer ID cust12345 from Data Cloud.”
  • Agentforce Agent Interpretation:
    • Identifies intent: GetDataCloudProfile
    • Extracts parameters:
      • customer_id: “cust12345”
      • data_space (optional): If needed and Agentforce can infer or ask.
  • ACP Custom Action Invoked: ACPGetDataCloudProfile (or a generic ACPDataCloudQueryDMO)
  • ACP Tool Called: data_cloud_query_dmo (or a more specific tool)
  • Expected Outcome: The Agentforce agent displays key information from the customer’s unified profile in Data Cloud. “Here’s the profile for cust12345 from Data Cloud: Name: Jane Doe, Email: jane.doe@example.com, Last Purchase Date: …”

Example 2: Getting Order Status from Commerce Cloud

  • User Command: “Agentforce, what’s the status of order ORD-00789?”
  • Agentforce Agent Interpretation:
    • Identifies intent: GetOrderStatus
    • Extracts parameters:
      • order_id: “ORD-00789”
  • ACP Custom Action Invoked: ACPGetCommerceCloudOrderStatus
  • ACP Tool Called: commerce_cloud_get_order_status
  • Expected Outcome: The Agentforce agent responds, “Order ORD-00789 is currently ‘Shipped’. Expected delivery is October 26th.”

Pattern 3: Contextual Actions (Based on Current Record/Screen)

Agentforce agents can often leverage the user’s current context within Salesforce.

Example 1: Adding a Note to the Current Case

  • (User is viewing Case #0055667)
  • User Command: “Agentforce, add a note to this case: ‘Customer called, issue resolved by rebooting their device.’”
  • Agentforce Agent Interpretation:
    • Identifies intent: AddNoteToRecord
    • Extracts parameters:
      • record_id: “0055667” (from current context)
      • note_content: “Customer called, issue resolved by rebooting their device.”
  • ACP Custom Action Invoked: ACPAddSalesforceNote
  • ACP Tool Called: salesforce_create_record (with sobject_type: 'ContentNote' or similar, and linking to the Case)
  • Expected Outcome: A note is added to Case #0055667. Agentforce agent: “I’ve added your note to this case.”

Pattern 4: Multi-Step or Conditional Actions (Advanced)

More advanced Agentforce agent implementations might handle multi-step processes or conditional logic, potentially involving several ACP tool calls.

Example: Escalate Case and Notify Manager via Slack if Priority is High

  • (User is viewing a high-priority Case)
  • User Command: “Agentforce, escalate this case and notify my manager.”
  • Agentforce Agent Interpretation (could involve multiple steps/rules):
    1. Identifies intent: EscalateCaseAndNotify
    2. Extracts case_id from context.
    3. Checks Case priority (potentially via an ACP tool call like salesforce_get_record_details).
    4. If priority is “High”:
      • Updates Case status to “Escalated” (e.g., salesforce_update_record).
      • Identifies user’s manager (e.g., from User record via salesforce_get_record_details).
      • Sends a Slack message to the manager (e.g., slack_send_message via ACPSlackSendMessage).
  • Expected Outcome: Case status updated, manager notified. Agentforce agent: “Okay, I’ve escalated the case and sent a notification to [Manager’s Name].”

Tips for Effective Interaction

  • Be Clear and Specific: While Agentforce agents are designed for natural language, clarity helps. “Send a Slack message to #general about X” is better than “Tell everyone X.”
  • Use Keywords: Agentforce agents are often trained on keywords related to tools and actions (e.g., “Slack,” “Case,” “Data Cloud,” “create,” “find”).
  • Provide Necessary Details: If an Agentforce agent asks for clarification (e.g., “Which channel should I send that to?”), provide the missing information.
  • Check Agentforce Agent’s Capabilities: Your organization might provide documentation or a help command for your Agentforce agent, listing common commands it understands.

Conclusion

These patterns demonstrate the versatility of Agentforce agents when powered by ACP. By understanding how user commands can map to ACP tool executions, users can more effectively leverage their Agentforce agents for a wide range of tasks, from simple data lookups to complex multi-system actions. The key is the combination of natural language understanding by the Agentforce agent and the robust, standardized backend operations provided by ACP.