# Participant

A [participant](oneflow-platform-glossary#participant) represents a real person in the [contract](oneflow-platform-glossary#contract).

> 🚧 Note:
>
> There can be at most, 40 [participants](oneflow-platform-glossary#participant) across all parties in one contract.

# Contract participant attributes

The following attributes are available for a contract participant:

| Attribute                        | Type                                                     | Description                                                                                                                                                      |
| :------------------------------- | :------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `_options`                       | [object](type-reference#base-types)                      | Defines options for the contract participant. See [Options](#options).                                                                                           |
| `_permissions`                   | [object](type-reference#base-types)                      | Defines permissions for the contract participant. See [Permissions](#permissions).                                                                               |
| `_private_ownerside`             | [object](type-reference#base-types)                      | Contains attributes visible only to the owner-side participant. See [Private owner-side](#private-owner-side).                                                   |
| `delivery_channel`               | [string(enum)](type-reference#subtypes-for-str)          | The name of the delivery channel. One of the [Delivery channels](contract#delivery-channels).                                                                    |
| `delivery_status`                | [string(enum)](type-reference#subtypes-for-str)          | Indicates the status of the notification sent to a contract participant. One of the [Delivery statuses](participant#delivery-status).                            |
| `email`                          | [string(email)](type-reference#subtypes-for-str)         | The participant's email address.                                                                                                                                 |
| `id`                             | [integer](type-reference#base-types)                     | The unique ID of the participant.                                                                                                                                |
| `identification_number`          | [string](type-reference#base-types)                      | The date of birth, SSN, personal number, etc., of the participant.                                                                                               |
| `my_participant`                 | [boolean](type-reference#base-types)                     | Whether the participant represents the [current user](oneflow-platform-glossary#current-user) or not.                                                            |
| `name`                           | [string](type-reference#base-types)                      | The name of the participant.                                                                                                                                     |
| `organizer`                      | [boolean](type-reference#base-types)                     | A flag to indicate if the participant is an [owner-side](oneflow-platform-glossary#owner-side-party) internal participant. Only for the owner-side participants. |
| `phone_number`                   | [string(phone\_number)](type-reference#subtypes-for-str) | The mobile phone number of the participant.                                                                                                                      |
| `sign_method`                    | [string(enum)](type-reference#subtypes-for-str)          | Shows the selected method of signing contracts. One of the [Sign methods](contract#sign-methods).                                                                |
| `sign_state`                     | [string(enum)](type-reference#subtypes-for-str)          | The current state of the contract in the signing process. One of the [Sign states](participant#sign-states).                                                     |
| `sign_state_updated_time`        | [string(datetime)](type-reference#subtypes-for-str)      | The time the sign state was last updated.                                                                                                                        |
| `signatory`                      | [boolean](type-reference#base-types)                     | Indicates if the participant can sign the contract.                                                                                                              |
| `title`                          | [string](type-reference#base-types)                      | The title of the participant.                                                                                                                                    |
| `two_step_authentication_method` | [string(enum)](type-reference#subtypes-for-str)          | Shows the selected two-step authentication methods. One of the [Two-step authentication method options](contract#two-step-authentication-methods).               |

## Options

Indicates the options available when adding a participant to the contract.

| Attribute | Type                                 | Description                                                                          |
| :-------- | :----------------------------------- | :----------------------------------------------------------------------------------- |
| `invite`  | [boolean](type-reference#base-types) | Indicates whether the participant is allowed to receive an invitation upon creation. |
| `message` | [object](type-reference#base-types)  | Defines the subject and body of the invitation. See [Message](#message).             |

### Message

Indicates the attributes of a message. Different combinations can be used. See [Combining options attributes](#combining-options-attributes).

| Attribute | Type                                | Description                                                            |
| :-------- | :---------------------------------- | :--------------------------------------------------------------------- |
| `body`    | [string](type-reference#base-types) | Body of the message to be sent along with the invitation.              |
| `subject` | [string](type-reference#base-types) | Subject of the message when sending the invitation to the participant. |

### Combining options attributes

The table below shows all possible combinations for the participant `_options` object when creating a participant while the contract is in a `draft` or `pending` state.

| Contract state                                                                        | \_options | invite       | message     | Description                                                                                        | Result             |
| :------------------------------------------------------------------------------------ | :-------- | :----------- | :---------- | :------------------------------------------------------------------------------------------------- | :----------------- |
| draft (`_options` cannot be used for counterparty participant creation in this state) | N/A       | N/A          | N/A         | Create an ownerside participant without `_options`.                                                | No invitation      |
| draft                                                                                 | available | false        | N/A         | Create an ownerside participant with `_options.invite` as `false`.                                 | No invitation      |
| draft                                                                                 | available | N/A or false | available   | Create an ownerside participant without `_options.invite` or as `false` but with a custom message. | No invitation      |
| draft                                                                                 | available | true         | N/A or null | Create an ownerside participant with `_options.invite` as `true`.                                  | Default invitation |
| draft                                                                                 | available | true         | available   | Create an ownerside participant with `_options.invite` as `true` and custom message.               | Custom invitation  |
| pending                                                                               | N/A       | N/A          | N/A         | Create a participant without `_options`.                                                           | Default invitation |
| pending                                                                               | available | true         | N/A or null | Create a participant with `_options.invite` as `true`.                                             | Default invitation |
| pending                                                                               | available | true         | available   | Create a participant with `_options.invite` as `true` and custom message.                          | Custom invitation  |

## Permissions

Indicates the permissions available to a participant in a contract.

| Attribute         | Type                                 | Description                                                                   |
| :---------------- | :----------------------------------- | :---------------------------------------------------------------------------- |
| `contract:update` | [boolean](type-reference#base-types) | Indicates whether the participant is allowed to make changes in the contract. |

## Combining participant flags and permissions

The table below shows all the possible combinations of the participant flags for signatory and organizer, and [permissions](oneflow-platform-glossary#user-permission) to update and sign the contract.

> 📘 Note:
>
> Combining the participant and signatory flags with permissions, you can set up roles available in Oneflow:\
> **Signatory** – can edit the contract and expected to sign the contract.\
> **Influencer** – can edit the contract.\
> **Viewer** – cannot edit the contract, can only view and comment.\
> **Organizer** – same as an influencer, but only visible to other participants in the same party.

| signatory | organizer | contract:update | Description                                                                                                                 | Role in the Oneflow app |
| :-------- | :-------- | :-------------- | :-------------------------------------------------------------------------------------------------------------------------- | :---------------------- |
| true      | false     | true            | The participant should sign the contract and has all the appropriate permissions to edit and update the contract            | Signatory               |
| false     | false     | true            | The participant cannot sign the contract but otherwise has all the appropriate permissions to edit and update the contract  | Influencer              |
| false     | true      | true            | Only possible for an owner-side participant. An owner-side internal participant cannot sign the contract but can update it. | Organizer               |
| false     | false     | false           | The participant can only view the contract.                                                                                 | Viewer                  |

## Sign states

The `sign_state` attribute denotes the current state of the contract in the signing process.

| State     | Description                                                          |
| :-------- | :------------------------------------------------------------------- |
| undecided | The initial sign state.                                              |
| signed    | The participant has signed the contract.                             |
| declined  | The participant has declined the contract. The contract is declined. |
| unknown   | Used for future extensions. Not valid for create contract endpoint.  |

## Private owner-side

Contains attributes visible only to the owner-side party.

| Attribute            | Type                                                | Description                                                                                               |
| :------------------- | :-------------------------------------------------- | :-------------------------------------------------------------------------------------------------------- |
| `created_time`       | [string(datetime)](type-reference#subtypes-for-str) | The time when the participant was created.                                                                |
| `first_visited_time` | [string(datetime)](type-reference#subtypes-for-str) | The time when the participant first opened the contract. `null` if they have not yet opened the contract. |
| `last_visited_time`  | [string(datetime)](type-reference#subtypes-for-str) | The time when the participant last opened the contract. `null` if they have not yet opened the contract.  |
| `updated_time`       | [string(datetime)](type-reference#subtypes-for-str) | The time when the participant was last updated.                                                           |
| `visits`             | [integer](type-reference#base-types)                | The number of times the participant has opened the contract.                                              |

## Delivery status

The table lists all possible statuses for notifications (invitations) sent to contract participants.

| Status    | Description                                                         |
| :-------- | :------------------------------------------------------------------ |
| not\_sent | The contract has not been sent to the participant.                  |
| pending   | The delivery of the contract is pending.                            |
| failure   | The delivery of the contract failed.                                |
| bounce    | The contract cannot be delivered to the provided email address.     |
| success   | The contract was successfully delivered to the participant.         |
| opened    | The participant opened the delivered contract.                      |
| unknown   | Used for future extensions. Not valid for create contract endpoint. |