AboutSupportDeveloper GuideVersion 18.0.10

Interface PresentationTemplateFragment<T>

Type Parameters



dataKey: string

Data key of the template fragment.

The data associated with this fragment will be looked up in templateData map with this key.


const myTemplate = {
body: {
compositions: [{
minTemplateAPIVersion: '1',
layout: {
type: CustomTemplateFragmentNames.text,
dataKey: 'message',

const notificationOption: TemplateCustom = {
templateOptions: myTemplate,
templateData: {
message: 'My Custom Notification Message',
optional?: boolean

Optional flag.

If a presentation template fragment is flagged as optional, The service will not require the fragment's dataKey to exist in templateData. If a fragment is optional and its data is missing, the fragment will be omitted quietly by the server.

style?: Record<string, string | number>

CSS style properties of the fragment.

All the available custom template fragments support all of the React's inline style properties (with camelCase keys)

Note: "position: fixed" is disallowed in the fragments.

type: T

Type of the template fragment.