InboxMessage

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.

The class has a single primary constructor with the following parameters:

ParameterTypeDefaultDescription
idStringRequiredUnique identifier for the message
requestIdString?nullOptional request identifier
messageHashString?nullOptional message hash
subjectString?nullMessage subject
titleString?nullMessage title
alertString?nullAlert text
soundString?nullSound identifier
mediaInboxMessage.Media?nullAssociated media content
startDateUtcDate?nullMessage start date (UTC)
endDateUtcDate?nullMessage end date (UTC)
sendDateUtcDate?nullMessage send date (UTC)
urlString?RequiredAssociated URL
customString?nullCustom data string
customKeysMap<String, String>?nullCustom key-value pairs
subtitleString?nullMessage subtitle
inboxMessageString?nullInbox-specific message content
inboxSubtitleString?nullInbox-specific subtitle
notificationMessageNotificationMessage?nullAssociated notification message
viewCountInt0Number of times viewed
messageTypeInt?RequiredType identifier for the message
deletedBooleanfalseDeletion 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.

Compares 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.).

Represents the type of an inbox message.

Represents media content associated with an inbox message.

  • NotificationMessage (com.salesforce.marketingcloud.notifications) - Associated notification message type