# Create the Output contract

In the **Output Contract**, we define how Data Mover connects to the data consumer to deliver the files and we set the email address that will receive the confirmation email.

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

* **Actor**: the data consumer where Data Mover delivers the files. See the [Create your first actor](/data-mover-1.21/actors/create-an-actor.md) page for details.&#x20;
* **Actor** → **Client connection**: the connection that Data Mover uses to access the folder of the data consumer and send the files. See the [Client Connections](/data-mover-1.21/transfer-protocols-and-connectors/client-connections.md) page for details.&#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 **Output**.
* **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/jobs/job-queues.md) section of this documentation.

After you have filled in all the fields click the **CONTINUE** button.

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

## **Associate the contract with the actor**

Select the **actor** your contract will be associated to. In this step, the actor is the head office that will receive the zipped files.&#x20;

Click the **CONTINUE** button.

## **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 type** that will execute the contract. In our scenario, Data Mover must send new files to the head office, so we must select the **New file** trigger.&#x20;

Select the **Workflow** from the drop-down menu. For our scenario, we need the **system\_newFile\_flagFile-triggerFile-outTransport** workflow since we want to send the files to the destination folder and a confirmation via email. See [Time Trigger](/data-mover-1.21/workflow-templates/system-workflow-templates/workflow-templates-for-output-contracts.md#trigger-type-new-file).

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

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

## **Set the contract variables**

Contract variables are configured in the **Actions** section of the **New Contract** page.

Fill in these mandatory fields:

* **Source virtual path**: 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 Mediation contract.
* **remoteFolder**: enter the remote path where Data Mover will put the files. I.e., the folder of the head office.&#x20;
* **Select remote server**: select the client connection - which must be already configured - that will be used to access the server of the data consumer.&#x20;

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

To configure the email address that will receive the confirmation email, go to:

* **Notification channels**: select System Email Notification Channel.
* **Add email**: enter the email address that will receive the notification email and click the + button on the right to save the address.&#x20;

<figure><img src="/files/S3oIqplCwsnQCLehyqdX" alt="" width="324"><figcaption></figcaption></figure>

Once mandatory 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.


---

# 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-output-contracts/create-the-output-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.
