This guide will walk you through the steps to create an Agent Action in Salesforce, link it to a method within PosiPay, 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
PosiPay with Agentforce: Ensure the app is installed.
...
Step 1: Create an Agent Action
Navigate to Setup and search for Agent Actions in the Quick Find box.
Click New Action.
Select Apex as the Reference Action Type.
Select Get Settlements by Status as the Reference Action.
Fill in the following required 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
...
2: Create your Agent
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.
...
and search for Agent in the Quick Find box.
Click New Agent.
Select Agentforce Service Agent as the Type.
Add necessary topics to your agent as you prefer.
Setup all required fields as you prefer.
(Optional) Add Data Library.
Click Create.