Letterhead

Represents formatting options for the letterhead in an email template. A letterhead defines the logo, page color, and text settings for your HTML email templates. Use letterheads to ensure a consistent look and feel in your company’s emails.

For more information, see “Create Classic Letterheads for Email Templates” in the Salesforce online help.

Parent Type 

This type extends Metadata and inherits its fields.

File Suffix and Directory Location 

The file suffix for letterheads is .letter and components are stored in the letterhead directory of the corresponding package directory.

Version 

Letterheads are available in API version 12.0 and later.

Fields 

available 

  • Type: boolean
  • Required: Yes
  • Description: Required. Indicates whether this letterhead can be used (true) or not (false), for example, in an email template.

backgroundColor 

  • Type: string
  • Required: Yes
  • Description: Required. The background color, in hexadecimal, for example #FF6600.

bodyColor 

  • Type: string
  • Required: Yes
  • Description: Required. The body color in hexadecimal.

bottomLine 

  • Type: LetterheadLine
  • Required: Yes
  • Description: Required. The style for the bottom line. Valid style values include:
  • Possible values:
    • color — . The color of the line in hexadecimal, as a string value.
    • height — . The height of the line, as an int value.

description 

  • Type: string
  • Required: No
  • Description: Text description of how this letterhead differs from other letterheads.

footer 

fullName 

  • Type: string
  • Required: No
  • Description: The internal name of the letterhead, based on the name, but with white spaces and special characters escaped out for validity.

header 

middleLine 

  • Type: LetterheadLine
  • Required: Yes
  • Description: Required. The style for the middle border line in your letterhead. Valid style values include:
  • Possible values:
    • color — . The color of the line in hexadecimal, as a string value.
    • height — . The height of the line, as an int value.

name 

  • Type: string
  • Required: Yes
  • Description: Required. The name of the letterhead.

topLine 

  • Type: LetterheadLine
  • Required: Yes
  • Description: Required. The style for the top horizontal line below the header. Valid style values include:
  • Possible values:
    • color — . The color of the line in hexadecimal, as a string value.
    • height — . The height of the line, as an int value.

LetterheadHeaderFooter Type 

LetterheadHeaderFooter represents the properties of a header or footer.

Fields 

backgroundColor 

  • Type: string
  • Required: Yes
  • Description: Required. The background color of the header or footer in hexadecimal format.

height 

  • Type: int
  • Required: Yes
  • Description: Required. The height of the header or footer.

horizontalAlignment 

  • Type: LetterheadHorizontalAlignment (enumeration of type string)
  • Required: No
  • Description: The horizontal alignment of the header or footer.
  • Possible values:
    • None
    • Left
    • Center
    • Right
  • Type: string
  • Required: No
  • Description: The logo which is a reference to a document, for example MyFolder/MyDocument.gif.

verticalAlignment 

  • Type: LetterheadVerticalAlignment (enumeration of type string)
  • Required: No
  • Description: The vertical alignment of the header or footer.
  • Possible values:
    • None
    • Top
    • Middle
    • Bottom

LetterheadLine Type 

LetterheadLine represents the properties of a line.

Fields 

color 

  • Type: string
  • Required: Yes
  • Description: Required. The color of the line in hexadecimal format.

height 

  • Type: int
  • Required: Yes
  • Description: Required. The height of the line.

Declarative Metadata Sample Definition 

1<?xml version="1.0" encoding="UTF-8"?>
2<Letterhead xmlns="http://soap.sforce.com/2006/04/metadata">
3    <available>true</available>
4    <backgroundColor>#CCCCCC</backgroundColor>
5    <bodyColor>#33FF33</bodyColor>
6    <bottomLine>
7        <color>#3333FF</color>
8        <height>5</height>
9    </bottomLine>
10    <description>INITIAL</description>
11    <footer>
12        <backgroundColor>#FFFFFF</backgroundColor>
13        <height>100</height>
14        <horizontalAlignment>Left</horizontalAlignment>
15        <verticalAlignment>Top</verticalAlignment>
16    </footer>
17    <header>
18        <backgroundColor>#FFFFFF</backgroundColor>
19        <height>100</height>
20        <horizontalAlignment>Left</horizontalAlignment>
21        <verticalAlignment>Top</verticalAlignment>
22    </header>
23    <middleLine>
24        <color>#AAAAFF</color>
25        <height>5</height>
26    </middleLine>
27    <name>SimpleLetterheadLabel</name>
28    <topLine>
29        <color>#FF99FF</color>
30        <height>5</height>
31    </topLine>
32</Letterhead>

Wildcard Support in the Manifest File 

This metadata type doesn’t support 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.