Marketing Cloud Engagement SDK
This section provides API reference details for the Marketing Cloud Engagement SDK module in React Native unified plugin.
Requests an updated list of inbox messages from the Marketing Cloud servers.
Promise<boolean>- Indicates whether the refresh request succeeded.
Retrieves active inbox messages, including read and unread messages that are not deleted.
Promise<InboxMessage[]>- A promise that resolves to the array of inbox messages.
Retrieves active unread inbox messages that are not deleted.
Promise<InboxMessage[]>- A promise that resolves to unread inbox messages.
Retrieves active read inbox messages that are not deleted.
Promise<InboxMessage[]>- A promise that resolves to read inbox messages.
Retrieves active deleted inbox messages.
Promise<InboxMessage[]>- A promise that resolves to deleted inbox messages.
Retrieves the total number of inbox messages that are not deleted.
Promise<number>- A promise that resolves to the message count.
Retrieves the total number of unread inbox messages that are not deleted.
Promise<number>- A promise that resolves to the unread message count.
Retrieves the total number of read inbox messages that are not deleted.
Promise<number>- A promise that resolves to the read message count.
Retrieves the total number of deleted inbox messages.
Promise<number>- A promise that resolves to the deleted message count.
Marks an inbox message as read in local storage.
| Parameter | Type | Description |
|---|---|---|
messageId | string | The inbox message ID to mark as read. |
void
Marks an inbox message as deleted in local storage.
| Parameter | Type | Description |
|---|---|---|
messageId | string | The inbox message ID to mark as deleted. |
void
Marks all active unread inbox messages as read.
void
Marks all active inbox messages as deleted.
void
Tracks an inbox message-open event for analytics.
| Parameter | Type | Description |
|---|---|---|
message | InboxMessage | The inbox message to track as opened. Include the message object returned by the inbox APIs. |
void
Adds a tag to the registration tag list.
| Parameter | Type | Description |
|---|---|---|
tag | string | The tag to add to the registration tag list. Use a meaningful segmentation value, such as beta-tester. |
void
Adds multiple tags to the registration tag list.
| Parameter | Type | Description |
|---|---|---|
tags | string[] | The tags to add to the registration tag list. Each array value is a segmentation tag string. |
void
Removes a tag from the registration tag list.
| Parameter | Type | Description |
|---|---|---|
tag | string | The tag to remove from the registration tag list. Use the exact tag value that is currently set. |
void
Removes multiple tags from the registration tag list.
| Parameter | Type | Description |
|---|---|---|
tags | string[] | The tags to remove from the registration tag list. Each array value must match a currently set tag. |
void
Returns the tags currently set on the device.
Promise<string[]>- A promise that resolves to tags currently set in the native SDK.
Returns all attributes currently set in the device registration profile.
None.
Promise<object>- Object containing all attributes.
Enables Predictive Intelligence analytics in the Marketing Cloud SDK.
void
Disables Predictive Intelligence analytics in the Marketing Cloud SDK.
void
Checks whether Predictive Intelligence analytics is enabled.
Promise<boolean>- A promise that resolves to whether PI analytics is enabled.
Enables analytics in the Marketing Cloud SDK.
void
Disables analytics in the Marketing Cloud SDK.
void
Checks whether analytics is enabled in the Marketing Cloud SDK.
Promise<boolean>- A promise that resolves to whether analytics is enabled.
Returns the device ID that Marketing Cloud uses for push messaging.
Promise<string \| null>- A promise that resolves to the device ID, ornull.
Returns the contact key currently set for the device user.
None.
Promise<string \| null>- Contact key, ornull.
Enables verbose logging in the native Marketing Cloud SDK.
void
Disables verbose logging in the native Marketing Cloud SDK.
void
Registers a callback to receive registration change events from the SDK.
void
Unregisters the registration change callback.
void