Turn on Einstein, Agentforce, and Tax Advocate Community Users. Then create an Agentforce service agent user, or use an existing one, from the Public Sector Tax and Revenue template.
Required Editions
| View supported product editions. |
| User Permissions Needed | |
|---|---|
| To create and configure Agentforce agents: | Manage AI Agents AND Customize Application |
| To manage Agentforce Data Libraries: | Manage AI Agents AND Data Cloud Architect |
Before you begin, complete these setup tasks in order:
Create the Tax Advocate Agent
Turn on Einstein and Agentforce, create an Agentforce service agent user or use an existing one, and then use the Public Sector Tax and Revenue template to create your agent.
- From Setup, in the Quick Find box, enter Einstein Setup, and then select Einstein Setup.
- Turn on Einstein.
- From Setup, in the Quick Find box, enter Agentforce Agents, and then select Agentforce Agents.
- Turn on Agentforce.
-
Enable Agentforce for taxpayer community users.
- From Setup, in the Quick Find box, enter Einstein Generative AI Settings, and then, under Public Sector Solutions, select Einstein Generative AI Settings.
- Turn on Tax Advocate Community Users.
- From Setup, in the Quick Find box, enter Agentforce Agents, and then select Agentforce Agents.
- To go to Agentforce Builder, click Let’s Go or New Agent | Create Agent.
-
Select the Public Sector Tax and Revenue template.
This template creates an agent with three default topics. See Tax Advocate Agent Topics and Actions. Modify or remove topics in Agent Builder as needed.
- Enter a name for the agent, and then click Create.
-
Return to your agent in Agentforce Builder.
- From Setup, in the Quick Find box, enter Agentforce Agents, and then select Agentforce Agents.
- Select your agent.
- Click Preview.
- Test the agent with sample questions, and then activate the agent.
Set Up the Tax Policy Knowledge Base
Create an Agentforce Data Library with your agency's policy documents so the agent can answer taxpayer questions about tax rules and procedures.
The agent uses a retriever connected to a Data Library to answer policy questions. After you create the library and upload your documents, copy the retriever's API name and paste it into the General FAQ topic instructions so the agent knows where to search.
- From Setup, in the Quick Find box, enter Agentforce Data Library, and then select Agentforce Data Library.
- Click Add Data, and then click Upload Files.
-
Enter a name for the library, such as TaxPolicyLibrary, and
upload your agency's policy documents.
Note the API name. You need it to locate the retriever in the next step.
- Click Save and wait for the library status to show that it’s ready.
-
Tag the document library’s data model objects for external user access.
When Salesforce indexes the document library, it creates three data model objects (DMOs) in Data Cloud. You must tag these DMOs so that external Community users can access the retriever. Internal platform users are covered automatically by Salesforce's default All Data Access ruleset policy and don't require this step.
- From the App Launcher, open Data Cloud and click Data Model.
- Locate the three DMOs created for your document library. Their names follow these patterns, where the <DataLibraryName> is the first 15 characters of your library’s API name. For example, ADL_<DataLibraryName>__dlm, ADL_<DataLibraryName>_chunk__dlm, ADL_<DataLibraryName>-index__dlm.
- For each DMO, open its detail page by clicking the Object label, click Manage Tags, then click Attach Tags.
- In the search box, search for and select ExternalData.Visibility.Portal, or your custom tag, and add it to the object or to individual fields you want to make visible to portal users. If you haven’t created a data governance policy yet, see Configure Taxpayer Portal Access to Tax Data.
- Select Add these tags to and click Save.
- On the DMO details page, click Done.
- Repeat substeps c through f for each of the remaining DMOs.
-
Get the API name of the library’s retriever.
- From Setup, enter Agentforce Data Library in the Quick Find box, then select Agentforce Data Library.
- Select your data library.
- Under Status, click the Retriever link.
- Under Retriever details, copy the API Name. The retriever API name follows the pattern File_ADL_LibraryName_UniqueID, for example File_ADL_TaxDocuments_1Cx_l2D32f7b02d.
-
In Agentforce Studio, open your Tax and Revenue agent, go to
the General Tax FAQ topic, and paste the retriever API name into the topic
instructions.
- Find the Reasoning Instructions in the General Tax FAQ subagent.
- In the Reasoning Instructions, replace TAX_FAQ_Retriever_API_NAME with the API name you copied in the previous step.