InboxTemplate

Data class containing the properties for rendering the inbox container, as configured in Adobe Journey Optimizer.

Properties

Property
Type
Description
heading
AepText
The heading text displayed at the top of the inbox.
layout
AepInboxLayout
The layout orientation of the inbox (VERTICAL or HORIZONTAL).
capacity
Int
The maximum number of content cards to display in the inbox.
emptyMessage
AepText?
The message to display when the inbox is empty.
emptyImage
AepImage?
The image to display when the inbox is empty.
isUnreadEnabled
Boolean
Whether unread indicators are enabled for content cards.
unreadBgColor
AepColor?
The background color for unread cards with light and dark theme support.
unreadIcon
AepImage?
The icon to display as the unread indicator.
unreadIconAlignment
Alignment?
The alignment position of the unread icon on cards.

Class Definition

data-slots=heading, code
data-repeat=1
data-languages=Kotlin

Kotlin

data class InboxTemplate(
    val heading: AepText,
    val layout: AepInboxLayout,
    val capacity: Int,
    val emptyMessage: AepText? = null,
    val emptyImage: AepImage? = null,
    val isUnreadEnabled: Boolean = false,
    val unreadBgColor: AepColor? = null,
    val unreadIcon: AepImage? = null,
    val unreadIconAlignment: Alignment? = null
)

AepInboxLayout

Enum representing the layout orientation of the inbox.

Value
Description
VERTICAL
Cards are displayed in a vertical scrolling list (LazyColumn).
HORIZONTAL
Cards are displayed in a horizontal scrolling list (LazyRow).

Usage Example

data-slots=heading, code
data-repeat=1
data-languages=Kotlin

Kotlin

when (val state = inboxUIState) {
    is InboxUIState.Success -> {
        val template = state.template

        // Access inbox configuration
        val headingText = template.heading
        val isVertical = template.layout == AepInboxLayout.VERTICAL
        val maxCards = template.capacity
        val showUnreadIndicators = template.isUnreadEnabled

        // Check if inbox is empty
        if (state.items.isEmpty()) {
            // Display template.emptyMessage and template.emptyImage
        }
    }
}