This guide will walk you through the steps to create an Agent Action in Salesforce, link it to a method in a managed Apex class, and use that Agent Action for an agent.
...
Prerequisites
Salesforce Setup Access: Ensure you have administrative privileges to configure Agent Actions.
Managed Apex Class: Confirm that the Apex class with the required method is available in your org.
Omni-Channel Setup: Verify Omni-Channel is enabled and properly configured in your Salesforce org.
...
Steps
Step 1: Review the Apex Class
Go to Setup and navigate to Apex Classes.
Search for the managed Apex class you intend to use.
Open the class and review its methods to identify the one you want to call. Ensure the method is marked as
@AuraEnabled
to allow interaction.
Note: If you cannot view the method’s implementation, refer to the managed package documentation or contact the provider for details
...
Step 2: Create an Agent Action
Navigate to Setup and search for Agent Actions in the Quick Find box.
Click New Action.
Fill in the following fields:
Action Name: Provide a descriptive name for your action (e.g.,
Fetch Account Details
).API Name: The system-generated name for the action.
Action Type: Select Apex Method.
Apex Class: Select the managed Apex class from the dropdown.
Apex Method: Choose the appropriate method from the selected class.
(Optional) Add input parameters if the method requires them.
Click Save.
...
Step 3: Configure the Omni-Channel Utility Bar
Navigate to App Manager in Setup.
Edit the Lightning App used by your agents.
In the Utility Bar section, ensure the Omni-Channel Utility is added.
Save and activate the app.
...
Step 4: Assign the Agent Action to Agents
Navigate to Omni-Channel in Setup.
Open Agent Configurations.
Select the configuration assigned to the target agents.
Under Agent Actions, add the newly created action.
Save the configuration.
...
Step 5: Testing the Agent Action
Log in as an agent.
Open the Omni-Channel utility in the Lightning Console.
Select a record and execute the Agent Action.
Verify that the Apex method runs successfully and returns the expected result.
...
Troubleshooting
Method Not Appearing: Ensure the method in the Apex class is marked
@AuraEnabled
and is exposed to your org.Permission Errors: Check that agents have the required permissions to execute the Apex class and associated method.
Unexpected Results: Validate the input parameters and debug the method using debug logs.
...
By following these steps, you can now use Agentforce to monitor your reconciled or unreconciled gateway settlements.