> For the complete documentation index, see [llms.txt](https://docs.advantys.com/workflowgen-administration-module-reference-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.advantys.com/workflowgen-administration-module-reference-guide/8.3-4/yousigncheck-workflow-application.md).

# YOUSIGNCHECK Workflow Application

## Overview

The **YOUSIGNCHECK** workflow application lets you verify the status of an agreement and download its associated file, which is a concatenation of attached files.

## How it works

* You can verify the status of an agreement and download the file from Yousign based on your status criteria.<br>
* Application logs are available. These can be specified by setting the value of the `YousignCheckLogLevel` parameter in the `web.config` file to `0` to deactivate logs, `1` for error logs, `2` for information logs, or `3` for debug logs; the default value is `0`.

## Configuring the Yousign API

For instructions on how to configure the the Yousign API, see the [Configuring the Yousign API](/workflowgen-administration-module-reference-guide/8.3-4/yousignsend-workflow-application.md#configuring-the-yousign-api) section in the [YOUSIGNSEND Workflow Application](/workflowgen-administration-module-reference-guide/8.3-4/yousignsend-workflow-application.md) chapter.

## Required parameter

| **Parameter**          | **Type** | **Direction** | **Description**                       |
| ---------------------- | -------- | ------------- | ------------------------------------- |
| `YOUSIGN_SIGNATURE_ID` | TEXT     | IN            | ID of the Yousign signature to verify |

## Optional parameters

### Yousign configuration

| **Parameters**        | **Type** | **Direction** | **Description**                                                                                                                                                                                             |
| --------------------- | -------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `YOUSIGN_API_KEY`     | TEXT     | IN            | <p>Yousign API key<br><br>By default, this value comes from the <code>YousignApiKey</code> parameter in the <code>web.config</code> file.</p>                                                               |
| `YOUSIGN_HOST_SERVER` | TEXT     | IN            | <p>Yousign host server (e.g.:  <code><https://api.yousign.app/v3></code>)<br></p><p>By default, this value comes from the <code>YousignHostServer</code> parameter in the <code>web.config</code> file.</p> |

### General

| **Parameter**       | **Type** | **Direction** | **Description**                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ------------------- | -------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `VALID_STATUS_LIST` | TEXT     | IN            | <p>Valid status to download the document<br></p><p><strong>Possible values:</strong></p><ul><li><code>draft</code></li><li><code>ongoing</code></li><li><code>done</code></li><li><code>deleted</code></li><li><code>expired</code></li><li><code>canceled</code></li><li><code>approval</code></li><li><code>rejected</code></li><li><code>declined</code></li></ul><p><strong>Default:</strong> <code>done,canceled,expired,deleted,rejected</code></p> |
| `YOUSIGN_DOCUMENT`  | FILE     | OUT           | Yousign document                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `YOUSIGN_STATUS`    | TEXT     | OUT           | Agreement status                                                                                                                                                                                                                                                                                                                                                                                                                                          |

## Example with YOUSIGNSEND

In the following example, the YOUSIGNSEND action is directly followed by the YOUSIGNCHECK action. This action will loop back onto itself until the status changes to `done`, `canceled`, `expired`, `deleted`, or `rejected`.

If the status returned meets the condition, the document will be downloaded from Yousign.

<figure><img src="https://1421635626-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FifwJ9X94VJGndKIGZ9Qn%2Fuploads%2FaH0gSKI7u9aUQZ1UOaYg%2Fimage.png?alt=media&amp;token=92ec9d26-1866-4f46-b573-7d588c1a2e26" alt=""><figcaption></figcaption></figure>

With the system loop action function, the YOUSIGNCHECK action will be executed every `x` seconds until the OUT condition is met.

<figure><img src="https://1421635626-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FifwJ9X94VJGndKIGZ9Qn%2Fuploads%2FkXxCFZaDY6bjzhiL9SDv%2Fimage.png?alt=media&amp;token=c559e517-3c95-4d94-98cd-3b3956cf5e80" alt=""><figcaption><p>Configuring a YOUSIGNCHECK action</p></figcaption></figure>
