# Service Agreement Overview

In Maica, the `Service Agreement` is a central object, underpinning some important aspects of your management and engagement with your Participants.  It can be used to support a number of use cases, including defining the delivery specifics of your service arrangements, as well as the Participant/Client's financial utilisation and consumption of the agreed services.

Essentially, the `Service Agreement`, together with the `Agreement Item` records represent the **Type**, i.e. `Support Category`/`Support Item`, and the **Amounts**, i.e. `Quantity` and `Rate` that have been discussed, agreed and reserved for you to deliver to your Participants/Clients.

The `Service Agreement` record is where you can find the following information and functionality:

* Service Agreement Funding Information (Service Budget Information)
* Agreement Status (Active / Completed / Cancelled etc)
* Service Agreement Period Information (Start Date & End Date)
* Service Agreement Progress Information (Period and Funding Utilisation)
* Service Agreement Items (where the actual details of the funded supports are defined, more on those below)
* The Service Provider (if you using Service Agreements from a Plan Management perspective)

## Opportunity --> Service Agreement

In order to fully leverage `Service Agreement` records in Maica, we recommend creating these records as part of your client acquistion/onboarding flow.  Adhering to this process/flow ensures that theService Agreement will be created and populated with all the required information for Maica to best manage and automate many of your service delivery processes.

The article below contains a section defining `Service Agreement` creation from `Opportunity`.

## Service Agreements as a Plan Manager

If you are using Maica from a Plan Management perspective, Service Agreements are a good way to reserve or '*quarantine*' funds between a specific Provider and Participant.  Via Maica, you can use a `Service Agreement` record to capture and define what has been agreed between the two parties, in terms of both the **Support Item** and the **Amount** or Value.

Once a `Service Agreement` has been defined, Maica uses this for validation purposes and also to track how the specifics of the Agreement (the `Agreement Item` records) are being utilised, i.e. how the Agreement budget is being consumed.

To see how the `Service Agreement` is referenced during the **Invoice Entry** process, see the article below.

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

If the Participant has an **Active** `Service Agreement` at the point of Invoice Entry, the Agreement `Price Book` will be used as the default `Price Book` for Product `Rate` information.

## Funding Information Section

The Funding Information section contains a number of **Roll-Up Summary** fields that aggregate data from the associated `Agreement Item` record(s).  For example: if there are 3 `Agreement Item` records with a `Total Allocated` of $100 each, the `Total Allocated` value on the `Service Agreement` record will be $300.

In the event that there are no `Agreement Item` records all the rollups in this section will be blank.

<table><thead><tr><th width="230">Field Name</th><th>Notes</th></tr></thead><tbody><tr><td><code>Total Allocated</code></td><td><p>The <code>maica__TotalAllocated__c field</code> represents the total budget, or funding allocated to the Agreement Item.  Essentially, the calculation was updated and is now as per the below:</p><ul><li><p>For Stated Items, this is calculated as:</p><ul><li><code>maica__Total_Expenditure__c</code> + (<code>maica__Quantity_Remaining__c</code> * <code>maica__Rate__c</code>)</li></ul></li><li><p>For Bucket/Category Items, this is calculated as:</p><ul><li><code>maica__Quantity__c</code> * <code>maica__Rate__c</code></li></ul></li></ul></td></tr><tr><td><code>Total Committed</code></td><td>Number Field, no logic but can be configured using Salesforce Flows based on unique logic and requirement.</td></tr><tr><td><code>Total Remaining</code></td><td><p><strong>Formula</strong> using the following logic:</p><p></p><p><code>maica__TotalAllocated__c</code> - (<code>maica__Total_Expenditure__c</code> + <code>maica__Total_Committed__c</code>)</p></td></tr><tr><td><code>Total Expenditure</code></td><td><strong>SUM</strong> total of the <code>Expenditure Amount</code></td></tr><tr><td><code>Utilisation</code></td><td><strong>Formula</strong> that divides the <code>Total Expenditure</code> by the <code>Total Allocated</code> to display a percentage indicating how much of the total <strong>Total Allocated</strong> has been consumed.</td></tr></tbody></table>

{% hint style="info" %}
For Production clients, a script can be run to populate the new `maica__TotalAllocated__c` field on existing Service Agreement records.
{% endhint %}

## Service Agreement Status

The `Status` of the `Service Agreement` is managed via a **Formula** field, meaning this is set based on the properties of the record and you do not have to manually manage this.

The Formula used to do this is below:

