---
schema_version: "1"
id: e6de59ebd6965363951bc5614411762e563b5d9a56c3b1830e4225d3f0151f5d
title: Set Up the Tax Advocate Agent
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/aps_tr_set_up_agentforce_agent.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.aps_tr_set_up_agentforce_agent.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 5474476690091ce9c94c611f60f6ebc04f346aa96541b587d371741cee828929
description: 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.
products:
  - Public Sector
release: "264"
---
# Set Up the Tax Advocate Agent

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

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;"><a href="https://help.salesforce.com/s/articleView?id=ind.psc_supported_editions.htm&amp;release=264.0.0&amp;type=5" title="Learn about the editions, user interfaces, and add-ons that support Public Sector.">View supported product editions</a>.</td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d107502e60">User Permissions
              Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d107502e60 ">To create and configure Agentforce agents:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d107502e60 ">Manage AI Agents AND Customize Application</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d107502e60 ">To manage Agentforce Data Libraries:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d107502e60 ">Manage AI Agents AND Data Cloud Architect</td>

          </tr>
        </tbody>
      </table>

Before you begin, complete these setup tasks in order:

- [Assign Tax and Revenue Permissions to Internal Users](https://help.salesforce.com/s/articleView?id=ind.aps_tr_assign_permissions.htm&release=264.0.0&type=5 "Confirm that internal admins have Customize Application, and assign Data Cloud Architect to users who configure Data 360.")
- [Set Up Tax and Revenue](https://help.salesforce.com/s/articleView?id=ind.aps_tr_set_up_tax_and_revenue.htm&release=264.0.0&type=5 "Turn on the Tax and Revenue org preference, use the default data space or create one for tax data. Then select that data space in Tax and Revenue Settings. Enable person accounts and set up security for taxpayer identification.")

## 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.

1. From Setup, in the Quick Find box, enter Einstein Setup, and then select **Einstein Setup**.
2. Turn on **Einstein**.
3. From Setup, in the Quick Find box, enter Agentforce Agents, and then select **Agentforce Agents**.
4. Turn on **Agentforce**.
5. Enable Agentforce for taxpayer community users.
    1. From Setup, in the Quick Find box, enter Einstein Generative AI Settings, and then, under Public Sector Solutions, select **Einstein Generative AI Settings**.
    2. Turn on **Tax Advocate Community Users**.
6. From Setup, in the Quick Find box, enter Agentforce Agents, and then select **Agentforce Agents**.
7. To go to Agentforce Builder, click **Let’s Go** or **New Agent | Create Agent**.
8. Select the **Public Sector Tax and Revenue** template.
    
    This template creates an agent with three default topics. See [Tax Advocate Agent Topics and Actions](https://help.salesforce.com/s/articleView?id=ind.aps_tr_agent_topic_and_actions.htm&release=264.0.0&type=5 "Review the topics and actions included with the Tax Advocate agent. The agent answers an authenticated taxpayer's questions about filed returns, refunds, payments, and tax policy."). Modify or remove topics in Agent Builder as needed.
9. Enter a name for the agent, and then click **Create**.
10. Return to your agent in Agentforce Builder.
    1. From Setup, in the Quick Find box, enter Agentforce Agents, and then select **Agentforce Agents**.
    2. Select your agent.
    3. Click **Preview**.
    4. 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.

1. From Setup, in the Quick Find box, enter Agentforce Data Library, and then select **Agentforce Data Library**.
2. Click **Add Data**, and then click **Upload Files**.
3. 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.
4. Click **Save** and wait for the library status to show that it’s ready.
5. 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.
    
    1. From the App Launcher, open **Data Cloud** and click **Data Model**.
    2. 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.
    3. For each DMO, open its detail page by clicking the Object label, click **Manage Tags**, then click **Attach Tags**.
    4. 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](https://help.salesforce.com/s/articleView?id=ind.aps_tr_configure_portal_data_access.htm&release=264.0.0&type=5 "Tag the Tax and Revenue data model objects for portal visibility. Then create a data governance policy so that authenticated taxpayers can read their own data in the portal.").
    5. Select **Add these tags to** and click **Save.**
    6. On the DMO details page, click **Done**.
    7. Repeat substeps c through f for each of the remaining DMOs.
6. Get the API name of the library’s retriever.
    1. From Setup, enter Agentforce Data Library in the Quick Find box, then select **Agentforce Data Library**.
    2. Select your data library.
    3. Under Status, click the **Retriever** link.
    4. 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._
7. 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.
    1. Find the Reasoning Instructions in the General Tax FAQ subagent.
    2. In the Reasoning Instructions, replace _TAX\_FAQ\_Retriever\_API\_NAME_ with the API name you copied in the previous step.