Template

Package: com.salesforce.marketingcloud.pushmodels.data

Module: Push Models Module v1.0.2

Version: 11.0.0

Platform: androidJvm

Overview 

Interface that defines templates used to specify the layout of push notifications. It extends Parcelable for Android serialization.

Inheritance 

1interface Template : Parcelable

Known Inheritors 

  • RichButtonTemplate (com.salesforce.marketingcloud.pushmodels.rich.buttons)
  • CarouselFullTemplate (com.salesforce.marketingcloud.pushmodels.rich.carousel)

Properties 

identifier 

1abstract val identifier: String?

Optional string identifier for the template.


style 

1abstract val style: Style?

Optional Style object defining visual presentation.


type 

1abstract val type: Template.Type

Required enum value specifying the template type.

Nested Types 

Template.Type 

1enum Type : Parcelable, Enum<Template.Type>

Enumeration defining available template types, implements both Parcelable and Enum.

Enum Constants 

RichButtons

Represents a rich buttons template type.

CarouselFull

Represents a carousel full template type.

Properties 

entries

1val entries: EnumEntries<Template.Type>

Provides an immutable list of all enum entries in declaration order.

value

1val value: String

String value associated with the enum constant.

Methods 

valueOf(value: String)

1fun valueOf(value: String): Template.Type

Returns the enum constant matching the specified name (exact match required, no whitespace).

Returns: Template.Type


values()

1fun values(): Array<Template.Type>

Returns an array of all constants in declaration order.

Returns: Array<Template.Type>

Additional Notes 

This interface is part of the Salesforce Marketing Cloud Unified SDK for Android and provides the foundation for rich notification layouts. The template system allows developers to create visually rich push notifications with different layouts such as buttons and carousels.