0

I am new to SFMC, and currently learning. I am trying to show push notification messages in app.

So far I am able to map most fields received as NotificationMessage but I couldn't find the message field.

NotificationMessage

    package com.salesforce.marketingcloud.notifications

@kotlinx.android.parcel.Parcelize @com.salesforce.marketingcloud.MCKeep public final data class NotificationMessage internal constructor(id: kotlin.String, requestId: kotlin.String? /* = compiled code */, region: com.salesforce.marketingcloud.messages.Region? /* = compiled code */, alert: kotlin.String, sound: com.salesforce.marketingcloud.notifications.NotificationMessage.Sound, soundName: kotlin.String? /* = compiled code */, title: kotlin.String? /* = compiled code */, subtitle: kotlin.String? /* = compiled code */, type: com.salesforce.marketingcloud.notifications.NotificationMessage.Type, trigger: com.salesforce.marketingcloud.notifications.NotificationMessage.Trigger, url: kotlin.String? /* = compiled code */, mediaUrl: kotlin.String? /* = compiled code */, mediaAltText: kotlin.String? /* = compiled code */, customKeys: kotlin.collections.Map<kotlin.String, kotlin.String> /* = compiled code */, custom: kotlin.String? /* = compiled code */, payload: kotlin.collections.Map<kotlin.String, kotlin.String>? /* = compiled code */, notificationId: kotlin.Int /* = compiled code */) : android.os.Parcelable {
    public final val alert: kotlin.String /* compiled code */

    public final val custom: kotlin.String? /* compiled code */

    public final val customKeys: kotlin.collections.Map<kotlin.String, kotlin.String> /* compiled code */

    public final val id: kotlin.String /* compiled code */

    public final val mediaAltText: kotlin.String? /* compiled code */

    public final val mediaUrl: kotlin.String? /* compiled code */

    internal final var notificationId: kotlin.Int /* compiled code */

    public final val payload: kotlin.collections.Map<kotlin.String, kotlin.String>? /* compiled code */

    public final val region: com.salesforce.marketingcloud.messages.Region? /* compiled code */

    public final val requestId: kotlin.String? /* compiled code */

    public final val sound: com.salesforce.marketingcloud.notifications.NotificationMessage.Sound /* compiled code */

    public final val soundName: kotlin.String? /* compiled code */

    public final val subtitle: kotlin.String? /* compiled code */

    public final val title: kotlin.String? /* compiled code */

    public final val trigger: com.salesforce.marketingcloud.notifications.NotificationMessage.Trigger /* compiled code */

    public final val type: com.salesforce.marketingcloud.notifications.NotificationMessage.Type /* compiled code */

    public final val url: kotlin.String? /* compiled code */

    @kotlin.Deprecated @kotlin.jvm.JvmName public final fun alert(): kotlin.String { /* compiled code */ }

    public final operator fun component1(): kotlin.String { /* compiled code */ }

    public final operator fun component10(): com.salesforce.marketingcloud.notifications.NotificationMessage.Trigger { /* compiled code */ }

    public final operator fun component11(): kotlin.String? { /* compiled code */ }

    public final operator fun component12(): kotlin.String? { /* compiled code */ }

    public final operator fun component13(): kotlin.String? { /* compiled code */ }

    public final operator fun component14(): kotlin.collections.Map<kotlin.String, kotlin.String> { /* compiled code */ }

    public final operator fun component15(): kotlin.String? { /* compiled code */ }

    public final operator fun component16(): kotlin.collections.Map<kotlin.String, kotlin.String>? { /* compiled code */ }

    internal final operator fun component17(): kotlin.Int { /* compiled code */ }

    public final operator fun component2(): kotlin.String? { /* compiled code */ }

    public final operator fun component3(): com.salesforce.marketingcloud.messages.Region? { /* compiled code */ }

    public final operator fun component4(): kotlin.String { /* compiled code */ }

    public final operator fun component5(): com.salesforce.marketingcloud.notifications.NotificationMessage.Sound { /* compiled code */ }

    public final operator fun component6(): kotlin.String? { /* compiled code */ }

    public final operator fun component7(): kotlin.String? { /* compiled code */ }

    public final operator fun component8(): kotlin.String? { /* compiled code */ }

    public final operator fun component9(): com.salesforce.marketingcloud.notifications.NotificationMessage.Type { /* compiled code */ }

    @kotlin.Deprecated @kotlin.jvm.JvmName public final fun custom(): kotlin.String? { /* compiled code */ }

    @kotlin.Deprecated @kotlin.jvm.JvmName public final fun customKeys(): kotlin.collections.Map<kotlin.String, kotlin.String> { /* compiled code */ }

    @kotlin.Deprecated @kotlin.jvm.JvmName public final fun id(): kotlin.String { /* compiled code */ }

    @kotlin.Deprecated @kotlin.jvm.JvmName public final fun mediaAltText(): kotlin.String? { /* compiled code */ }

    @kotlin.Deprecated @kotlin.jvm.JvmName public final fun mediaUrl(): kotlin.String? { /* compiled code */ }

    @kotlin.Deprecated @kotlin.jvm.JvmName public final fun notificationId(): kotlin.Int { /* compiled code */ }

    @kotlin.Deprecated @kotlin.jvm.JvmName public final fun payload(): kotlin.collections.Map<kotlin.String, kotlin.String>? { /* compiled code */ }

    @kotlin.Deprecated @kotlin.jvm.JvmName public final fun region(): com.salesforce.marketingcloud.messages.Region? { /* compiled code */ }

    @kotlin.Deprecated @kotlin.jvm.JvmName public final fun requestId(): kotlin.String? { /* compiled code */ }

    @kotlin.Deprecated @kotlin.jvm.JvmName public final fun sound(): com.salesforce.marketingcloud.notifications.NotificationMessage.Sound { /* compiled code */ }

    @kotlin.Deprecated @kotlin.jvm.JvmName public final fun soundName(): kotlin.String? { /* compiled code */ }

    @kotlin.Deprecated @kotlin.jvm.JvmName public final fun subTitle(): kotlin.String? { /* compiled code */ }

    @kotlin.Deprecated @kotlin.jvm.JvmName public final fun title(): kotlin.String? { /* compiled code */ }

    @kotlin.Deprecated @kotlin.jvm.JvmName public final fun trigger(): com.salesforce.marketingcloud.notifications.NotificationMessage.Trigger { /* compiled code */ }

    @kotlin.Deprecated @kotlin.jvm.JvmName public final fun type(): com.salesforce.marketingcloud.notifications.NotificationMessage.Type { /* compiled code */ }

    @kotlin.Deprecated @kotlin.jvm.JvmName public final fun url(): kotlin.String? { /* compiled code */ }

    @com.salesforce.marketingcloud.MCKeep public final enum class Sound private constructor() : kotlin.Enum<com.salesforce.marketingcloud.notifications.NotificationMessage.Sound> {
        CUSTOM,

        DEFAULT,

        NONE;
    }

    @com.salesforce.marketingcloud.MCKeep public final enum class Trigger private constructor() : kotlin.Enum<com.salesforce.marketingcloud.notifications.NotificationMessage.Trigger> {
        PUSH,

        GEOFENCE,

        BEACON;
    }

    @com.salesforce.marketingcloud.MCKeep public final enum class Type private constructor() : kotlin.Enum<com.salesforce.marketingcloud.notifications.NotificationMessage.Type> {
        OPEN_DIRECT,

        CLOUD_PAGE,

        OTHER;
    }
}

How can I access message field? Thanks in advance.

2
    public final val alert: kotlin.String /* compiled code */

See alert

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.