# Create a Connection Contract

**Connection Contracts** define how the producer connects to Data Mover to send files (in the input phase) or the consumer connects with Data Mover to retrieve files (in the output phase). In both scenarios, Data Mover acts as a protocol server.&#x20;

This contract defines:

* the **actor** that sends files to Data Mover or collects them from Data Mover&#x20;
* the **server**
* the **virtual file system** (VFS) and its **path**.

In input, the Connection Contract defines when Data Mover receives files from the producer. The producer, acting as the protocol client, initiates the connection to Data Mover, which acts as the protocol server​. ​

In output, it defines when the consumer connects to Data Mover to retrieve the files. The consumer acts as the protocol client, establishing the connection, while Data Mover remains the protocol server.​

The creation of the **Connection Contract** consists of these steps:

1. **Define the contract info**. This step defines the details of the contract, its name and description.
2. **Associate the contract with a server**. This step defines the server that will be used to access the VFS.
3. **Define the contract users and groups**. This step defines how Users and Groups are granted access to the selected VFS.&#x20;
4. **Set File processing rules**. This step is optional and defines how incoming or outgoing files should be processed when they match a specified pattern.&#x20;
5. **Associate File processing rules with a Virtual path**. This step is optional and defines which files in the Virtual Path will activate the corresponding File processing rule.


---

# 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-connection-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.
