In-App Message API
1.0.0
Create in-app message content in Marketing Cloud Next. In-app messages support banner, full-screen, modal, and push-primer layouts.
This table lists the in-app message-related use cases that the API supports.
| Supported Use Case | HTTP Verb | URI |
|---|---|---|
| Create in-app message content | POST | /services/data/{apiVersion}/connect/cms/contents/inApp |
In-App Message Content Structure
In-app message content uses a block-based architecture:
{
"sfdc_cms:title": "My In-App Message",
"inAppType": "Banner",
"inAppBlock": {
"type": "block",
"definition": "sfdc_cms__inAppTypeBanner",
"attributes": {
"type": "Banner",
"title": {
"type": "block",
"definition": "sfdc_cms__inAppTitle",
"attributes": { "content": { "title": "Banner Title" } }
},
"message": {
"type": "block",
"definition": "sfdc_cms__inAppMessage",
"attributes": { "content": { "message": "Banner message" } }
}
}
}
}
In-App Message Types
Marketing Cloud Next supports these in-app message types:
- Banner—Compact notification-style banner with title, message, media, and action buttons
- FullScreen—Full-screen takeover with title, message, media, action buttons, tertiary message, and container styling
- Modal—Centered modal dialog with title, message, media, action buttons, tertiary message, and container styling
- PushPrimer—Permission prompt overlay with title, message, media, action buttons, tertiary message, and container styling
Sub-Block Types
| Block | Definition | Purpose |
|---|---|---|
| Title | sfdc_cms__inAppTitle |
The message title. Can include font and color styling. |
| Message | sfdc_cms__inAppMessage |
A multiline message. Can include font and color styling. |
| Media | sfdc_cms__inAppMedia |
A reference to an image. Can include sizing and styling. |
| Action Buttons | sfdc_cms__inAppActionButtons |
A button container. |
| Action Button | sfdc_cms__inAppActionButton |
An individual button with an associated action. |
| Container Style | sfdc_cms__inAppContainerStyle |
Style information for the container. |
| Tertiary Message | sfdc_cms__inAppTertiaryMessage |
Footer text. |
| Tertiary Link | sfdc_cms__inAppTertiaryLink |
An individual hyperlink. |
Action Types
The action property can contain one of these values:
0—Dismiss1—Go to web URL2—Open page in app3—Go to app URL (Android)4—Go to app URL (iOS)5—Go to app URL (both platforms)
Content Properties
| Property | Type | Required | Description |
|---|---|---|---|
sfdc_cms:title |
text | Yes | The name of the in-app message content item. |
description |
text | No | A description of the content item. |
inAppType |
text | Yes | The message type. Possible values: Banner, FullScreen, Modal, and PushPrimer. |
inAppImageLayoutType |
text | No | The image layout aspect ratio, such as 16x9. |
inAppBlock |
block | No | A block that contains the message content and configuration. |
lightning:dataProviders |
list | No | Data providers for personalization. |
Data Providers
In-app messages support these data providers for personalization:
sfdc_cms__unifiedIndividualDataProvider—Unified Individual profile datasfdc_cms__organizationDataProvider—Organization datasfdc_cms__eventListDataProvider—Event list datasfdc_cms__couponListDataProvider—Coupon list data
Handlebars Expression Support
In-app message content supports Handlebars scripting in title, message, and label fields.
https://{subdomain}.my.salesforce.com
Salesforce Marketing Cloud
DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!
Let us know so we can improve!