---
schema_version: "1"
id: 0faee5bdb0ed8087af891c3007015c4ba8743c9971b4129ecc616dcd259719aa
title: Create and Activate a Custom Archive Agent Action
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/archive_o_create_activate_custom_agent_action.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.archive_o_create_activate_custom_agent_action.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 3416913584552584d9975d7896fc80d42c1d58595a200f89d3821a12c491d9b2
description: Activate a new custom capability for your Salesforce Agent in the Archive managed package.
products:
  - Security
  - Salesforce Platform
release: "264"
---
# Create and Activate a Custom Archive Agent Action

Activate a new custom capability for your Salesforce Agent in the Archive managed package.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-own_from_salesforce-264-0-0-production-enus/8ac98673-ede2-4046-a41e-2d5c846f24ff/images/icon_note.png)

Note This content relates to Archive. For Salesforce Archive, see [Store Data Externally with Salesforce Archive](https://help.salesforce.com/s/articleView?id=xcloud.archive_overview.htm&type=5&language=en_US).

We recommend using the [Agentforce (Default) Agent](https://help.salesforce.com/s/articleView?id=ai.agent_setup_enable_default.htm&type=5&language=en_US) and the [Agent Topic: General CRM](https://help.salesforce.com/s/articleView?id=copilot_topics_ref_general_crm.htm&language=en_US).

Prerequisites:

- You have Salesforce Administrator permissions with access to Agent configuration.
- The Salesforce Agent platform is [enabled in your org.](https://help.salesforce.com/s/articleView?id=ai.agent_setup_enable.htm&type=5&language=en_US)
- You have the necessary [Archive Package](https://support.owndata.com/s/article/Access-to-Own-Products-43191) installed and configured.

To create a reusable Action, and then assign that Action to the Agent.

Refer to the Salesforce documentation on how to [Create a Custom Agent Action](https://help.salesforce.com/s/articleView?id=ai.copilot_actions_custom.htm&type=5&language=en_US)

Follow the steps outlined in the documentation, and then at Step 3:

1. From the Reference Action Type dropdown list, select **Apex**.
2. From the Reference Action Category dropdown list, select **Invocable Method**.
3. From the Reference Action dropdown list, select **Search Archived Records**.
    
    For more information, see [Create a Custom Agent Action](https://help.salesforce.com/s/articleView?id=ai.copilot_actions_custom.htm&type=5&language=en_US)
    
    Follow the steps outlined in the documentation, and then at Step 6:
    
    - If you're using the [Agentforce (Default) Agent](https://help.salesforce.com/s/articleView?id=ai.agent_setup_enable_default.htm&type=5&language=en_US), you must deselect the **Show in Conversation** option under Output. You may need to enable and then disable this option to ensure it's properly deselected.
    - If you plan to add the action to a standard topic, which we recommend, please follow the instructions in the [Edit a Standard Topic](https://help.salesforce.com/s/articleView?id=ai.copilot_topics_edit.htm&type=5&language=en_US) knowledge article first.

Add the Action to a Topic

Refer to Salesforce documentation on how to [Add the Action to a Topic](https://help.salesforce.com/s/articleView?id=ai.copilot_actions_add.htm&type=5&language=en_US)

Follow the steps outlined in Add the Action to a Topic article. At Step 4, "If you're using the [Agent Topic: General CRM](https://help.salesforce.com/s/articleView?id=ai.copilot_actions_add.htm&type=5&language=en_US)", select it now.

Continue to follow the steps in [Add the Action to a Topic](https://help.salesforce.com/s/articleView?id=ai.copilot_actions_add.htm&type=5&language=en_US) article. At Step 6, "Select the Search Archived Records action from the actions library", [activate](https://help.salesforce.com/s/articleView?id=ai.copilot_setup_activate_deactivate.htm&type=5&language=en_US) and [test your agent.](https://help.salesforce.com/s/articleView?id=ai.agent_parent_test.htm&type=5&language=en_US)

Missing Archive Agent Permissions

Archive permissions work similarly to Archive Widget Restriction Rules. Record-level access is only enforced if the object has been added to the widget restriction rules within the Archive Settings. If no objects are added to the restriction rules, users have public access to all archived records of that type.

For example, if no rules are set for Case, a user who originally can't access a specific case can see it after it's archived. Permissions are based on the sharing settings at the moment of archival. Any changes to Sharing Rules after the record is archived aren't applied.

#### See Also

- [Archive Widget Restriction Rules](https://help.salesforce.com/s/articleView?id=platform.archive_o_archive_widget_restriction_rules.htm&release=264.0.0&type=5 "Control end user visibility in Salesforce of specific archived records according to Object Sharing tables. Applicable to CustomListRelatedRecordArchivedWidget and CustomSingleRelatedRecordArchivedWidget in the Archive managed package.")
- [Search with the Archive Agent](https://help.salesforce.com/s/articleView?id=platform.archive_o_search_with_archive_agent.htm&release=264.0.0&type=5 "This article provides guidelines for effectively searching for archived records using the Archive Agent in the Archive managed package. It covers the most critical step of specifying an object directly in your search phrase, how to add criteria for accuracy, and how to work within system limitations to find the records you need.")