# ABA File Generation

As a Plan Manager, paying your Provider invoices is a key function to support as you manage your Participant's support journey.  We have already covered how Maica helps you to enter `Invoice` records and manage the **Claiming** lifecycle and now in this article, we will describe how Maica automates the generation of the `ABA File`.

In the ABA process, the following two components are involved:

* **ABA Export Record**
  * Is a **Salesforce record** to which `Payment Request` records are associated with in order to group the data and then generate the `ABA File`
* **ABA File**
  * Is the **physical file** that contains the `Paid Amount` from the`Payment Request` record(s) associated with the `ABA Export` record
  * The ABA File also includes the relevant data from the `Provider` (`Account`) record, such as Bank Account details

Please note: this article assumes that you have **completed** the initial ABA File configuration steps as described in the article below.  These steps are mandatory and must be completed prior to exporting an ABA File.

{% content-ref url="/pages/LCyrDVYfqIjkEyz7PxrF" %}
[ABA File Management](/general-information/client-management-settings/aba-file-management.md)
{% endcontent-ref %}

## ABA Export Record

Whilst it may sound complex or a little overwhelming, the ABA File generation is far from it.  Put simply, the `ABA Export` and the associated `File` contain the `Paid Amount` of `Payment Request` records where the `Status` = `Paid`.

{% hint style="warning" %}
The `Payment Request` is allocated to an `ABA Export` record even if the `Paid Amount` is not the same as the `Claimed Amount` (`Paid Amount` != `Claimed Amount`). &#x20;

i.e. if the `Claimed Amount` = $50 but the `Paid Amount` = $25, the `ABA Export` lookup will be populated and the **$25 included** in the ABA File when you generate it.
{% endhint %}

So, whenever the `Payment Request` `Status` is set to `Paid`, via either the NDIS API **Remittance Notification** OR the BPR **Remittance File Import**, Maica will do the following:

* Create a new `ABA Export` record, or, if one already **exists** with the criteria outlined below, retrieve the current `ABA Export` record
* Update the `ABA Export` lookup on the `Payment Request` record with the `ABA Export` record
  * This creates a relationship between the **Paid** `Payment Request` and the `ABA Export`, allowing the `Paid Amount` to be included in the ABA Files

From a Salesforce record point of view, the image below represents a `Payment Request` **PR - 000027** that has a `Paid Amount` of **$55.47** included in `ABA Export` **ABA - 0000002**.

<figure><img src="/files/CArsYlnrTg5Q3lUFV9OD" alt=""><figcaption><p>An example of a Paid Payment Request that has been included in an ABA Export</p></figcaption></figure>

### ABA Export Create/Update Overview

As mentioned above, Maica will automatically associate a `Payment Request` with an `ABA Export` export when the `Status` = `Paid`.  As part of this process, Maica wil check to see if a valid (Open) `ABA Export` record **already exists** OR if a **new** `ABA Export` record needs to be created.

When searching for an existing `ABA Export` record to associate the `Payment Request` with, Maica uses the following criteria:

* Date = TODAY
* Status != Processed

If an existing `ABA Export` record is returned that matches this criteria, it will be populated in the `ABA Export` lookup on the `Paid` `Payment Request`.  If no existing record is found, a new `ABA Export` record will be created and used in the lookup.

{% hint style="warning" %}
Please ensure that **you review** the ABA File prior to uploading it to your Bank to ensure it includes the correct Payment information.  Once it is uploaded and processed by your Bank, the process cannot be reversed.

The generation and submission of the ABA File is the responsibility of the user and Maica carries no liability for incorrect payments to Providers.

Please also ensure you update the `ABA Export` `Status` = `Processed` once you have uploaded the ABA file to your Bank for processing.
{% endhint %}


---

# 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://kb.maica.com.au/ndis-management/invoice-management/aba-file-generation.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.
