UiPreviewMessageTabDef

Represents the registration of a custom Marketing Cloud Preview and Test modal tab, created using custom Lightning web components. You can register and show multiple tabs in the Preview and Test experience.

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.

Important

Parent Type

This type extends the Metadata metadata type and inherits its fullName field.

File Suffix and Directory Location

UiPreviewMessageTabDef components have the suffix .uiPreviewMessageTabDef and are stored in the uiPreviewMessageTabDef folder.

Version

UiPreviewMessageTabDef components are available in API version 63.0 and later.

Special Access Rules

There are no additional access requirements that are specific to this type.

Fields

Field Name Description
isActive
Field Type
boolean
Description

Required.

Indicates whether the tab is enabled and is customer controlled (true) or not (false).
isProtected
Field Type
boolean
Description
Indicates whether the configuration is protected (true) or not (false).
label
Field Type
string
Description

Required.

Label for the tab.
lightningComponentDef
Field Type
string
Description

Required.

The customer-created Lightning web component that displays in the Preview and Test tabs.
supportedChannel
Field Type
SupportedChannel (enumeration of type string)
Description

Required.

A string indicating the type of channel.

Values are:

  • Email
  • Sms
  • WhatsApp
tabName
Field Type
string
Description

Required.

The case-sensitive, user-defined label displayed as the name of the tab. Maximum length is 255 characters.

Declarative Metadata Sample Definition

This example is a custom Lightning web component’s HTML file.

1<template>
2    <div>A custom tab</div>
3    <div>Preview data</div>
4    <div>{previewData}</div>
5</template>

Here’s the component’s JavaScript file.

1import { LightningElement, api } from "lwc";
2
3export default class CustomTab extends LightningElement {
4    @api previewData;
5}

Here’s the component’s configuration file.

1<?xml version="1.0" encoding="UTF-8"?>
2<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
3    <apiVersion>63.0</apiVersion>
4    <isExposed>true</isExposed>
5    <capabilities>
6        <capability>lightning__dynamicComponent</capability>
7    </capabilities>
8</LightningComponentBundle>

This example package.xml references the component’s definition.

1<?xml version="1.0" encoding="UTF-8"?>
2
3<UiPreviewMessageTabDef xmlns="http://soap.sforce.com/2006/04/metadata">
4    <isActive>true</isActive>
5    <label>TestUiPreviewMessageTab</label>
6    <lightningComponentDef>customTab</lightningComponentDef>
7    <supportedChannel>Email</supportedChannel>
8    <tabName>My Tab</tabName>
9    <isProtected>false</isProtected>
10</UiPreviewMessageTabDef>