onBatchMessageActionTriggered

open fun onBatchMessageActionTriggered(@Nullable messageIdentifier: String, @Nullable ctaIdentifier: String, @NonNull action: BatchMessageAction)

Called when the message view will be dismissed due to the user pressing a CTA or the global tap action.

Parameters

messageIdentifier

Analytics message identifier string. Can be null.

ctaIdentifier

Identifier of the action/CTA. If the action comes from the "global tap action", the identifier will be GLOBAL_TAP_ACTION_INDEX (for MEP messages only). If the identifier isn't null, you can cast the action to BatchMessageCTA to get the CTA's label. If the action comes from a WebView, the identifier will be the Analytics identifier. Matches the "analyticsID" parameter of the Javascript call, or the 'batchAnalyticsID' get parameter of a link.

action

Action that will be performed. Fields can be null if the action was only to dismiss the message on tap. DO NOT run the action yourself: the SDK will automatically do it.