# Invoice Entry

There are a number of ways an `Invoice` can be created in Salesforce using the Maica solution including manually entering it or submitting it via [Salesforce' API](https://developer.salesforce.com/). This article focuses on the `Invoice Entry Screen` provided by Maica to easily and reliably submit `Invoices` to Salesforce whilst validating the Participants underlying funding structures.

### Let's see it in action - video

Before we describe the process in detail, we thought it would be good to see the Invoice Entry in action, so please have a look at the below animation or view the full [video here](https://www.loom.com/share/a37a9a2c203842acad685f7df8e73ce3).

![Invoice Entry in Action](/files/0ylRd8TuPowfbu3eIb2r)

The Invoice Entry component contains a number of **Validations** and **Alerts** to assist and guide you as you add the Invoice details.  These are described in detail in the Alerts & Validation article below.

{% content-ref url="/pages/TmDXGP0bmx8SS45azQkY" %}
[Alerts & Validation](/ndis-management/invoice-management/invoice-entry/alerts-and-validation.md)
{% endcontent-ref %}

## Manual Invoice Entry

The way to get started with manually entering an `Invoice` is to simply click the `New Invoice` button within Salesforce.  This button has a Lightning Experience Override, meaning that it will open our `Add New Service Invoice` component (`maica:InvoiceEntryQA`), as opposed to the standard New record screen, presented when you click New for other objects.

![Creating a new Invoice](/files/tG77ezZlLt2s5EdVVwtE)

Overall, in order to successfully create an `Invoice`, we need to collect some specific information such as:

* Who the Invoice is **from** (the Provider)
* Who the Invoice is **for** (the Participant)
* The `Invoice Number`
* The way the Invoice should be **claimed**
* The `Invoice Line Item` detail

The screen below shows you what a completed `Invoice` would look like with a description of each input field.

![A completed Invoice](/files/15bK0m7BIjBECkCFIc7J)

### Invoice Entry Input Fields

At the top level, we collect the following information to set up the overall structure of the `Invoice`.

#### Provider

The Provider is the service provider who has issued the `Invoice` and on whose behalf this `Invoice` is being entered.  Providers can be found by searching on either `Organisation Name` or `ABN` which Maica will use to present a list all `Account` records in Salesforce matching this criteria.  Directly underneath the Provider name, Maica displays the `ABN` stored for the Provider so it's easier for you to distinguish between Providers with the same name. &#x20;

In cases where **you** are delivering services to **your** Participants, the Provider field would be your own Organisation (Account) record.

{% hint style="info" %}
Maica respects your existing data access rules when searching for and displaying Provider (`Account`) records.  Meaning the user needs to have access to **Read** the `Account` in order for it to be displayed in the Maica Invoice Entry component.
{% endhint %}

#### Participant (NDIS Number)

The Participant is the person who received the services for which the `Invoice` is being submitted/entered.  The majority of the time a Participant can be found in the list by typing in the NDIS Number or the Name.

{% hint style="info" %}
Once a Participant has been selected, their Active `Plan` information is in a handy info panel directly below so you can start to understand the budget position whilst submitting the Invoice.  The exact criteria for displaying the Info Panel is defined in the [Alerts & Validation](/ndis-management/invoice-management/invoice-entry/alerts-and-validation.md) (Active Plan Info Panel) page.
{% endhint %}

#### Invoice Date, Due Date, and Invoice Number

This is the Date, Due Date, and Invoice Number of the `Invoice` as stipulated by the Provider issuing the `Invoice` for submission.

#### Funding Structure

The funding structure offers three choices on how to submit this `Invoice` to Maica, including `Plan Managed`, `Agency Managed`, or `Self-Funded`. Let's have a look at how these two behave differently, including:

* **Agency Managed** `Invoices` are validated against an existing and active `Plan` as well as any associated `Service Booking`. Without a valid `Service Booking`, you **cannot** submit an Agency Managed `Invoice` as Maica validates the required [funding structures](/ndis-management/plan-management/plan-overview.md) are in place to submit this `Invoice`.&#x20;

{% hint style="info" %}
When entering the Line Item details For Agency Managed Invoices, Maica enforces some specific `Service Booking` based validation.  This is described in the Invoice Entry [Alerts & Validation](/ndis-management/invoice-management/invoice-entry/alerts-and-validation.md) (Funding Structure Validation) page.&#x20;
{% endhint %}

* **Plan Managed** `Invoices`  are aimed at providing an `Invoice` to the plan manager for a given participant. This means that **Maica** will automatically generate an invoice and send this to the associated plan manager for a participant (via a lookup on the Contact profile).

{% hint style="info" %}
The automatic generation of `Invoices` is part of **Maica's Client Care** solution which is provisioned as a separate solution package.
{% endhint %}

* **Self-Funded** `Invoices` are aimed at scenarios in which there might not be an active `Plan`; this could be because Maica couldn't synchronise the `Plan` or the Participant did not give consent to synchronise the `Plan` or the Invoice is funded outside the NDIS funding structures.&#x20;

{% hint style="info" %}
When selecting self-funded Invoices, all recorded Support Categories will be shown when entering Invoice Line Items regardless of available funding or not. This effectively opens up the Invoice to enter any Support Category and Support Item needed.
{% endhint %}

#### Claim Behaviour

This is where some of the magic happens when entering and submitting `Invoices` to Maica. A few options exist when setting this value that will impact Maica's behaviour differently, including if a `Payment Request` record is created or not to facilitate PRODA Claims. &#x20;

The `Claim Behaviour` options are described further below:

<table><thead><tr><th width="179.33333333333331">Claim Behaviour</th><th width="439">Description</th><th>Payment Request</th></tr></thead><tbody><tr><td><code>Use Claim Settings</code></td><td>Uses whatever <a href="/pages/MfmSs2jYJs2f4v3yCrnZ">claim settings</a> have been set up by your team.</td><td></td></tr><tr><td><code>Claim Immediately</code></td><td>Maica will automatically process the <a href="/pages/bK5DouKXieqvqnAPD25i">claim</a> with PRODA for each <code>Invoice Line Item</code> as soon as the <code>Invoice</code> is saved.  A <code>Payment Request</code> record is created (for each <code>Invoice Line Item)</code>, submitted to PRODA and updated with the <strong>Result</strong> response (near real-time).<br><br>This option is available only when your organisation's <code>Claim Method</code> = <code>API</code> under Maica Settings (Claim Management).</td><td>Yes <span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td></tr><tr><td><code>Claim via BPR File</code></td><td>Maica will prepare the Invoice Line Item(s) to be claimed via the <strong>BPR File</strong> when this is generated.  A <code>Payment Request</code> record is created (for each <code>Invoice Line Item)</code>, with Status = blank.  This will be updated as part of the BPR generation process.<br><br>This option is available only when your organisation's <code>Claim Method</code> = <code>BPR File</code> under Maica Settings (Claim Management).<br><br><code>Invoice</code> records with this value (and related <code>Payment Request</code>(s) records) <strong>will be included</strong> in the BPR File.</td><td>Yes <span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td></tr><tr><td><code>Under Review</code></td><td>Effectively places the <code>Invoice</code> into a state of waiting for the next action, which may be to internally review the <code>Invoice</code> in most cases.<br><br>If you are claiming via the <strong>API</strong>, claim, simply change the <code>Claim Behaviour</code> value to <code>Claim Immediately</code> to claim from PRODA.<br><br>If you are claiming via the <strong>BPR File</strong>, you will need to use the <a href="/pages/kAe0j7pwZ6Yd4jrzyLQR">Claim Management</a> Quick Action to generate the <code>Payment Request</code> to be included in the BPR File.<br><br><code>Invoice</code> records with this value (and related <code>Payment Request</code>(s) records) <strong>will be included</strong> in the BPR File.</td><td>No <span data-gb-custom-inline data-tag="emoji" data-code="274c">❌</span></td></tr><tr><td><code>Do Not Claim</code></td><td>Creates the <code>Invoice</code> record in Salesforce and takes no further action; there are many use cases where you may just want to submit an <code>Invoice</code> for either historical purposes or a different processing mode, like wanting to send the <code>Invoice</code> to a Plan Manager or Participant.<br><br><code>Invoice</code> records with this value <strong>will not be included</strong> in the BPR File (even there are related <code>Payment Request</code> records).</td><td>No <span data-gb-custom-inline data-tag="emoji" data-code="274c">❌</span></td></tr></tbody></table>

{% hint style="info" %}
Once the Invoice has been reviewed and deemed ready to claim, simply change the `Claim Behaviour` value to `Claim Immediately` (for API Claim Method).
{% endhint %}

{% hint style="info" %}
In cases where you would like to dispatch Invoices to either Plan Managers or Participants, you can learn more about how to do this [here](/ndis-management/invoice-management.md).
{% endhint %}

### Adding Invoice Line Items

The real heartbeat of an `Invoice` is the `Invoice Line Item` which captures all the required information to either dispatch the Invoice or claim the Invoice from the NDIS. This section provides you with some more detail around what the various input fields are for an Invoice Line Item, including:

![Invoice Line Items added to an invoice](/files/izEElnrdW9qBMUSBGnVV)

#### Service Date

This is the date on which the service was delivered (as opposed to when the Invoice was raised); it is important to capture the service date to understand what the applicable rate was at the time the service was delivered as well as what budget was available within the `Service Bookings` funding the `Invoice`. Maica uses standard Salesforce `Price Books` to control pricing of `Support Items`.  You can learn more about Salesforce Products and Price Books below.

{% embed url="<https://help.salesforce.com/s/articleView?id=sf.pricebooks_landing_page.htm&type=5>" %}

#### Support Category

The `Support Category` is shown based on the available `Service Booking` funding at the time of service delivery, in other words, whatever `Support Categories` the Participant had funding for at the time the service was delivered will be shown to you.

This is described in more detail in the Invoice Entry Alerts & Validation section below.

{% hint style="info" %}
If the Invoice Funding Type is set to `Plan Managed`, Service Bookings will be filtered as described above. If the Invoice Funding Type is set to `Self-Funded`, no filters will be applied to Support Categories and all will be available for selection.
{% endhint %}

#### Support Item

The selection of the Support Item will depend on what Support Category was selected, all associated Support Items (which are managed as [Salesforce Products](https://help.salesforce.com/s/articleView?id=sf.products_landing_page.htm\&type=5)) will be shown to you and are available for selection. Here is an example of what a Support Items might look like when configured in Salesforce as a Product.

![A Support Item configured in Salesforce as a Product](/files/IdJZf4Zwz46H6Z89VfFZ)

#### Claim Type

The `Claim Type` is automatically set from the selected `Support Item` (Product) as you can see in the above screenshot, so there is no need to enter/change this unless this is required.

Most of the time, we expect this value to be simply read from the `Support Item` and preset for an `Invoice Line Item`.

#### Quantity

The `Quantity` captures how many of a particular `Support Item` is being captured, for example a Speech Therapy session will have a quantity of 1 but if multiple sessions are being invoiced, you can use quantity to set this.

#### Rate

The `Rate` is determined by Maica based on the `Service Date` and what `Price Book` the `Support Item` was (or continues to be) associated with. If only a single Price Book was associated with the Support Item, the rate will be preset but can be changed.

Based on the Participant, Maica attempts to default the `Price Book` based on the logic below.  The `Price Book` can still be changed, this is just to help streamline your `Invoice Line Item` entry.

* If the Participant has an **Active** `Service Agreement` with the Invoice `Provider`
  * That `Price Book` will be set as the default

<figure><img src="/files/LZeITigfbLNnzgFXwrk1" alt=""><figcaption><p>Service Agreement Price Book</p></figcaption></figure>

* If **no Active** `Service Agreement`
  * Default the `Price Book` based on Participant's State (`Contact`.`MailingState`)
* If > 1 `Price Book` records are returned (based on the State example)
  * Default the most recent `Price Book` based on `Last Sync Date` (this is generally `CreatedDate`)&#x20;
  * Please note: this **does not** support the `REMOTE` and `VERY REMOTE` `Pricebook` as these cannot be mapped to the Contact Mailing State

<figure><img src="/files/JCWw7rTxjGx3QtItlHZf" alt=""><figcaption><p>Mailing State defined on the Participant (Contact) record</p></figcaption></figure>

If the `Support Item` exists in **multiple** Price Books at the time of service, a dropdown to the right of the rate will be available for you to select the `Price Book` you wish to use.  You can see an example of this in the image below.

![How to select the Rate when a Support Item exists in multiple Active Price Books](/files/SHE7IRIqeVl1i7un2fAv)

{% hint style="info" %}
Only **Active** (`IsActive` = TRUE) `Price Book` records are displayed
{% endhint %}

#### GST Code

The `GST Code` is automatically set from the selected `Support Item` (Product) as you can see in the above screenshot, so there is no need to enter/change this unless this is required.

Most of the time, we expect this value to be simply read from the `Support Item` and preset for an `Invoice Line Item`.

{% hint style="info" %}
In cases where multiple Invoice Line Items are required across a date range, the best way to do this is to **duplicate** the `Invoice Line Item` row and change the date. Maica does not support entering Invoice Line Items across a date range, as each Invoice Line Item must be claimed individually.
{% endhint %}

![Duplicating an Invoice Line Item](/files/pBaRzzx6HRO1AowIGi2E)

### Adding Multiple Invoice Line Items

There may be a scenario where you need to create **multiple** `Invoice Lines` for the same `Support Item` that has been delivered over consecutive days.  Rather than creating a single Line Item and cloning it, the **Add Multiple** button on the Invoice Entry allows you to generate multiple Line Items with shared characteristics.

Clicking the **Add Multiple** button presents the modal below:

<figure><img src="/files/66cG35d4E9e8rTDxGJdF" alt=""><figcaption><p>Modal presented when the Add Multiple button is clicked</p></figcaption></figure>

Click confirm and watch Maica do the following:

* Generate the `Line Items` based on the  `Number of Lines` value
* For each `Line Item`, the `Service Date` will increase sequentially from the `First Service Date` based on the `Number of Lines`
* For example, if you entered:
  * `First Service Date` = 05/09/2022
  * `Number of Lines` = 5
* A total of **5 Invoice Lines** would be added for the dates 05/09 to 09/09
* All Invoice Lines will have the **same attributes** (`Quantity`/`Rate`/`Support Item`/`Claim Type`)

When using the Add Multiple option, there are some very important things to note:

* **No alerts** based on budget/agreement are displayed in the modal, these can only be seen **after** the Line Items are added
* If any of the dates fall on a **weekend or public holiday** - the normal validation will **not apply** and will need to be manually corrected
* The max date range will be 1 month (31 days)
* The default filter applied to the `Support Item` lookup is:
  * `IsActive` = TRUE
  * The `Product` has at least one Active `PricebookEntry`


---

# 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/invoice-entry.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.
