Integrating Salesforce Agentforce
This guide explains how to connect Flowable's External Agent to Salesforce Agentforce.
Ensure Einstein and Agentforce are licensed and enabled in your Salesforce organization
Configure Agentforce in Salesforce
Create a Service Agent
Follow the official guide to add a new service agent:
Salesforce: Set Up a Service Agent
Once configured, you can test your agent directly in the builder interface:
To access Salesforce Agentforce data, you must modify a topic and add a topic action.
The action can invoke a Salesforce Flow, which returns the required data.
Make sure your agent has permissions to access the data involved in that flow.
Create a Salesforce App for API Access
Follow the steps from the Salesforce Einstein Developer Guide
(Stop after the "Create a Token" section, execution is not required)
You will need the following values which are defined in the "Create a Token" section:
MY_DOMAIN_URL
CONSUMER_KEY
CONSUMER_SECRET
Ensure the agent is enabled in Salesforce before calling it from Flowable.
Disabled agents will fail to execute.
Add OAuth2 Credentials in Flowable Hub/Control
To allow Flowable to authenticate with Salesforce, configure an OAuth2 credential:
Name | Value |
---|---|
Registration key | salesforce |
Client id | {CONSUMER_KEY} |
Client secret | {CONSUMER_SECRET} |
Issuer URI | {MY_DOMAIN_URL} |
Token URI | {MY_DOMAIN_URL}/services/oauth2/token |
Scopes | <empty> |
Example in Flowable Control (On-Premise)
The configuration dialog in Flowable Control:
Example in Flowable Hub (Cloud)
The configuration dialog in Flowable Hub:
Configure the External Agent in Flowable Design
-
Get the Agent ID
Open the Agentforce agent in Salesforce and extract the Agent ID from the URL: -
Create an Agent in Flowable Design
- Set the Agent type to
External Agent
- Set the External Agent Vendor to
Salesforce Agentforce
- Enter the Salesforce URL (
{MY_DOMAIN_URL}
) - Enter the Agent ID you retrieved above
- Set Token Type to
OAuth2 client
- Set OAuth2 Registration Key to the
Registration key
you defined in Flowable Hub/Control
- Set the Agent type to
Add an Operation
Once the agent is configured, you can add an operation as described in the Utility Agent guide.
Agentforce agents can be tested in Flowable Design, but OAuth2 credentials must be configured in Control/Hub for testing to work.
Conclusion
You’ve now successfully integrated Salesforce Agentforce as an external agent in Flowable.
This setup allows Flowable agents to interact with Salesforce via secure API calls, making it possible to retrieve contextual business data directly from your Salesforce flows and topics.
To structure the response from Agentforce, consider using a Utility Agent.