# Create the Mediation contract

In the **Mediation Contract**, we define if files have to be transformed before being sent to the data consumer. In our scenario, files must be zipped.

The following entities **must already exist** in Data Mover:

* **Workflow**: for mediation contracts, workflows must be designed manually. See the [Workflow templates](/data-mover-1.21/workflow-templates/what-is-a-workflow-template.md) section for details.
* **Actor** → **VFS and virtual path**: the path where files are stored in Data Mover.&#x20;

## **Define the contract info**

Go to **Design** → **Contracts** and click the **New** button to open the **New Contract** window.

Complete the fields in the **INFO** section as follows:

* **Name**: assign an identification name to the contract. It is suggested to assign a name that can be easily identified at any time.
* **Description**: enter a description for the contract you are creating.
* **Contract Type**: in the drop-down list, select **Mediation**.
* **Execution Queue**: by default a contract is associated with the **default queue**. Details about queues can be found in the [Job Queues](/data-mover-1.21/jobs/job-queues.md) section of this documentation.

Once you have filled in all the fields, click on the **CONTINUE** button.

<figure><img src="/files/UugB7j7jjGkFl4VC4fQu" alt="" width="375"><figcaption></figcaption></figure>

## **Define the contract actions**

This step defines the trigger that will start the contract and the workflow associated with the contract.

Enter the **Action Name**. If you are satisfied with the system-generated name, you can leave it as it is. If you are not, enter a different name.&#x20;

Select the **Trigger** that will start the contract. In our scenario, new files entering a folder must be zipped, so we must select the **New file** trigger type.

Select the **Workflow** from the drop-down menu. The workflow must have been already designed in Data Mover. Refer to the [Workflow templates](/data-mover-1.21/workflow-templates/what-is-a-workflow-template.md) section for details on how to create a workflow to zip files.&#x20;

Click the **SAVE** button to be directed to the **New Contract** page.&#x20;

<figure><img src="/files/SnbiFqLPnuu6rp3K6JFk" alt="" width="375"><figcaption></figcaption></figure>

## **Set the contract variables**

<figure><img src="/files/rE45uxguRbiMgbnOrMn2" alt="" width="563"><figcaption></figcaption></figure>

The **Source virtual path** field is mandatory. Select the actor, VFS and Virtual Path where files are stored within Data Mover. This path must be the same as the path in the **Actor** field of the Input contract.

Data Mover will take the files entering the source virtual path and will create a zip.

Once variables are set, the <img src="/files/mP2bFXPxf1b4mgFBCyrJ" alt="" data-size="line"> icon will appear next to the **Action Name** and the **Status** of the Contract will change to **READY**.

Let's now define the output contract, which takes the files stored in Data Mover (configured with the Actor field of the Mediation contract) to send them to the head office, together with a confirmation email.&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.primeur.com/data-mover-1.21/contracts/business-scenarios/create-input-mediation-and-connection-contracts/create-the-mediation-contract.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
