@iterable/react-native-sdk - v2.0.3
    Preparing search index...

    Class IterableInAppMessage

    Iterable in-app message

    Index

    Constructors

    • Constructs an instance of IterableInAppMessage.

      Parameters

      • messageId: string

        The unique identifier for the message.

      • campaignId: number

        The identifier for the campaign associated with the message.

      • trigger: IterableInAppTrigger

        The trigger that caused the message to be displayed.

      • createdAt: undefined | Date

        The date and time when the message was created.

      • expiresAt: undefined | Date

        The date and time when the message expires.

      • saveToInbox: boolean

        A boolean indicating whether the message should be saved to the inbox.

      • inboxMetadata: undefined | IterableInboxMetadata

        Metadata associated with the inbox message.

      • customPayload: unknown

        A custom payload associated with the message.

      • read: boolean

        A boolean indicating whether the message has been read.

      • priorityLevel: number

        The priority level of the message.

      Returns IterableInAppMessage

    Properties

    campaignId: number

    The campaign ID for this message

    createdAt?: Date

    When was this message created?

    customPayload?: unknown

    Custom Payload for this message.

    If the custom payload was the following:

    {
    "customDisplay": true,
    "promotionTitle": "Summer Sale",
    "promotionText": "Everything is 50% off."
    }

    You could use the following code to determine whether to hide/show the message:

     config.inAppHandler = (message: IterableInAppMessage) => {
    if (message.customPayload.customDisplay == true) {
    return IterableInAppShowResponse.skip
    } else {
    return Iterable.InAppShowResponse.show
    }
    };

    You could then handle the showing of this message through a custom function. EG:

    Alert.alert(
    message.customPayload.promotionTitle,
    message.customPayload.promotionText,
    );
    expiresAt?: Date

    When to expire this in-app (undefined means do not expire)

    inboxMetadata?: IterableInboxMetadata

    Metadata such as title, subtitle etc. needed to display this in-app message in inbox.

    messageId: string

    The ID for the in-app message

    priorityLevel: number

    The priority value of this in-app message

    read: boolean

    Whether this inbox message has been read

    saveToInbox: boolean

    Whether to save this message to inbox

    Information regarding the triggering of this in-app message

    Methods

    • Do you want the in-app message to be saved to the inbox without triggering a notification?

      Returns boolean

      true if the message should be saved to the inbox without triggering a notification; otherwise, false.