```
IF( maica__Is_Cancelled__c = true, 'Inactive',
IF(AND(TODAY() >= maica__Start_Date__c, TODAY() <= maica__End_Date__c), 'Active',
IF(TODAY() < maica__Start_Date__c, 'Pending Start',
IF(TODAY() > maica__End_Date__c, 'Expired', 'Inactive'))))
```

## Service Agreement Related Lists

There are 2 **key objects** related to the `Service Agreement` record.  These are summarised below.&#x20;

### Agreement Item

The `Agreement Item` represents the specific Budget Items or Supports that the `Service Agreement` will cater for.  Create `Agreement Item` records to reflect the specific Services (`Support Category` and/or `Support Item`) that you have discussed and agreed to deliver to your Clients.

{% hint style="info" %}
All fields on the `Booking Item` layout are **read-only**.  They can be managed via the Manage Service Booking Quick Action on the `Service Agreement`.
{% endhint %}

#### Funding Information

The `Agreement Item` represents not only the '**what**' but also '**how much**' of a specific Product or Service is to be delivered to the Participant/Client via a combination of the `Quantity` and the `Rate`, or Cost for each item.  This is all defined in the Funding Information section of an `Agreement Item` record.

Much like an `Opportunity`, standard Salesforce `Price Book` functionality is used to manage the `Rate` for the selected `Product` (Support Item).  The `Price Book` itself is defined at the `Service Agreement` level, meaning that at the `Agreement Item` level, the `Price Book Entry` record is used as the source of the `Rate`. &#x20;

This section also contains the following **formula** or calculated **values**:

<table><thead><tr><th width="293">Agreement Item Field</th><th>Description</th></tr></thead><tbody><tr><td><code>Total Allocated</code></td><td><p>The <code>maica__TotalAllocated__c field</code> represents the total budget, or funding allocated to the Agreement Item.  Essentially, the calculation was updated and is now as per the below:</p><ul><li><p>For Stated Items, this is calculated as:</p><ul><li><code>maica__Total_Expenditure__c</code> + (<code>maica__Quantity_Remaining__c</code> * <code>maica__Rate__c</code>)</li></ul></li><li><p>For Bucket/Category Items, this is calculated as:</p><ul><li><code>maica__Quantity__c</code> * <code>maica__Rate__c</code></li></ul></li></ul></td></tr><tr><td><code>Total Expenditure</code></td><td>Represents the amount spent by the Participant for the <code>Agreement Item</code>.  This is calculated as the SUM of the <code>Invoice Line Item</code> (<code>Line Total</code>) records associated with the <code>Agreement Item</code>.<br><br>This value is calculated and managed by Maica.</td></tr><tr><td><code>Total Remaining</code></td><td><p><strong>Formula</strong> using the following logic:</p><p></p><p><code>maica__TotalAllocated__c</code> - (<code>maica__Total_Expenditure__c</code> + <code>maica__Total_Committed__c</code>)</p></td></tr><tr><td><code>Utilisation</code></td><td><strong>Formula</strong> that divides the <code>Total Expenditure</code> by the <code>Total Allocated</code> to display a percentage indicating how much of the total <strong>Total Allocated</strong> has been consumed.</td></tr></tbody></table>

#### Schedule Information

Beyond the financial or funding information, the `Agreement Item` is also the place where you can find the Schedule information that will provide a template or guide when managing service delivery activities.

These fields are as follows:

<table><thead><tr><th width="289">Agreement Item Field</th><th>Description</th></tr></thead><tbody><tr><td><code>Schedule</code></td><td>Indicates if the <code>Support Item</code> should be delivered once off or in multiple instances, i.e. part of a schedule<br>Values are:<br>- <code>Only one time</code><br>- <code>Multiple times</code></td></tr><tr><td><code>Service Frequency</code></td><td>How often should the Item be delivered under the <code>Service Agreement</code>.  Values are:<br>- <code>Daily</code><br>- <code>Weekly</code><br>- <code>Monthly</code><br>- <code>One Time</code><br><br>If <code>Schedule</code> = <code>Only one time</code>, this value will be One Off</td></tr><tr><td><code>Service Duration</code></td><td>The default duration of time the <code>Support Item</code> will be delivered for, i.e. 1.0 hour</td></tr><tr><td><code>Service Day</code></td><td>Indicates the nominated delivery window (<strong>day</strong>) of the Participant/Client.  Values are:<br>- <code>Weekday</code><br>- <code>Saturday</code><br>- <code>Sunday</code><br>- <code>Public Holiday</code><br>- <code>Anytime</code></td></tr><tr><td><code>Service Time</code></td><td>Indicates the nominated delivery window (<strong>time of day</strong>) of the Participant/Client.  Values are:<br>Values are:<br>- <code>Daytime</code><br>- <code>Afternoon</code><br>- <code>Evening</code><br>- <code>Night</code><br>- <code>Anytime</code></td></tr><tr><td><code>Schedule Day</code></td><td>Indicates the selected delivery window (<strong>time of day</strong>) of the Participant/Client.  Values are:<br>- <code>Monday</code><br>- <code>Tuesday</code><br>- <code>Wednesday</code><br>- <code>Thursday</code><br>- <code>Friday</code><br>- <code>Saturday</code><br>- <code>Sunday</code></td></tr></tbody></table>

