Function deferInAppMessage

  • Defers the display of given in-app message for a future pageload. The deferred in-app message can be retrieved by calling [[getDeferredInAppMessage]], and displayed using [[showInAppMessage]]. Deferring an in-app message will overwrite any previously deferred in-app message.

    Note: Be sure to subscribe to clicked / dismissed events on this in-app message only after retrieving it using [[getDeferredInAppMessage]]. Any subscriptions made before calling [[deferInAppMessage]] will not be persisted. Also note that the in-app message deferred here will be cleared out when in-app message triggers have been refreshed from the Braze backend.

    Parameters

    • inAppMessage: InAppMessage

      The message to defer for later display.

    Returns Promise<boolean | undefined>

    Resolves to whether or not the message was successfully deferred. Returns undefined if the SDK has not been initialized.