# Shift

## Fields & Relationships &#x20;

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

{% embed url="<https://docs.google.com/spreadsheets/d/1nF3bXTDoI4CUZ53Phlt_QYYIs6eUS4S9lKXko4Lr_8Y/edit?usp=sharing>" %}
Shift Schema
{% endembed %}

{% hint style="success" %}
Click [here](https://docs.google.com/spreadsheets/d/1nF3bXTDoI4CUZ53Phlt_QYYIs6eUS4S9lKXko4Lr_8Y/edit?usp=sharing) to view and download the complete Shift Schema.
{% endhint %}

## Validation Rules

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

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

### Shift Start Date Must Be Before Shift End Date

Ensures that the Shift Start Date is before the Shift End Date

| Validation Rule Detail |                                                          |
| ---------------------- | -------------------------------------------------------- |
| Rule Name              | VAL\_SHIFT\_0001                                         |
| Error Message          | VAL\_0001: The Shift Start must be before the Shift End. |
| Error Location         | `Shift Start`                                            |

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

```apex
AND(
    NOT(ISBLANK(maica_cc__Shift_Start__c)),
    NOT(ISBLANK(maica_cc__Shift_End__c)),
    maica_cc__Shift_Start__c > maica_cc__Shift_End__c
)
```

{% 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/shift.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.
