Appearance
Exercise 4: Connect Agentforce with your MuleSoft App
In this exercise, you’ll configure an Agentforce agent in Agent Builder, add your hotel-reservation topic and its actions, then test end-to-end by having the agent retrieve real reservation data on demand.
Step 1: Access your Agent
In Setup, search for Agentforce Agents and select Agentforce Agents (Under Agentforce Studio).
Click on Agentforce (Default) or Einstein Copilot depending on your environment, then Open in Builder.
Click Deactivate to deactivate the agent.
Step 2: Add the API Actions to your Agent
Remove the default topic, Click the arrow down icon next to MigrationDefaultTopic and select Remove from Agent.
Click the arrow down icon next to Manage the topics assigned to your agent, and select Add from Asset Library.
Search for Hotel and select the Hotel Room Reservation topic.
Click Finish.
This topic was generated by the API Catalog.
In the Topics sidebar, click the Hotel Room Reservation topic.
Click the This Topic's Actions tab.
You will see your API endpoints listed as Agent actions, parsed via Topic Center and the API Catalog.
Step 3: Test the Agent with the API
Click the refresh button to reset the conversation.
Enter the prompt:
txtCan you provide the reservation details for reservation Id 35245
Examine the plan—you’ll see the agent select the Hotel_Room_Reservation topic and then the reservationRetrieve action created through the API Catalog.
Debugging Tips
- Ensure your API in Anypoint Exchange has the sf-api-catalog tag.
- Confirm conformance to the SF API Topic & Action Enablement Ruleset.
- Verify your API Instance is Active and has the Auto-Discovery ID.
- Make sure your Agent user has access to Named Credentials and API calls.
- Object Settings: Read access to User External Credential object.
- System Permission: API Enabled.
Summary
In this exercise, you:
- Accessed and deactivated the default Agentforce agent in the Agent Studio.
- Removed the sample topic and imported your Hotel Room Reservation topic from the Asset Library.
- Verified that the API endpoints were added as actions under the selected topic.
- Tested the agent by issuing a sample reservation query and reviewed the execution plan.
- Learned key debugging checks to ensure your MuleSoft API and Agentforce integration is correctly configured.
TIP
This is a working document—please share feedback to help us improve. Feel free to reach out to Akshata Sawant (akshata.sawant@salesforce.com) with any questions or for assistance. Thank you!