---
schema_version: "1"
id: bef278db543fd1280f5621ad6f3bdf98c56582d65ccba913bb0b8da40234fa13
title: PostTemplate
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/meta_posttemplate.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_posttemplate.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 1668b4fe532727c1f696d6d0aad46d85d666d843e19fa5b9e61a7b94bbca4392
description: Represents the metadata associated with an approval post template for Approvals in Chatter. With approval post templates, you can customize the information included in approval request posts that appear in Chatter feeds. This type extends the Metadata metadata type and inherits its fullName field.
---
# PostTemplate

Represents the metadata associated with an approval post template for Approvals in Chatter. With approval post templates, you can customize the information included in approval request posts that appear in Chatter feeds. This type extends the Metadata metadata type and inherits its fullName field.

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

#### Note

Review Chatter Post Templates for Approval Requests in the Salesforce Help before you create a post template.

## File Suffix and Directory Location

PostTemplate components have the suffix .postTemplate and are stored in the postTemplates folder.

## Version

PostTemplate components are available in API version 29.0 and later.

## Fields

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



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

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

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

            </tr>

          </thead>

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

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

              <td class="entry" headers="d756093e97" data-title="Description">Required. Specifies whether this is the default post template for
                the given object.<p class="p">When set to <samp class="codeph nolang">true</samp>, this post template is used by approval
                  processes that are associated with the same object and
                  don’t specify a post template.</p>
                <p class="p">When an object has
                  no default post template, each of its approval processes uses
                  the system default post template, unless the approval process
                  specifies its own post template.</p>
              </td>

            </tr>

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

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

              <td class="entry" headers="d756093e97" data-title="Description">Optional description of the post template.</td>

            </tr>

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

              <td class="entry" headers="d756093e94" data-title="Field Type">string[]</td>

              <td class="entry" headers="d756093e97" data-title="Description">Required. An array of up to four fields to include in approval
                request posts.<p class="p">If the approval object is a detail object in a
                  master-detail relationship, <span class="keyword parmname">Owner</span> isn’t
                  available for approval page layouts or approval post
                  templates.</p>
              </td>

            </tr>

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

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

              <td class="entry" headers="d756093e97" data-title="Description">Required. Name of the post template. This non-unique label is
                different from the unique name of the post template.</td>

            </tr>

          </tbody>

        </table>

## Declarative Metadata Sample Definition

The following is an example of a PostTemplate component:

<PostTemplate xmlns="http://soap.sforce.com/2006/04/metadata">
    <default\>false</default\>
    <fields\>NumberOfEmployees</fields\>
    <fields\>NumberofLocations\_\_c</fields\>
    <fields\>PartnerAccount</fields\>
    <fields\>LeadCustomFieldNumber\_\_c</fields\>
    <label\>My Lead Post Template</label\>
</PostTemplate\>

The following is an example package manifest that references the previous PostTemplate component.

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types\>
        <members\>Lead.leadtemplate</members\>
        <name\>PostTemplate</name\>
    </types\>
    <version\>29.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).