# EDI Destination File

### Overview

Astera’s *EDI Destination File* object provides the functionality to validate the data against the receiver’s trading partner profile and write the data to an EDI destination file.

In this document, we will learn how to configure an *EDI Destination File* object in Astera.

### Video

{% embed url="<https://youtu.be/diNOD67VQyI?si=qwp9tyw4LEW8zlYr>" %}

### Use Case

To understand how to write to an *EDI Destination* *File* object, we will utilize a use-case where an XML source containing an X12 834 message has been serialized with the help of an *EDI Message Serializer* object. We now want to write this serialized output to an EDI destination file.

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FIuhgyGa9RHKxKjLjXaVf%2F0.png?alt=media)

To perform this task, we will use the *EDI Destination File* object in Astera.

#### Using EDI Destination File Object

1. To access the *EDI Destination File* object, go to *Toolbox > EDI > EDI Destination File* and drag-and-drop the object onto the designer.

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FKw6dxmjjBRCKAE0L7Zbj%2F1.gif?alt=media)

2. Let’s auto-map the metadata fields along with the *Text* field onto it.

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FydKjBU9lLKdKgwO2bgBM%2F2.gif?alt=media)

3. Right-click on the *EDI Destination File* object’s header and select *Properties* from the context menu.

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FXOYonuGy9VBADMQQ9udU%2F3.png?alt=media)

A configuration window will open, as shown below.

<figure><img src="https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FoXunYkMURPKWouYTxC3o%2Fimage.png?alt=media&#x26;token=68745e68-c08b-4603-9372-e11be9637870" alt=""><figcaption></figcaption></figure>

4. Provide the *File Path*. This is where the EDI destination file will be saved.

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FsqvKVC6JdlBzbEjl4FFd%2F5.png?alt=media)

The configuration window also includes other document settings options. Let’s go over them:

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FYCqOqQeAvAYERTEU0axY%2F6.png?alt=media)

* *Partner Profile ­*– Fetches all outbound maps based on the partner profile provided.
* *Test Indicator* – Allows user to specify any testing/debugging/validation indicator that may be used in the header or control segment of the message.
* *Contains Multiple Transaction Types* – If selected, this indicates the message has multiple transaction types in a single message, with each message having its own Functional Group Header and Trailer. If not selected, the transactions will be grouped into a single chunk.
* *Omit Byte Order Mark* – If selected, this indicates that the destination file must exclude the byte order mark from the beginning of the EDI message.

{% hint style="info" %}
**Note:** You can create your trade partner profile by navigating to *New > File > EDI Trade Partner Profile*
{% endhint %}

After configuring the document settings options, click *Next.*

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FrmBhRhff6NAtXB808FDY%2F7.png?alt=media)

5. The *Config Parameters* screen will open, where we can configure and define parameters for the *Destination File* and *Trade Partner Profile* file.

Use of Parameters eliminates the process of inserting hardcoded values and provides simplification in the deployment of flows. If the parameters are left empty, the default values defined in the *Properties* window are assigned for use.

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2F6AaqnSxcP84y4HYJlsOw%2F8.png?alt=media)

Click *Next*, and a new window, *General Options,* will open. In this window:

* *Comments* can be added.
* *General Options* are given, which relate to processing of records in the destination file.

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2F0K8T2fFzNtroNEDN1CZn%2F9.png?alt=media)

Click *OK.*

6. The *EDI Destination File* object is now configured, and the destination file can now be created by running the Dataflow.

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FVlUgCkKXiXDAvtKRMSu0%2F10.png?alt=media)
