---
schema_version: "1"
id: 9178d990b4147f9369c7ec43f6b5960357ffef7432c5d58b1fd5b0faff915686
title: TimeSheetTemplate
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/meta_timesheettemplate.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_timesheettemplate.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 7997513fed054db24df0a8b447fca3e23bc4d805b276b2c605518ac557ecabce
description: Represents a template for creating time sheets in Field Service. This type extends the Metadata metadata type and inherits its fullName field.
---
# TimeSheetTemplate

Represents a template for creating time sheets in Field Service. This type extends the Metadata metadata type and inherits its fullName field.

![Important](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/images/icon_note_important.png)

#### Important

Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations.

## File Suffix and Directory Location

TimeSheetTemplate components have the suffix timeSheetTemplate and are stored in the timeSheetTemplates folder.

## Version

TimeSheetTemplate components are available in API version 46.0 and later.

## Special Access Rules

Field Service must be enabled. Users must have the Customize Application and Time Sheet Template permissions.

## Fields

<table class="featureTable sort_table" summary="">



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d901709e99">Field Name</th>

              <th class="featureTableHeader  " id="d901709e102">Field Type</th>

              <th class="featureTableHeader  " id="d901709e105">Description</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d901709e99" data-title="Field Name"><span class="keyword parmname">active</span></td>

              <td class="entry" headers="d901709e102" data-title="Field Type">boolean</td>

              <td class="entry" headers="d901709e105" data-title="Description">Required. Indicates whether the time sheet template is active (<samp class="codeph nolang">true</samp>) or not (<samp class="codeph nolang">false</samp>).</td>

            </tr>

            <tr>
              <td class="entry" headers="d901709e99" data-title="Field Name"><span class="keyword parmname">description</span></td>

              <td class="entry" headers="d901709e102" data-title="Field Type">string</td>

              <td class="entry" headers="d901709e105" data-title="Description">The time sheet template's description.</td>

            </tr>

            <tr>
              <td class="entry" headers="d901709e99" data-title="Field Name"><span class="keyword parmname">frequency</span></td>

              <td class="entry" headers="d901709e102" data-title="Field Type">TimeSheetFrequency (<a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_objects_intro.htm#enumeration_title">enumeration</a> of type string)</td>

              <td class="entry" headers="d901709e105" data-title="Description">Required. Defines the frequency of the time sheet creation period. One of the
                following values:<ul class="ul bulletList">
                  <li class="li"><samp class="codeph nolang">Daily</samp></li>

                  <li class="li"><samp class="codeph nolang">Weekly</samp></li>

                  <li class="li"><samp class="codeph nolang">EveryTwoWeeks</samp></li>

                  <li class="li"><samp class="codeph nolang">TwiceAMonth</samp></li>

                  <li class="li"><samp class="codeph nolang">Monthly</samp></li>

                </ul>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d901709e99" data-title="Field Name"><span class="keyword parmname">masterLabel</span></td>

              <td class="entry" headers="d901709e102" data-title="Field Type">string</td>

              <td class="entry" headers="d901709e105" data-title="Description">Required. The name of the time sheet template.</td>

            </tr>

            <tr>
              <td class="entry" headers="d901709e99" data-title="Field Name"><span class="keyword parmname">startDate</span></td>

              <td class="entry" headers="d901709e102" data-title="Field Type">date</td>

              <td class="entry" headers="d901709e105" data-title="Description">Required. The date when the time sheet takes effect.</td>

            </tr>

            <tr>
              <td class="entry" headers="d901709e99" data-title="Field Name"><span class="keyword parmname">timeSheetTemplateAssignments</span></td>

              <td class="entry" headers="d901709e102" data-title="Field Type">
                <a class="xref" href="#TimeSheetTemplateAssignment">TimeSheetTemplateAssignment</a>
              </td>

              <td class="entry" headers="d901709e105" data-title="Description">A list of profiles that the template is assigned to.</td>

            </tr>

            <tr>
              <td class="entry" headers="d901709e99" data-title="Field Name"><span class="keyword parmname">workWeekEndDay</span></td>

              <td class="entry" headers="d901709e102" data-title="Field Type">DaysOfWeek (<a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_objects_intro.htm#enumeration_title">enumeration</a> of type string)</td>

              <td class="entry" headers="d901709e105" data-title="Description">Required. The end day of the template's work week. One of the following values:<ul class="ul bulletList">
                  <li class="li"><samp class="codeph xml">Monday</samp></li>

                  <li class="li"><samp class="codeph xml">Tuesday</samp></li>

                  <li class="li"><samp class="codeph xml">Wednesday</samp></li>

                  <li class="li"><samp class="codeph xml">Thursday</samp></li>

                  <li class="li"><samp class="codeph xml">Friday</samp></li>

                  <li class="li"><samp class="codeph xml">Saturday</samp></li>

                  <li class="li"><samp class="codeph xml">Sunday</samp></li>

                </ul>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d901709e99" data-title="Field Name"><span class="keyword parmname">workWeekStartDay</span></td>

              <td class="entry" headers="d901709e102" data-title="Field Type">DaysOfWeek (<a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_objects_intro.htm#enumeration_title">enumeration</a> of type string)</td>

              <td class="entry" headers="d901709e105" data-title="Description">Required. The start day of the template's work week. One of the following values:<ul class="ul bulletList">
                  <li class="li"><samp class="codeph xml">Monday</samp></li>

                  <li class="li"><samp class="codeph xml">Tuesday</samp></li>

                  <li class="li"><samp class="codeph xml">Wednesday</samp></li>

                  <li class="li"><samp class="codeph xml">Thursday</samp></li>

                  <li class="li"><samp class="codeph xml">Friday</samp></li>

                  <li class="li"><samp class="codeph xml">Saturday</samp></li>

                  <li class="li"><samp class="codeph xml">Sunday</samp></li>

                </ul>
              </td>

            </tr>

          </tbody>

        </table>

## TimeSheetTemplateAssignment

Returns a quick action that’s associated with an EmbeddedServiceLiveAgent setup. The quick action includes the pre-chat form fields that the embedded chat window displays and shows the order in which the fields are displayed.

| Field Name | Field Type | Description |
| --- | --- | --- |
| assignedTo | string | The IDs of the user profiles that a time sheet template is assigned to. |

## Declarative Metadata Sample Definition

The following is an example of a TimeSheetTemplate file.

<?xml version=“1.0” encoding=“UTF-8"?>
<TimeSheetTemplate xmlns=“http://soap.sforce.com/2006/04/metadata“>
   <active\>true</active\>
   <description\>Time Sheet Template description</description\>
   <frequency\>Daily</frequency\>
   <masterLabel\>label</masterLabel\>
   <startDate\>2018-10-18</startDate\>
   <timeSheetTemplateAssignments\>
       <assignedTo\>admin</assignedTo\>
   </timeSheetTemplateAssignments\>
   <timeSheetTemplateAssignments\>
       <assignedTo\>standard</assignedTo\>
   </timeSheetTemplateAssignments\>
   <workWeekEndDay\>Tuesday</workWeekEndDay\>
   <workWeekStartDay\>Monday</workWeekStartDay\>
</TimeSheetTemplate\>

The following is an example package.xml that references the previous definition.

<?xml version=“1.0” encoding=“UTF-8"?>
<Package xmlns=“http://soap.sforce.com/2006/04/metadata“>
   <types\>
       <members\>\*</members\>
       <name\>TimeSheetTemplate</name\>
   </types\>
   <version\>46.0</version\>
</Package\>

## Wildcard Support in the Manifest File

This metadata type supports the wildcard character \* (asterisk) in the package.xml manifest file. For information about using the manifest file, see [Deploying and Retrieving Metadata with the Zip File](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/file_based_zip_file.htm).