Constructs an instance of IterableInAppMessage.
The unique identifier for the message.
The identifier for the campaign associated with the message.
The trigger that caused the message to be displayed.
The date and time when the message was created.
The date and time when the message expires.
A boolean indicating whether the message should be saved to the inbox.
Metadata associated with the inbox message.
A custom payload associated with the message.
A boolean indicating whether the message has been read.
The priority level of the message.
ReadonlycampaignThe campaign ID for this message
Optional ReadonlycreatedWhen was this message created?
Optional ReadonlycustomCustom 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,
);
Optional ReadonlyexpiresWhen to expire this in-app (undefined means do not expire)
Optional ReadonlyinboxMetadata such as title, subtitle etc. needed to display this in-app message in inbox.
ReadonlymessageThe ID for the in-app message
ReadonlypriorityThe priority value of this in-app message
ReadonlyreadWhether this inbox message has been read
ReadonlysaveWhether to save this message to inbox
ReadonlytriggerInformation regarding the triggering of this in-app message
Do you want the in-app message to be saved to the inbox without triggering a notification?
true if the message should be saved to the inbox without triggering a notification; otherwise, false.
StaticfromCreates an instance of IterableInAppMessage from a dictionary object.
The dictionary containing the properties of the in-app message.
An instance of IterableInAppMessage populated with the provided properties.
StaticfromCreates an instance of IterableInAppMessage from a given ViewToken.
The ViewToken containing the in-app message data.
A new instance of IterableInAppMessage populated with data from the viewToken.
Iterable in-app message