You are here:
Understand the previewData Object
Your custom LWC receives a previewData object that contains contextual information about the message being previewed. The fields available in previewData vary by channel.
| Field | Description |
|---|---|
channelType |
The type of channel for the message, for example, Email |
content |
The rendered HTML body of the email |
contentKey |
A unique identifier for the content record |
emailSubject |
The subject line of the email |
emailPreheader |
The preheader text of the email |
SMS and WhatsApp
| Field | Description |
|---|---|
channelType |
The type of channel for the message, for example SMS or WhatsApp |
content |
The rendered text body of the message |
contentKey |
A unique identifier for the content record |
When a recipient is selected from a segment, previewData is personalized and
merge fields are populated with that member's data. When no recipient is selected,
previewData contains content that isn’t personalized.
UiPreviewMessageTabDef Field Reference
| Field | Description | Constraints | Example |
|---|---|---|---|
Id |
A unique identifier for the record | Populated automatically when you save | (auto-generated) |
DeveloperName |
The API name of the tab definition | Must start with a letter. Can contain only letters, numbers, and underscores. Must not contain spaces, end with an underscore, or contain two consecutive underscores. | Example_CustomTab |
TabName |
The label that appears on the tab in the Preview and Test modal | — | Custom Tab |
IsActive |
Determines whether the tab appears in the Preview and Test modal | Customers who install the UiPreviewMessageTabDef package can modify this field | true |
SupportedChannel |
The channel where this tab is relevant | Valid values: Email, SMS, WhatsApp | |
LightningComponentDefId |
The ID of the LightningComponentBundle that provides the tab content | Must be an 18-character Salesforce ID | 18-character ID from your LWC |

