You are here:
Set Up the Complaint Intake Agent
Create an agent with the Agentforce Service Agent template and ensure that the necessary subagents are enabled. Then, assign permissions to the agent user. To enable the agent’s authority-checking capability, upload your policy manuals to a new data library and connect it to the Complaint Intake subagent. These documents inform the agent's Check Complaint Authority action. Finally, test and activate your agent.
Required Editions
Create the Complaint Intake Agent
Required Editions
| User Permissions Needed | |
|---|---|
| To build and manage Service Agents: | Manage Agentforce Service Agents AND Manage AI Agents, OR, Customize Application |
- From Setup, in the Quick Find box, enter Agent, and select Agentforce Agents.
- Click New Agent.
-
Select the Agentforce Service Agent template, and then click Next.
You see a list of subagents that are selected by default for the agent.
-
Click Added to remove all but the Escalation subagent, and then
click Next.
The agent needs the escalation subagent to transfer a conversation to a service rep in case a constituent wants to file a complaint about a sensitive matter or criminal activity. The agent shouldn’t handle such complaints.
- Enter a name, such as Complaint Intake Agent.
- Enter an API name, such as ComplaintIntakeAgent.
- Enter a description and a role.
- For Company, enter information about your agency, and then click Next.
-
Skip the data source select, and click Create.
The agent is created. It then opens in Agent Builder, and the Escalation subagent is already added.
-
Add the Complaint Intake subagent.
- Click New, and then select Add from Asset Library.
- Search for and select the Complaint Intake subagent, and then click Finish.
-
Make sure that the Escalation subagent is included. The Escalation
subagent is added by default, but if it was removed, add it back from the Asset Library.
- Click New, and then select Add from Asset Library.
- Search for and select the Escalation subagent, and then click Finish.
-
Add the Inappropriate_Content subagent.
- Click New, and then select New Topic.
- Skip the optional description of the subagent’s purpose, and click Next.
- Enter Inappropriate_Content as the subagent name, and press Tab to populate the API name.
- For Classification Description and Scope, enter this text: Used when a message contains any of the following content: violence, sexual, misinformation, harassment, illegal activities, suicide and self-harm, sensitive events, harmful behaviors, bias, toxicity, or offensive language.
-
Click Add Instruction, and enter an instruction such as:
Always deny the user's(constituent) request. Say 'Sorry, I can't assist you with
this complaint. Would you like to talk to one of our service reps
instead?'.
The instruction prevents the agent from engaging with the constituent on sensitive complaints. The agent instead offers to connect the constituent to a service rep who can assist them with the complaint.
Note The instructions provided here are a sample of how the Inappropriate_Content subagent can be overridden. You should use this as a reference and customize the response and behavior to fit your agency's specific needs and escalation protocols. - Don't activate the agent yet. Assign permissions to the agent user, create a data library, include the library’s retriever ID in the subagent instructions, and then test your agent and activate it.
- Click Next, and then click Finish.
Assign Permissions to the Einstein User for the Complaint Intake Agent
- From Setup, in the Quick Find box, enter Users, and then select Users.
-
Find and select the Einstein User for the agent.
The user has a username that starts with the name of your agent. For example, if the agent is called Complaint Intake Agent, the username starts with complaintintakeagent.
-
(Optional) To easily identify the user in the future, update the user’s first name.
- Click Edit.
- Enter a first name. For example, enter Complaint Intake.
- Save your changes.
- In the Permission Set Assignments related list, click Edit Assignments.
-
Select these permission sets under Available Permission Sets and click Add.
- Complaint Management Access for AI Agents
- Data Cloud User
- Prompt Template User
- Save your changes.
Create the Data Library and Upload Policy Manuals
Required Editions
| User Permissions Needed | |
|---|---|
| To set up Agentforce Data Libraries: | Data Cloud admin and System Administrator permissions. |
- From Setup, in the Quick Find box, enter Data Library, and then select Agentforce Data Library.
- Click New Library.
- Enter a library name, and the API name is automatically populated. For example, enter the name Complaint Policies for the library.
- Optionally, enter a description.
-
Save your work.
Now, add your files to the library.
- Under Add Data Sources, select Files as the data type.
-
Under Add Files Data, select a content processing type that suits the content in your policy manuals.
For example, if your files include text, tables, and graphics, select Rich Content.
- Upload your files to the library.
- Your library is now ready to use.
Update the Subagent Instructions with Your Library’s Retriever ID
Required Editions
| User Permissions Needed | |
|---|---|
| To build and manage Service Agents: | Manage Agentforce Service Agents AND Manage AI Agents, OR, Customize Application |
- From the App Launcher, find and select Data Cloud.
- On the AI Models (formerly Einstein Studio) tab, select Retrievers.
-
Find and select the retriever for your library by its name.
The name has the format File_<library-name>. If your library is called Complaint Policies, the retriever has the name File_Complaint_Policies.
- Under Retriever Details, copy the API name of the retriever.
-
Include the API name in the subagent instructions.
- From Setup, in the Quick Find box, enter Agent, and select Agentforce Agents.
- Select the Complaint Intake Agent that you previously created, and then click Open in Builder.
- Select the Complaint Intake subagent.
- Search for and select the placeholder text REPLACE_RETRIEVER_ID_HERE.
- Delete the placeholder text and paste in the retriever API name that you copied earlier.
- Save your changes.
- In Agentforce Builder, use the Conversation Preview area to test your agent with some utterances.
- Activate the agent.
Did this article solve your issue?
Let us know so we can improve!

