InboxMessage
InboxMessage.Media
DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!
Let us know so we can improve!
Package: com.salesforce.marketingcloud.messages.inbox
Type: Data Class (Kotlin)
SDK Version: 11.0.0
The InboxMessage class is a data class from the Salesforce Marketing Cloud Unified SDK that represents an inbox message within the marketing cloud messaging system. It encapsulates all the properties and metadata associated with messages stored in the Marketing Cloud inbox.
1data class InboxMessage(
2 val id: String,
3 requestId: String? = null,
4 messageHash: String? = null,
5 val subject: String? = null,
6 val title: String? = null,
7 val alert: String? = null,
8 val sound: String? = null,
9 val media: InboxMessage.Media? = null,
10 val startDateUtc: Date? = null,
11 val endDateUtc: Date? = null,
12 val sendDateUtc: Date? = null,
13 val url: String?,
14 val custom: String? = null,
15 val customKeys: Map<String, String>? = null,
16 val subtitle: String? = null,
17 val inboxMessage: String? = null,
18 val inboxSubtitle: String? = null,
19 var notificationMessage: NotificationMessage? = null,
20 viewCount: Int = 0,
21 val messageType: Int?,
22 var deleted: Boolean = false
23)The class has a single primary constructor with the following parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
id | String | Required | Unique identifier for the message |
requestId | String? | null | Optional request identifier |
messageHash | String? | null | Optional message hash |
subject | String? | null | Message subject |
title | String? | null | Message title |
alert | String? | null | Alert text |
sound | String? | null | Sound identifier |
media | InboxMessage.Media? | null | Associated media content |
startDateUtc | Date? | null | Message start date (UTC) |
endDateUtc | Date? | null | Message end date (UTC) |
sendDateUtc | Date? | null | Message send date (UTC) |
url | String? | Required | Associated URL |
custom | String? | null | Custom data string |
customKeys | Map<String, String>? | null | Custom key-value pairs |
subtitle | String? | null | Message subtitle |
inboxMessage | String? | null | Inbox-specific message content |
inboxSubtitle | String? | null | Inbox-specific subtitle |
notificationMessage | NotificationMessage? | null | Associated notification message |
viewCount | Int | 0 | Number of times viewed |
messageType | Int? | Required | Type identifier for the message |
deleted | Boolean | false | Deletion status flag |
All properties are annotated with @JvmField for Java interoperability.
Unique message identifier.
Message subject text.
Message title.
Alert text for the message.
Sound identifier associated with the message.
Media content associated with the message.
Message start date in UTC.
Message end date in UTC.
Message send date in UTC.
Associated URL for the message.
Custom data string.
Custom key-value pairs for additional metadata.
Message subtitle.
Inbox-specific message content.
Inbox-specific subtitle.
Type identifier for the message.
Associated notification message object.
Deletion status flag (default: false).
Read status of the message (derived property).
As a Kotlin data class, InboxMessage automatically provides the following methods:
Creates a copy of the message with optionally modified properties.
1fun copy(
2 id: String = this.id,
3 requestId: String? = this.requestId,
4 messageHash: String? = this.messageHash,
5 // ... all other parameters
6): InboxMessageCompares this message with another object for equality.
Generates a hash code for the message.
Returns a string representation of the message.
Component functions for destructuring declarations (e.g., component1(), component2(), etc.).
1enum InboxMessageType : Enum<InboxMessage.InboxMessageType>Represents the type of an inbox message.
1data class MediaRepresents media content associated with an inbox message.
NotificationMessage (com.salesforce.marketingcloud.notifications) - Associated notification message type