Introduction

Salesforce Flow is a powerful automation tool that allows you to build sophisticated business processes with clicks, not code. When Agentforce Context Protocol (ACP) tools are developed as Salesforce Custom Actions (specifically, Apex classes with @InvocableMethod), they become readily available within Flow Builder. This enables you to incorporate external system interactions and complex logic managed by ACP directly into your automated workflows.

This series of guides will explore how to leverage ACP-backed Invocable Actions within Salesforce Flow to automate a wide variety of tasks.

ACP Tools as Invocable Actions in Flow

The bridge between ACP and Salesforce Flow is the Invocable Apex Action. Here’s how it works:

  1. ACP Tool Development: An ACP tool (e.g., slack_send_message, data_cloud_query_dmo) is created to perform a specific function, often interacting with an external system.
  2. Apex Wrapper (Custom Action): An Apex class is written with a method annotated with @InvocableMethod. This method:
    • Takes input parameters (defined by @InvocableVariable annotations) that Flow can provide.
    • Internally calls the relevant ACP tool using the ACPCallToolService or similar mechanism.
    • Returns output parameters (also defined by @InvocableVariable) that Flow can use in subsequent steps.
  3. Availability in Flow Builder: Once the Apex class with the @InvocableMethod is deployed to your Salesforce org, it automatically appears in Flow Builder as an “Action” element. You can search for it by the label defined in the @InvocableMethod annotation.

Why Use ACP Tools with Flow?

Integrating ACP tools into Salesforce Flow offers several advantages:

  • Extend Automation Capabilities: Access functionalities from external systems (Slack, Shopify, external databases, etc.) directly within your Salesforce automation.
  • Standardize External Interactions: Use ACP as a consistent protocol for interacting with various services, simplifying development and maintenance.
  • Reusable Logic: ACP tools and their corresponding Invocable Actions are reusable components that can be leveraged across multiple Flows and even by Agentforce agents.
  • Low-Code/No-Code Empowerment: Business analysts and administrators who are proficient in Flow can build powerful automations that incorporate ACP functionalities without needing to write Apex for every external call.
  • Complex Process Orchestration: Chain multiple ACP tool calls and standard Flow elements together to automate end-to-end processes that span Salesforce and other systems.
  • Error Handling and Logging: Leverage Flow’s error handling capabilities and ACP’s activity logging to build robust and monitorable automations.

Common Use Cases

  • Automated Notifications: When a high-priority Case is created in Salesforce, use Flow to call an ACP action that sends a notification to a specific Slack channel.
  • Data Synchronization: When a customer record is updated in Salesforce, use Flow to trigger an ACP action that updates the corresponding customer profile in an external marketing system via Data Cloud.
  • Order Processing: When an Opportunity is Closed/Won, use Flow to initiate an order creation process in an ERP system through an ACP tool.
  • Automated Approvals with External Data: During an approval process in Flow, call an ACP tool to fetch supplementary data from an external system to help the approver make a decision.
  • Scheduled Data Aggregation: Use a Scheduled Flow to periodically call ACP tools that fetch data from multiple sources, aggregate it, and store it in Salesforce.

What’s Next?

The following guides in this section will provide more detailed instructions and examples:

  • Finding ACP Actions in Flow Builder: How to locate and add your ACP-backed Invocable Actions to a Flow.
  • Configuring Inputs and Outputs: Best practices for mapping data into and out of ACP Actions within Flow.
  • Error Handling Strategies: How to manage potential errors when calling ACP Actions from Flow.
  • Example Flow: Automated Slack Notification for New Leads: A step-by-step walkthrough of building a practical Flow using an ACP tool.

By understanding how ACP tools become Invocable Actions, you can unlock a new level of automation power within Salesforce Flow.