# Policies

## Overview

A Policy defines a set of conditions and actions that are evaluated against a document's metadata. If all conditions are satisfied, the policy automatically adds the defined recipients to the envelope.

Policies are linked to a **Document Class** and evaluated in the Designer via the **Apply Policies** action. This allows organizations to automate recipient routing based on document content — for example, requiring a manager's approval whenever a contract value exceeds a certain threshold.

> Policies are part of a feature controlled by the **DocumentalClass** feature flag. When disabled, policies are not available.


## Navigation

**Organization Settings → Policies**

## Policies List

The list shows all defined Policies with the following columns:

| Column | Description |
|  --- | --- |
| **Policies** | Name of the policy. |
| **Description** | Description of the policy. |
| **Enabled** | Checked if the policy is enabled. |
| **Actions** | Edit or delete the policy. |


## Creating a Policy

Click **New Policy** and fill in the form.

### Basic Fields

| Field | Required | Description |
|  --- | --- | --- |
| **Name** | Yes | Identifies the policy. |
| **Description** | No | Free-text note for context. |
| **Document Class** | No | Links the policy to a specific Document Class. Selecting a class enables the Conditions section. |
| **Enabled** | — | Toggle to activate or deactivate the policy. Enabled by default. |


### Conditions

Conditions are only available when a **Document Class** is selected. They define the rules that must be met for the policy's actions to be applied.

Each condition consists of:

- **Metadata** — a metadata field defined on the selected Document Class.
- **Condition** — a comparison operator. Available operators depend on the field's data type:
  - **String** → `equals`
  - **Number** → `equals`, `greater than`, `less than`
  - **Date** → `equals`, `greater than`, `less than`
  - **List option** → `equals`
- **Value** — the value to compare against.


Multiple conditions can be added via **Add condition** (＋). All conditions are evaluated with **AND** logic — every condition must be satisfied for the actions to be applied.

### Actions

Actions define the recipients that are added to the envelope when all conditions match. Three options are available:

- **Add recipient** — adds an individual recipient. Fields: Email, Given name, Surname, Phone number.
- **Add group** — adds a recipient group.
- **Add From User Group** — adds recipients sourced from an organizational User Group.
  - Select the user group, business role and the recipient type. If not business role is selected every user within the user group will be added in case the conditions are met.


Multiple actions can be defined. Each action represents one recipient or group to be added to the envelope.

Click **Save** to create the policy.

## Editing and Deleting Policies

Use the **Edit** and **Delete** actions in the Policies list table.

## Applying Policies in the Designer

Once documents in a Draft envelope have been assigned a Document Class and their metadata values filled in, policies can be evaluated:

1. In the Designer, open the **Other Actions** menu.
  1. Applying policies is only available for envelopes and not for templates
2. Select **Apply Policies**.


After clicking **Apply Policies** a dialog informs you that recipients might be added to the envelope.

The system then:

- Finds all Document Classes assigned to the documents in the envelope.
- Retrieves all policies linked to those classes.
- Evaluates each policy's conditions against the document's actual metadata values.
- For each policy where **all conditions match**, adds the defined recipients to the envelope — unless those recipients are already present.


> If several policies match the **Apply Policies** applies them in the order of their creation date - oldest first


> **Apply Policies can be run multiple times.** Recipients already added by a previous run will not be duplicated.


> **Required metadata must be filled before running.** If any required metadata field is empty, the system returns an error and evaluation does not proceed.


> **Policies are not applied when creating an envelope from a template.** Document Classes and metadata values are inherited, but policy evaluation must be triggered manually in the Designer.


## Permissions

Access to Policies under Organization Settings is restricted to **organization administrators**.