# Connection

## Fields & Relationships &#x20;

The table below provides a comprehensive overview of all fields and relationships for the **Connection** object in **Maica**. Please refer to the table below for detailed information.

{% embed url="<https://docs.google.com/spreadsheets/d/1LYS0-SuVxNwB5fE6aRxDj_d6g7cUbEtlJk3yL-Was58/edit?usp=sharing>" %}
Connection Schema
{% endembed %}

{% hint style="success" %}
Click here to view and download the complete Connection Schema.
{% endhint %}

## Validation Rules

The list below outlines the **Validation Rules** applied to the **Connection Object** in **Maica**.&#x20;

Please refer to the list below for more detailed information on each **Validation Rule.**

### Email Address Required for Connection Related Contact When Invoice or Statement Recipient equals TRUE

This rule is to ensure that the Connection Related Contact has an Email address when Invoice Recipient and/or Statement Recipient = TRUE

| Validation Rule Detail |                                                                                                                    |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------ |
| Rule Name              | VAL\_CONNECTION\_0001                                                                                              |
| Error Message          | VAL\_0001: The Related Contact must have an Email address when Invoice Recipient and/or Statement Recipient = TRUE |
| Error Location         | `Top of Page`                                                                                                      |

{% code title="Error Condition Formula " %}

```apex
AND(
OR(
maica_cc__Statement_Recipient__c,
maica_cc__Invoice_Recipient__c
),
ISBLANK(maica_cc__Related_Contact__r.Email)
)
```

{% endcode %}


---

# 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://knowledge.maica.com.au/maica-knowledge-base/maica-administration-guide/data/data-objects/connection.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.
