Newer Version Available

This content describes an older version of this product. View Latest

ArchivePolicyDefinition

Represents a data lifecycle policy that, in each row, defines the scope, frequency, and rules for automated archiving or purging of records from a root entity, such as Contact or Lead. This object is available in API version 65.0 and later.

Supported Calls

create(), delete(), describeSObjects(), query(), retrieve(), update(), upsert()

Special Access Rules

Create, Update, and Delete operations are restricted to the Archive Admin profile. All other profiles have Read-Only access.

Fields

Field Details
DataProtectionThreshold
Type
int
Properties
Create, Filter, Sort, Update
Description
Specifies a retention buffer, in days, during which recently updated or sensitive records must not be archived or deleted. Enforces data protection compliance.
Description
Type
textarea
Properties
Create, Update
Description
The purpose or scope of the policy.
IsActive
Type
boolean
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
Indicates whether the policy is active and eligible for execution. Only active policies can be executed by scheduled or manual processes.
Name
Type
string
Properties
Create, Filter, Group, Sort, Update
Description
The unique name assigned to the policy.
Type
Type
picklist
Properties
Create, Filter, Group, Restricted picklist, Sort, Update
Description
Process type that the policy executes.

Valid values are:

  • Archive
  • Import
  • Purge
Query
Type
string
Properties
Create, Filter, Group, Sort, Update
Description
A complete SOQL or custom query defining the set of records to archive or purge, based on policy rules. Determines which records are eligible for processing.
QueryLimit
Type
int
Properties
Create, Filter, Sort, Update
Description
The maximum number of root records this policy can process in a single run. Used to throttle execution for scalability and control.
RootEntityName
Type
string
Properties
Create, Filter, Group, Sort, Update
Description
The API name of the Salesforce object targeted by the policy. Determines which object’s records are queried and processed.
RunFrequency
Type
picklist
Properties
Create, Filter, Group, Restricted picklist, Sort, Update
Description
Specifies how often the policy is executed—manually or on a regular interval. Enables automation for recurring data lifecycle operations.

Valid values are:

  • None

    This option is specifically for manual policy runs.

  • Daily
  • Weekly
  • Monthly