# Create a Mediation Contract

**Mediation contracts** manage changes to files that must be applied before delivering them. For example, mediation contracts can rename or zip files before sending them to the final consumer.

The creation of the **Mediation Contract** consists of these main steps:

1. **Define the contract info**. This step defines the details of the contract, its name, type, and how it must be processed.
2. **Define the contract actions**. This step defines the trigger that will start the contract and the workflow associated with the contract.
3. **Set the contract variables**. This step defines the interaction between the contract and the workflow, setting the variables that will be initialized.&#x20;

To create a new mediation contract, go to **Design** → **Contracts** and click the **New** button to open the **New Contract** window.

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

## **Define the contract info**

To create a **Mediation Contract**, 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**. Queues order the tasks designed in the contract and define how they must be processed. To assign a contract to a different queue, open the drop-down menu and select another queue among those available. Details about queues can be found in the [Job Queues](/data-mover-1.21/monitoring/job-queues.md) section of this documentation.

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

## **Define the contract actions**

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

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

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 type** that will execute the contract. Possible options are listed on the [Triggers](/data-mover-1.21/workflow-templates/triggers.md) page and subpages. &#x20;

Select the **Workflow** from the drop-down menu. A brief description of the template and a visual representation of the workflow will appear in the lower section of the window. For more information about workflows to be used in mediation contracts, refer to the [User-designed workflow templates](/data-mover-1.21/workflow-templates/user-designed-workflow-templates.md) page.&#x20;

Once all the fields have been selected, click on the **SAVE** button. The wizard will be closed, and you will be directed to the **New Contract** page to configure action variables.

## **Set the contract variables**

The **New Contract** page is made of different sections, shown in this figure:

<figure><img src="/files/HINOzyNfNFChUwCZnoP0" alt=""><figcaption></figcaption></figure>

In the panel at the top of the page, you can edit the **Name**, **Description** and **Execution Queue** of the contract.

The **Name, Status, Contract type** and **Actor** associated with your contract are displayed in the panel on the right of the page. The **status of the contract** will appear as **ENABLED**. The toggle button cannot be set to DISABLED if the Contract is associated with an active FEL. The status of the contract is also shown in the contracts column of the **Contracts** page. You can change the actor associated with the contract by selecting one of the entries in the **Actor** drop-down menu.

The action selected in the wizard will appear in the **Actions** section of this page. The <img src="https://files.readme.io/583b144-attention_icon.png" alt="" data-size="line">  icon next to the **Action Name** signals that the action variables have not been configured yet. To configure the action variables, click on the <img src="https://files.readme.io/735cfe6-icona_dat_1.png" alt="" data-size="line"> icon to expand the action row.

All mandatory action variables must be set to proceed. The action variables depend on the selected workflow. The action variables for system workflow templates released by Primeur are described on the [Mediation Templates](/data-mover-1.21/workflow-templates/system-workflow-templates/workflow-templates-for-mediation-contracts.md) page. The action variables for custom workflow templates depend on the service tasks. Service task variables are described on the [Service tasks](/data-mover-1.21/workflow-templates/service-tasks.md) page.&#x20;

Once all the variables are set, this icon <img src="https://files.readme.io/909e83e-check_icon.png" alt="" data-size="line"> will appear next to the **Action Name** and the **Status** of the Contract will change to **READY**.\
\
You can add a new action by clicking the <img src="https://files.readme.io/cd83794-add_action.png" alt="" data-size="line"> button below the action variables row.


---

# 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/create-your-first-contract/create-a-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.