The `Service Day`, `Service Time` and `Schedule Day` fields are used to filter the list of `Products` (`Support Item`) for the `Agreement Item`.  The intention is to ensure that the Product selected and ultimately delivered to the Participant/Client matches their preferences captured in the `Opportunity` stage.

{% hint style="success" %}
If the `Service Agreement` is created from an `Opportunity`, these fields will be populated as part of this process
{% endhint %}

## Manage Service Agreement

The **Manage Service Agreement** Quick Action (or QA) brings a number of key, everyday functions directly within Salesforce providing greater flexibility and control over how you deliver your Services to your Participants/Clients.

The Quick Action is accessed directly from a `Service Agreement` record with each of the functions described below.

<figure><img src="/files/NwMnQLQ8uYLqPR0yS5ot" alt=""><figcaption><p>The available actions via the Manage Service Agreement Quick Action</p></figcaption></figure>

### Update Price Book

The `Price Book` on the `Service Agreement` is used to manage the `Rate`, or cost, of the `Support Item` defined for each `Agreement Item` record.

This is initially set based on the originating `Opportunity`, or the `Opportunity` that was used as the source to generate the `Service Agreement`.  Once the Service Agreement record has been created, there may, at times, be a need to update the `Price Book` associated with the `Service Agreement` and the `Agreement Item` records.  The Manage Service Agreement QA is just the place to do that.

In order to update the `Price Book`, simply **clear** the lookup of the existing value and select the new `Price Book` you would like to use.  Once selected,  the following will occur within the modal:

* The `Rate` for each `Agreement Item` will be refreshed to reflect the **new Price** from the `Price Book`
  * Well technically this is from the `Price Book Entry` for the specific `Product`
* The `Total` for each `Agreement Item` will be updated
* The `Total Allocated`, or **SUM total** of all `Agreement Item` records, will be updated

The image below illustrates how to update the `Price Book` and how the updated price impacts each `Agreement Item` and the overall `Service Agreement` budget.

<figure><img src="/files/VJz7DTlRnFgIsja7W0SX" alt=""><figcaption><p>Update Price Book via the Manage Service Agreement Quick Action</p></figcaption></figure>

When you click **Submit** and save the changes, the following updates are triggered:

* The `Service Agreement` `Price Book` lookup will be updated
  * This is the`maica__Service_Agreement__c`.`maica__Price_Book__c` field
* The `Rate` of **all associated** `Agreement Item` records will be updated to reflect the price from the new `Price Book`
  * Well technically this is from the `Price Book Entry` for the specific `Product`
  * This is the `maica__Agreement_Item__c`.`maica__Rate__c` field
* The following `Agreement Item` fields will be **recalculated**:
  * `Total Allocated` ($)
  * `Total Remaining` ($)
  * `Utilisation` (%)
* The following `Service Agreement` fields will be **recalculated**:
  * `Total Allocated` ($)
  * `Total Remaining` ($)
  * `Utilisation` (%)

{% hint style="warning" %}
The **recalculation** of the `Total Allocated` value based on the updated `Rate` will very likely **reduce** the amount of available funds for the Agreement Item as it usually reflects an increased price for each Support Item (Product).
{% endhint %}

* Lastly, an `Agreement History` record will be created as an **audit** record or history of the updates made.  The tracked fields include:
  * `Original Agreement Amount`
  * `New Agreement Amount`
  * `Original Agreement Quantity`
  * `New Agreement Quantity`
  * `Original Price Book`
  * `New Price Book`

<figure><img src="/files/GmidEBtNMhrAqRnUi9Gq" alt=""><figcaption><p>Agreement History record with the Agreement Amount and Price Book Updates</p></figcaption></figure>

### Manage End Date

#### Extend End Date

In the scenario where a Client wishes to receive the same (*or similar*) Services and **continue** beyond the current Agreement date range, you can extend the `End Date` of the current `Service Agreement` rather than go through the `Opportunity` process to generate a new Agreement.

