# Workflow Sessions

A Workflow Session represents a single execution of a predefined Workflow Template. It encapsulates the full verification process for a given client, including all the **checks performed**, **data captured**, and **rules** applied.

They serve as the primary resource for tracking status, outcomes, and results of a workflow run.

Each session is uniquely tied to a workflow run and contains:

* The list of executed [checks](https://docs.complycube.com/documentation/api-reference/core-resources/checks).
* All input and captured data (e.g., data, images).

The workflow sessions API allows you to run and retrieve workflow sessions. You can retrieve a specific workflow sessions as well as a list of all your client's workflow sessions.

### The Workflow Session object

<table><thead><tr><th width="250.59050864361703">Attribute</th><th width="126">Type</th><th width="339.2">Description</th></tr></thead><tbody><tr><td><code>id</code></td><td>string</td><td>The unique identifier for a workflow session.</td></tr><tr><td><code>clientId</code></td><td>string</td><td>The ID of the client associated with the workflow session.</td></tr><tr><td><code>entityName</code></td><td>string</td><td>The full name of the client. This will be auto-generated.</td></tr><tr><td><code>status</code></td><td>string</td><td><p>Indicates the current status of the workflow session. The session's status evolves as the client progresses through the session. Values can be:</p><p></p><ol><li><code>started</code> - the session has been started by the client.</li><li><code>processing</code> - the client has completed the flow and the verification checks are currently being processed.</li><li><code>complete</code> - the session has completed.</li><li><code>abandoned</code> - the session was initiated but left incomplete and inactive for an extended period.</li><li><code>cancelled</code> - the session was cancelled before completion.</li></ol></td></tr><tr><td><code>workflowTemplateId</code></td><td>string</td><td>The ID of the workflow template used by the workflow session.</td></tr><tr><td><code>workflowTemplateName</code></td><td>string</td><td>The name of the workflow template.</td></tr><tr><td><code>workflowTemplateDescription</code></td><td>string</td><td>The description of the workflow template.</td></tr><tr><td><code>workflowId</code></td><td>string</td><td>The ID of the workflow version used by the workflow session.</td></tr><tr><td><code>workflowVersion</code></td><td>number</td><td>The workflow version.</td></tr><tr><td><code>workflowDescription</code></td><td>string</td><td>The description of the workflow version.</td></tr><tr><td><code>compliancePolicies</code></td><td>array[object]</td><td>The list of compliance policies enabled for the workflow session. </td></tr><tr><td><code>outcome</code></td><td>string</td><td><p>The overall outcome of all the checks run within the workflow session. This will only have a value when all the checks are complete. Values can be:<br></p><ol><li><code>clear</code>: Indicates every check returned a successful result.</li><li><code>attention</code>: Indicates one or more of the checks require attention.</li><li><code>rejected</code>: Indicates one or more checks were rejected.</li></ol></td></tr><tr><td><code>allRelatedChecks</code></td><td>array[object]</td><td>The list of <a href="checks">checks</a> or verifications executed as part of this workflow session. Also, see the <a href="#the-allrelatedcheck-object">allRelatedCheck</a> object below.</td></tr><tr><td><code>policyAssurance</code></td><td>array[object]</td><td>The detailed outcome of all compliance policies as evaluated against the data and checks within the workflow session.</td></tr><tr><td><code>tasks</code></td><td>array[object]</td><td>The tasks that define the structure and execution flow of the workflow session.</td></tr><tr><td><code>lastCompletedTaskId</code></td><td>string</td><td>The ID of the most recently completed task within the workflow session.</td></tr><tr><td><code>createdAt</code></td><td>string</td><td>The date and time when the workflow session was created.</td></tr><tr><td><code>completedAt</code></td><td>string</td><td>The date and time when the workflow session was completed.</td></tr><tr><td><code>updatedAt</code></td><td>string</td><td>The date and time when the workflow session was last updated.</td></tr></tbody></table>

#### **The `allRelatedCheck` object**

<table><thead><tr><th width="221.4">Attribute</th><th width="131">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>checkId</code></td><td>string</td><td>The ID of the <a href="checks">check</a> created as part of this workflow session.</td></tr><tr><td><code>type</code></td><td>string</td><td>The type of <a href="checks">check</a> created as part of this workflow session.</td></tr><tr><td><code>taskId</code></td><td>string</td><td>The ID of the task within the workflow session that initiated the creation of the check.</td></tr></tbody></table>
