InboxTemplate
Data class containing the properties for rendering the inbox container, as configured in Adobe Journey Optimizer.
Properties
Property
Type
Description
capacity
Int
The maximum number of content cards to display in the inbox.
isUnreadEnabled
Boolean
Whether unread indicators are enabled for content 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
}
}
}