# Step 3 - Select a Destination Function

## **What is a Destination Function?**

The Destination Function decides what data should be posted to the Destination system and when.

## Configure your Destination Function

Through the Control Panel you can easily access the page "Destinations" in the left side column. When entering the Destination page you will see a list of all Public Destinations, as well as your Private ones.

If you want to configure a Destination, you can do so by clicking the "Create Destination" button. From the Create Destination page you should fill in the below fields.&#x20;

* **Title** - Give the Destination function a title that is relative to the Destination, for example: "*FTP POST Orders*" or "*GBP Orders to FTP*"

{% hint style="info" %}
For this example, choose FTP POST Orders Test
{% endhint %}

* **System** - this is your Destination system (e.g. the System you are posting data to)

{% hint style="info" %}
For this example, choose FTP
{% endhint %}

* **Function** - this is your Destination function (e.g. the configuration of what information you will post  to the system)

{% hint style="info" %}
For this example, choose PostFiles
{% endhint %}

* **Key** - This is a dropdown list of the keys you have added to HighCohesion. Please select the key for the Destination system as enabled in Step 1<br>
* **Trigger** - The Trigger defines the logic for when the Destination function should be triggered. You can choose from three pre-defined options:
  * **Aggregate** (e.g. the Destination is triggered when all events for a specific Job has been completed). This is well suited for the cases when you want all Events to get posted to your Destination system as one file
  * **Real time** (e.g. the Destination is triggered when the first Event for a specific Job has been completed). This is well used for Streams with Sources run on webhooks, to directly POST a file to the destination System.
  * **Scheduled** (e.g. the Destination is triggered based on your defined Cron Schedule). This is rarely used, but could be used for Destination systems that require that Files are POSTED at a specific time.

{% hint style="info" %}
For this example, please select Aggregate
{% endhint %}

* **Settings** - this is necessary to provide additional details such as the the FTP location paths, access rights etc. All of the settings added to Destination configurations should be entered in TOML format, this makes the settings easy to read, edit and update. For a guide on TOML format please see the link: <https://github.com/toml-lang/toml>.

{% hint style="info" %}
The below settings states that the destination system format is XML, defines the output file naming convention, instructs the system of where to look for files on the remote location and indicates the root XML element. **For this use case, please add the remote\_path to your test FTP location. For more FTP configurations, see** [**here**](https://app.gitbook.com/@highcohesion/s/simplify-data/control-panel/setup/systems/system-library/ftp)
{% endhint %}

```
formatting = "xml"
filename_format = "orders_##DATETIMEFORMAT__Ymd_H-i-s__##.xml"
remote_path = ""
root_attribute = "version=1.0"
root_element = "root_order"
```


---

# 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.highcohesion.com/get-started/creating-your-first-stream/step-2-select-a-destination-function.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.
