Newer Version Available

This content describes an older version of this product. View Latest

ChannelLayout

Represents the metadata associated with an communication channel layout. Communication channel layouts allow admins to share article contents inline into communication channels (eg. email publisher, portal publisher, social publisher etc.). Admins can create a list of fields of an article type that they want to share for each communication channels and customize its order.

File Suffix and Directory Location

Channel layout components have the suffix .channelLayout and are stored in the channelLayouts folder of the corresponding package directory. The prefix must match with the article type API name.

Version

Channel layout components are available in API version 32.0 and later.

Fields

Field Name Field Type Description
label string The label
layoutItems layoutItem The article fields contained in the layout. The order here determines the field order.
enabledChannels enabledChannel The channels where this layout applies.

layoutItem

Field Name Field Type Description
field string Name of the field. The format is <ArticleType name>.<Field name>
enabledChannel enum Enum name of the communcation channel (eg. email, portal etc)

Declarative Metadata Sample Definition

The following is an example of a Channel Layout component.

1<?xml version="1.0" encoding="UTF-8"?>
2<ChannelLayout xmlns="http://soap.sforce.com/2006/04/metadata">
3    <label>layoutaaaa</label>
4    <layoutItems>
5        <field>ArticleTypeA.FieldA</field>
6    </layoutItems>
7    <layoutItems>
8        <field>ArticleTypeA.FieldC</field>
9    </layoutItems>
10    <enabledChannels>email</enabledChannels>
11    <enabledChannels>portal</enabledChannels>
12</ChannelLayout>

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