There are two options when extending the `End Date`:&#x20;

* Update `Service Agreement` only
  * This will update the `End Date` of the `Service Agreement` record only
* Include `Agreement Item`(s)
  * If you check this option, the `End Date` of all associated `Agreement Item` record(s) will also be extended

{% hint style="info" %}
The word *similar* was *italicised* in the text above to indicate that you can extend the `Service Agreement` and continue to work within the same Support Categories.  You **cannot add new** Support Categories.  In order to do this, you need to go through the Opportunity process.
{% endhint %}

#### Reduce End Date

If circumstances change between you and one of your Participants, you can use the manage Service Agreement QA to reduce the `End Date` of a existing `Service Agreement`.  This may be needed in the scenario where you need to Cancel or End a `Service Agreement` prematurely.

To do this, you do not need to delete the record, instead, you can reduce the `End Date` and set a date between today’s date and the existing `End Date`.  Doing this will update the `End Date` on the `Service Agreement` and if the new End Date entered = TODAY, the `Status` will be automatically updated to **Inactive** also.

Just like the extend `End Date` described above, you can reduce the `End Date` of the `Service Agreement` only or you can include the `Agreement Item` record(s) also.

#### Agreement Item Dates

In regards to managing **both** the `Start Date` and `End Date` of your `Agreement Item` record(s), you can do that via the two date fields in the Agreement Item table.  Simply locate the desired `Agreement Item` and set the updated date.  Doing this will update the `Agreement Item` **only** and not the `Service Agreement`.

{% hint style="info" %}
The following validation applies to the `Agreement Item` Dates:

* The `Agreement Item` `Start Date` must be the **same or after** the `Service Agreement` `Start Date`
* The `Agreement Item` `End Date` must be the **same or before** the `Service Agreement` `End Date`
  {% endhint %}

### Manage Support Item & Quantity

As the needs and goals of your Clients **change**, the Manage Service Agreement QA provides the flexibility to adapt your Service Agreements and change along with them.

Similar to `Service Bookings` and how **flexibility** is provided for funding at the `Support Category` level, the Manage Service Agreement QA provides the ability for you to update and change the `Support Item`, (`Product`), at the `Agreement Item` level. &#x20;

In order to update the `Support Item`, simply click the drop-down and select the new `Support Item`.  Once selected,  the following will occur within the modal:

* The `Rate` for each `Agreement Item` will be refreshed to reflect the new `Support Item`
  * This is based on the `Price Book` (or more accurately, the `Price Book Entry`) associated with the `Service Agreement`
* The `Total` for the `Agreement Item` will be updated
* The `Total Allocated`, or **SUM total** of all `Agreement Item` records, will be updated

The image below illustrates how to update the `Support Item` and how the updated `Rate` impacts the `Agreement Item` and the overall `Service Agreement` budget.

You can also update the `Quantity` as part of updating the `Support Item`, or alternatively, you can update the `Quantity` of an existing `Support Item`.  Any change in `Quantity` will also effect the `Agreement Item` Total, as this is calculated based on `Quantity` \* `Rate`.

<figure><img src="/files/TgdXAQsNZS1ntXNsPSti" alt=""><figcaption><p>Update Support Item via the Manage Service Agreement Quick Action</p></figcaption></figure>

When you click **Submit** and save the changes, the `Agreement Item` will be updated with the new `Support Item` and/or `Quantity` information, triggering the same recalculations as described in the [Update Price Book](#update-price-book) section above.

### Manage Delivery Mode

The Delivery Mode allows you to specify how you would like to use the available budget of a `Service Agreement`, particularly when scheduling services to be delivered. We offer you two distinct ways to treat the available `Service Agreement` budget, including:

* `Locked` which means that **only the actual** `Support Item` specified can be used when scheduling services; this can be compared to a **stated** Support (`Service Booking Item`) in which a specific Support Item is stipulated and can't be changed for delivery.
* `Flexible` which means any `Support Item` from the associated `Support Category` can be selected when scheduling services. This essentially represents a bucket of funds for a given `Support Category` from which services can be scheduled.   This is similar to `Service Bookings` and how **flexibility** is provided for funding at the `Support Category` level.

{% hint style="info" %}
We only allow you to have one `flexible` Service Agreement Item per `Service Agreement` as **Maica** can't manage multiple buckets of the same category when reducing the available budget.

You can include any number of `Support Category/Support Item` combinations that are locked within your `Service Agreement`, as long as this combination is unique within the agreement.
{% 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/service-agreement-overview.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.
