Salesforce Agentforce integrates AI-powered agents right into your CRM, allowing businesses to streamline processes, give intelligent responses, and increase productivity. Custom Actions are a crucial element of Agentforce, allowing you to enhance agent capabilities and incorporate them in Salesforce automation tools like Flows. You may initiate intelligent workflows that integrate AI reasoning with declarative automation by configuring Agentforce Custom Actions in Flow, without having to write complex code.
In this post, we’ll walk you through the process of adding Agentforce Custom Actions in Salesforce Flow.
Refer to the post How to Build a Custom Action in Salesforce Agentforce: Patient Appointment Scheduling to create Agentforce custom actions using Apex.
What Are Agentforce Custom Actions?
Custom Actions are reusable, AI-powered tasks that you can design in Agentforce. They let your agents perform specific business operations such as
- Scheduling appointments
- Updating or creating Salesforce records
- Sending notifications or approvals
- Fetching external system data via API calls
When combined with Salesforce Flow, these actions become even more powerful, as they can be invoked at various points in automated workflows to handle both AI-driven decision-making and backend execution.
Use Case: Retrieve Loan Status Based on Loan Number
Scenario
In financial services, customers frequently reach out to inquire about the status of their loans—whether an application is under review, approved, disbursed, or pending documentation. Traditionally, service agents must manually search Salesforce or external systems to provide this information, which delays response time and impacts the customer experience.
Steps for creating Agentforce Custom Actions in Flow
- Create an autolaunched Salesforce flow.
- Create Agent Action
- Create an Agentforce Service Agent
- Create a Topic in Agentforce
- Test Action in Agentforce Builder
1. Create an Autolaunched Salesforce Flow
Not all Salesforce Flows can be used to create a custom action for Agentforce agents. We have to use an auto-launch (no trigger) flow to create a custom action.
Start creating a flow from the flow setup page. Select Autolaunched flow from this automation page.

Select Autolaunched Flow (No Trigger) in the next automation page.

It will show a flow page to add actions based on our use case. As per our use case, we need to provide the loan status based on the customer’s provided loan number. This loan number will be created as an input variable.
Add Input Variables
Create an input variable to get the loan number as input from the customer. It will be of text type, and it should be marked checked for Available for input in the Availability Outside the Flow section.

Add Output Variable
Create an output variable to share the loan status. It will be of text type, and mark the checkbox Available for output as checked in the Availability Outside the Flow section.

Query Loan Status
Query loan status by querying data from the loan object. We will use the loan number to filter records. For our use case, we need only the loan number (Name) and the loan status (LoanStatus__c).

Put the loan status in the output variable that we have created above. We have New, In Progress, Pending Documentation, Need Further Info, Rejected, and Approved loan statuses in the object.

2. Create Agent Action
We need to create an agent action for the above flow method so that it will be available in the Agentforce asset library. We can create a custom action from Setup -> Einstein ->
Einstein Generative AI -> Agentforce Studio -> Agentforce Assets
Select the Actions tab and then the New Agent Action button on the Agentforce Asset Library page.

Connect an existing action
It will open the Create an Agent Action page. Select the information below on the page

- Reference Action Type: Flow
- Reference Action: Get Loan Status. It will auto-populate the Agent Action Label and API name.
- Click Next
Configure your action for Agent
In this step, we will configure a custom action for Agentforce. It will populate information from a flow description. If a description is not added in the flow, then we can add it here.

- *Agent Action Instructions: Put instructions for your custom action in this field. By default, it will be populated from the invocable method description. Put as much information in this field. The Atlas Reasoning engine will use this field to decide which action to perform. So it is a very important field. Example: This action will be used to get the loan status. The user will provide the loan number, and it will respond with the status to the customer.
- *Loading Text: Put text that you want to display when the action is being performed. Example—Getting the loan status of the provided loan number.
- Inputs: Put instructions and data type for each input parameter. You can also put whether the parameter is required or not.
- loanNumber: Put the instruction “Pass the correct loan number. Example L-00001.” and make it required.
- Outputs: Put the instruction to show the result.
- loanStatus: Put the instruction “Show the loan status to user” Mark checked to Show in the conversation
- Click Finish to add a custom action in the asset library.
3. Create an Agentforce Service Agent
An Agentforce Service Agent is a digital assistant that combines Salesforce data, automation, and AI intelligence to interact with users. We will create a service agent for our use case. If you already have a service agent, then skip this step.
Check out the article to create an Agentforce Service Agent.
4. Create a Topic in Agentforce
We need a topic to add custom actions. Topics define the scope of knowledge or subject area that the agent can handle.
Create a topic from the Service Agent screen. If you already have a topic, then skip this step.
Note: The topic can only be created when the agent is inactive. So if it is already active, then make it inactive.

On the click of the new topic (as shown in the above image), it will open a pop-up to describe the topic.
- What do you want this topic to do? – This topic will provide the status of customer loans based on the provided loan number
Create topic
Based on the above topic description, the system will populate below information
- Example User Input: Book an appointment of Andy Smith with Dr. Anna Garcia on September 5th at 10 AM.
- Name: Loan Status Inquiry
- *Classification Description: This topic handles customer requests to provide the status of their loans based on the provided loan number.
- *Scope: Your job is only to provide the status of customer loans by using the loan number provided by the user. Do not attempt to handle any other loan-related inquiries or tasks outside this scope.
- Instruction 1: Pass the given loan number provided by the customer.
After adding these details, click Next to add an action in this topic.

Add the above-created action (Get Loan Status) to this topic. Our topic is ready, and we can test our service agent.
We can also add an action later in the topic. To add it later, click on the topic, and it will show the topic detail. Add actions from This Topic’s Actions tab.
5. Test Agentforce Custom Actions in Agentforce Builder
We can test Agentforce Custom Actions functionality in Agent Builder itself. Provide instructions to get the loan status.

Note: The service agent runs using the user context. Provide object permission to that object for this user. You can use permission sets for assigning access.
6. Activate Topic
Activate the topic and use it based on your requirement. It can be used in a community org or websites.
Summary
By creating Agentforce Custom Actions in Salesforce Agentforce, you can enhance the AI agent’s functionality beyond standard interactions. In financial services, enabling customers to check their loan application status or submit a new loan request directly through an AI-powered service agent not only streamlines operations but also improves the overall customer experience.
This same approach can be extended to other financial use cases—such as scheduling credit consultations, raising service tickets, or initiating account opening workflows.
Need a Salesforce Agentforce Expert?
Looking to implement intelligent loan service agents in your Salesforce org? Contact us or email us at salesforcecodex@gmail.com for expert guidance.
References
Related Posts
- Create Agentforce Custom Action using Salesforce Apex
- Agentforce Explained: Core Components Every Salesforce Professional Should Know
- How to Leverage Model Context Protocol (MCP) to Enhance Salesforce AI
- Introducing Agentforce3 to Salesforce Developers
Other Important Posts
- Explore the Top Salesforce Winter ’26 Features for Developers
- Appointment Assistance Real-Time Location Url Generation
- Integrate Slack in Salesforce for Real-Time Notifications
- Low Code Integration for Text Translation using SysTran API
- Extract Demographic Detail using Trestle Reverse Phone API
- Generic Notification Component in LWC
- Generic Multi-Select Lookup Component
