> For the complete documentation index, see [llms.txt](https://help.tillit.cloud/tillit/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.tillit.cloud/tillit/knowledge-base/setting-up-tillit/asset-hierarchy/shifts/shift-patterns.md).

# Creating a Shift Template

### Overview

{% embed url="<https://youtu.be/QKjyZhuTtG4>" %}

Some activities will need to be triggered at the start and end of your staff shift patterns. To accommodate this, TilliT has the ability to create shift templates, which will define when the start and end of shift events are triggered.

Creating Shift Patterns in TilliT is a two-step process: Shift Template, then Shift Calendar. First, we create a Shift Template.

## Creating a Shift Template

{% hint style="info" %}
Navigate to ***Settings > Asset Hierarchy > Shift Templates***:
{% endhint %}

<figure><img src="https://352909507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNT40XJFAFlAhUX8CcQS%2Fuploads%2FldZgmXq2RDJrwzWneRif%2Fimg.png?alt=media&amp;token=ad84ba7f-31f9-4238-9d36-8984c72445f0" alt="TilliT navigation menu with Settings > Asset Hierarchy > Shift Templates selected and highlighted" width="151"><figcaption></figcaption></figure>

{% stepper %}
{% step %}
Click **Create**.

<figure><img src="https://352909507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNT40XJFAFlAhUX8CcQS%2Fuploads%2FToIS4tR7XGVEQuFcAQMi%2Fimage.png?alt=media&amp;token=b3b5d548-e6a9-4bcd-9f96-2cc390f3d7fa" alt="Shift Template section highlighting the Create button"><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Fill in the required fields.

<figure><img src="https://352909507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNT40XJFAFlAhUX8CcQS%2Fuploads%2FRk4gYL4cADrP1sy7BflY%2Fimage.png?alt=media&amp;token=9286c1f5-ce8e-43df-af09-19816f20267c" alt="Modal window titled &#x22;Create Shift Template&#x22; with form fields for Name *, Description, Workers, and Filter By Start Time"><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Click the **Save and close** button to finalise.
{% endstep %}
{% endstepper %}

### Fields

| Field       | Description                                                                                                                                                                                                                                                                          |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Name \*     | Name of the Shift, e.g "Morning Shift"                                                                                                                                                                                                                                               |
| Description | Description of the Shift                                                                                                                                                                                                                                                             |
| Workers     | Number of workers needed for the shift                                                                                                                                                                                                                                               |
| Filter By   | <p>This is used for overnight shifts where you can choose whether shift reporting will be by the start date or the end date.<br>This means that the asset reporting and shift reporting might look like they have discrepancies for overnight shifts for the same date selected.</p> |

### Adding the number of workers

For existing Shift Templates, add the quantity of Workers on the **Workers field** located in the **Basic Information panel**.

<figure><img src="https://352909507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNT40XJFAFlAhUX8CcQS%2Fuploads%2Fgit-blob-d454c4d91b2971d4d1dc17760ce6a35ec6263677%2Fimage.png?alt=media" alt="Basic Information panel of a shift template showing fields for Name (&#x22;Afternoon shift&#x22;), Description, and Workers quantity set to 3"><figcaption></figcaption></figure>

## Creating Shift Template Items

A Shift Template acts as a container, but to define when the shift actually operates (its start time, end time, and break periods), you must add **Shift Template Items**.

Each item represents an active working block within the shift pattern.

{% hint style="info" %}
Navigate to **Settings > Asset Hierarchy > Shift Templates**. Then select the relevant **Shift Template**, locate the **Items** **panel**, and click open.
{% endhint %}

{% stepper %}
{% step %}
Click **Create**.

<figure><img src="https://352909507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNT40XJFAFlAhUX8CcQS%2Fuploads%2FCSFczLZUZqfWuspaDvAH%2Fimage.png?alt=media&amp;token=75a7fe93-5e4c-4e84-b57f-945b4110572f" alt="Items panel highlighting the Create button"><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Define the Start Time and End Time you wish to add to the shift.

<figure><img src="https://352909507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNT40XJFAFlAhUX8CcQS%2Fuploads%2FtFqNCO29G4nC8ImwG0J7%2Fimage.png?alt=media&amp;token=42525e32-2112-412c-abbc-c4f764421aab" alt="Modal window titled &#x22;Create Shift Template Item&#x22; with dropdown for &#x22;Shift Template *&#x22; (selected as &#x22;Morning 8hr&#x22;), time selectors for &#x22;Start Time&#x22; (08:00) and &#x22;End Time&#x22; (12:00)."><figcaption></figcaption></figure>

{% hint style="info" %}
**Handling Breaks:**

If you know when the breaks occur, create two or more **Shift Template Items** to define the working periods around those breaks (e.g., Block 1: 08:00 to 12:00 | Block 2: 13:00 to 18:00).

<img src="https://352909507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNT40XJFAFlAhUX8CcQS%2Fuploads%2F4HdVM9CCd76zw8L8NjHS%2Fimage.png?alt=media&amp;token=1ef0d716-6922-4c83-9fcc-b33506a831b1" alt="" data-size="original">

**Break time is considered when tracking OEE in TilliT.**
{% endhint %}
{% endstep %}

{% step %}
Click the **Save and close** button.
{% endstep %}
{% endstepper %}

{% hint style="info" %}
Once you've set up the Shift Templates, you can apply them to [**Calendars Items**](/tillit/knowledge-base/setting-up-tillit/asset-hierarchy/calendar/calendar-item.md).
{% endhint %}

You can now use Shift Started and Shift Ended triggers for activities in the [When](https://help.tillit.cloud/article/158-setting-up-the-activity-template-when) clause.

Confirm that the above setup has worked by seeing your shift events occurring at the specified time on the event timeline and a shift instance has been created

<figure><img src="https://s3.amazonaws.com/helpscout.net/docs/assets/60208fd212248b2c96d50eeb/images/62b023cc1e5b41737b38fa85/file-0R4WtNw9hz.png" alt="Split view showing the Asset Timeline on the left with &#x22;Shift started&#x22; and &#x22;Shift ended&#x22; events, and the &#x22;Shift Instance&#x22; data table on the right"><figcaption></figcaption></figure>
