# Setting Up a Custom EDI Repository

In this document, we are going to walk through the steps on configuring a custom repository in your EDI flows for accommodating any customizations in the standard EDI validation rules.

### **Creating a custom repository**

1. From the toolbar, go to *File > New > EDI Custom Repository*&#x20;

   <figure><img src="/files/3987e2095ccf4731a823070b3221b1579265daf2" alt=""><figcaption></figcaption></figure>
2. Now, select the relevant EDI dialect and version to modify the EDI schema rules

![](/files/a8529238f4acd2df1b1513a536619b008c953fc4)

3. The EDI repository divides the EDI standard schema into 4 hierarchies: *Transaction Sets, Segments, Composite Elements* and *Elements*. Each of these can be modified and saved to create a new ‘custom’ version. As an example, we will look at two use cases,
   1. In Loop 2100A, change the character limit on NM105 (middle name) from 25 to 50 characters.
   2. In Loop 2100 A, remove the pair dependency where if either NM108 or NM109 are null, it requires all other fields to be present

{% tabs %}
{% tab title="Case a" %}

1. Identify the relevant message, *834\_HIPAA* and navigate to the segment where the change is required: *LOOP\_2000 > LOOP\_2100A > NM1*&#x20;

   <figure><img src="/files/2f0feb68f0ac03fcc6156da9bc4bb1d548c04032" alt=""><figcaption></figcaption></figure>
2. Move to the *Segments* tab and find *NM1*. Click on the top green node of *NM1*

   <figure><img src="/files/92a9e93e496b8e48001284779c568fe0b1b3789e" alt=""><figcaption></figcaption></figure>
3. Here, we see the pair dependent rule is defined. Select the rule and delete it.

   <figure><img src="/files/52d5c781c5f366e085649ba85c2a1a63d5e6d774" alt=""><figcaption></figcaption></figure>
4. Click on save. This adds a new segment *NM1 custom* to the list

   <figure><img src="/files/4653ab645c866dd048658efb945659748b1b163c" alt=""><figcaption></figcaption></figure>
5. Go back to the *Transaction Sets* tab and select the new NM1 custom segment from the dropdown menu.

   <figure><img src="/files/5bb596b0db751a5b5152ad51d706ff93d6ef7a8c" alt=""><figcaption></figcaption></figure>
6. Click save, this adds a new custom 834\_HIPAA transaction which can be used to apply to the new changes

   <figure><img src="/files/806483036445bb54824d91642e1bda68e02eca39" alt=""><figcaption></figcaption></figure>

{% endtab %}

{% tab title="Case b" %}

1. Navigate to *Segment NM1* and select *NM105*

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

2. Go to the *Elements* tab and search for element number *1037*.

   <figure><img src="/files/96fa3a37c14fa02261c70704256f323abf6dd299" alt=""><figcaption></figcaption></figure>

3. Change the maximum length to 50 from 25

   <figure><img src="/files/28ca6835e0078f27b202241270d9f8507ea9d4b2" alt=""><figcaption></figcaption></figure>

4. Click save, this adds a custom 1037 element to the list.

   <figure><img src="/files/5c3f8ded21a68f0b58c59e8f30462a28585f2cde" alt=""><figcaption></figcaption></figure>

5. Go back to NM1 custom message and select NM105

   <figure><img src="/files/8778da722ae6d10de2783e097c98078c29f489bc" alt=""><figcaption></figcaption></figure>

6. Select the new custom 1037 element from the dropdown menu and save changes.&#x20;

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

7. Since this NM1 custom is already added to our custom 834\_HIPAA custom transaction, both case a and b will be applicable when using the custom transaction.
   {% endtab %}
   {% endtabs %}

8. Save the custom EDI repository and add this to your trade partner profile used in the parser

![](/files/0d95db6e41d51a3ebecf1390e34911ed84a17036)

4. Next, specify this partner profile in the parser. In the messages drop down you will see the custom transaction set we had created.

![](/files/0e296c03685a722cdeb0b04ee2f824313edc51f0)

5. Select it for the modified rules to be applicable.

This concludes the documentation for using a custom EDI repository in Astera.


---

# 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://documentation.astera.com/astera-data-stack-v10/miscellaneous/setting-up-a-custom-edi-repository.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.
