Bloomreach

Engage your users by enabling Bloomreach push notifications and in-app messaging

The Bloomreach plugin integrates mobile push notifications and in-app messaging with support for audience segmentation and targeted messaging.

Why use Bloomreach?

  • Push permission control: Request and check notification permission from JavaScript.
  • Customer identity support: Identify and persist customer state across sessions.
  • Customer logout support: Clear customer session state when needed.
  • Deep linking readiness: Configure domains to route links into the app.

Prerequisites

  • Access to Bloomreach plugin settings in Median App Studio (Push Notifications tab).
  • Bloomreach credentials from your Bloomreach Engagement dashboard:
    • apiKey
    • projectToken
    • baseURL
  • For Android push, plan Firebase Cloud Messaging (FCM) with google-services.json and Bloomreach; see Android push notifications.
  • For deep linking, plan domains for hosts and host platform verification files; see Deep linking setup.

When to use this plugin

Bloomreach is useful for apps that need to:

Use CaseExample
Request push permissionPrompt users from the app UI before enabling push campaigns.
Check push permission stateGate push-dependent actions based on permission status.
Identify customersAssociate app sessions with Bloomreach customer identifiers and properties.
Logout customer sessionsClear active customer identity when users sign out.
Deep link from campaignsOpen campaign links directly in-app for supported domains

Developer Demo

👍

Display our demo page in your app to test during development https://median.dev/bloomreach/

What you'll do

Use this section as a fast navigation map into the full setup and implementation details:

  1. Configure plugin credentials and behavior: Go to Plugin Setup.
  2. Set deep linking domains: Review hosts in Configuration Options.
  3. Implement permission and identity calls: Add methods from JavaScript Bridge Functions.
  4. Apply practical integration patterns: Follow Code Examples.
  5. Run validation checks: Complete Testing Checklist and review Troubleshooting.

Integration guide

Plugin platform setup

Enable the Plugin

  1. In the Median App Studio, open Bloomreach plugin settings under Push Notifications.
  2. Set active to true.
  3. Add required values: apiKey, projectToken, and baseURL.
  4. Configure autoRegister for automatic permission prompting on app launch.
  5. Add optional hosts values for deep linking support.

Configuration Options

SettingDescriptionDefaultRecommended
activeEnables or disables the plugin.N/A — not covered in the source.true for active integrations.
autoRegisterAutomatically prompts users for push permission on app launch.N/A — not covered in the source.false to enable manual permission timing.
apiKeyBloomreach API key (required).N/A — not covered in the source.Use the value from the Bloomreach dashboard.
projectTokenBloomreach project token (required).N/A — not covered in the source.Use the value from the Bloomreach dashboard.
baseURLBloomreach API base URL (required).N/A — not covered in the source.Use your regional Bloomreach endpoint.
hostsAn optional domain allowlist for deep links.N/A — not covered in the source.Add all app deep-link domains without scheme (https:///http://).

Example configuration (JSON)

{
  "active": true,
  "autoRegister": false,
  "apiKey": "your-api-key",
  "projectToken": "your-project-token",
  "baseURL": "https://api.eu1.exponea.com",
  "hosts": ["median.dev", "median.com"]
}

Replace values with those from your Bloomreach Engagement project and your app’s domains.

Android push notifications

Android deliver push through Firebase Cloud Messaging (FCM). Configure all of the following:

  1. google-services.json — Embed the Firebase config in your build. In Median App Studio, open the Build & Download tab and upload your google-services.json so it is included in the app binary.
  2. Bloomreach Engagement — In the Bloomreach Engagement web app, enable push for your project and add your FCM server key so Bloomreach can send notifications to your app.

For Bloomreach-side steps (projects, keys, and campaigns), use Bloomreach’s documentation.

Deep linking setup

Deep links open URLs in your app when domains are allowlisted and platform association files are valid.

  1. Plugin configuration — Add every domain you want to open in-app to the hosts array. Do not include https:// or http://; the plugin applies URL schemes as needed.
  2. Hosted verification files — On each domain (and subdomain you use), serve the standard association files over HTTPS:

Use median.co’s Deep Linking Validator to check your domain, and read Deep linking for Universal Links, App Links, and file requirements.

📘

Note

An incorrect deep link setup can cause links to open in the browser instead of the app.


JavaScript Bridge Functions

Request Push Notification Permission

Prompt for the Push Notification permission, which displays a dialog for users to confirm permission. For Android, the dialog only displays on Android 13 and above. Android 12 and below will always be granted without user intervention.

Provide a callback function or otherwise return a promise.

↔️Median JavaScript Bridge

median.bloomreach.promptNotification({'callback': function})
// Return value:
{
  "granted": true | false
}

Parameters:

ParameterTypeRequiredDescription
callbackfunctionNoCallback that receives { granted: true | false }.

Check push notification permission

Checks whether push permission is granted.

↔️Median JavaScript Bridge

median.bloomreach.notificationEnabled({'callback': function})
// Return value:
{
  "granted": true | false
}

Parameters:

ParameterTypeRequiredDescription
callbackfunctionNoCallback that receives { granted: true | false }.

Identify customer

Identifies a customer by identifier and value. State persists until logout.

↔️Median JavaScript Bridge

const params = { 
  "identifier": "registered", 
  "value": "[email protected]" 
}; 
     
const result = await median.bloomreach.identifyCustomer(params);

Parameters:

ParameterTypeRequiredDescription
identifierstringYesCustomer identifier key (example in source: registered).
valuestringYesIdentifier value (example: email).
propertiesobjectNoOptional customer properties such as first_name, last_name, age.

Optionally, include user properties:

↔️Median JavaScript Bridge

const params = { 
  "identifier": "registered", 
  "value": "[email protected]", 
  "properties": { 
     "first_name": "John", 
     "last_name": "Doe", 
     "age": 25 
  } 
}

Logout customer

Clears the current customer session.

↔️Median JavaScript Bridge

median.bloomreach.logoutCustomer({callback: function})
// Return value:
{
  "success": BOOLEAN
}

Parameters:

ParameterRequiredTypeDescription
callbackNofunctionCallback for logout completion.


async function ensureBloomreachPermission() {
  const status = await median.bloomreach.notificationEnabled();
  if (!status.granted) {
    const result = await median.bloomreach.promptNotification();
    console.log("Permission granted:", result.granted);
  }
}

Identify and later clear a customer session

async function setAndClearCustomer() {
  await median.bloomreach.identifyCustomer({
    identifier: "registered",
    value: "[email protected]",
    properties: {
      first_name: "John",
      last_name: "Doe",
      age: 25
    }
  });

  await median.bloomreach.logoutCustomer();
}

Testing Checklist

Use this checklist to validate Bloomreach integration:

  • Plugin is active and required config values are set.
  • promptNotification returns a permission result.
  • notificationEnabled returns current permission state.
  • identifyCustomer is called with valid identifier/value.
  • logoutCustomer clears the current customer session.
  • Android app includes google-services.json.
  • Bloomreach push setup includes FCM server key.
  • hosts includes all intended deep-link domains.
  • Verification files are hosted for iOS and Android deep linking.
  • Deep links open in-app for configured domains.
  • Deep Linking Validator checks pass.

Troubleshooting

This typically indicates incorrect deep linking configuration. Verify hosted association files and ensure all intended domains are listed in hosts (without https:// or http://).

Verify google-services.json is embedded in the app and Bloomreach push configuration includes the FCM server key.

The source notes that registered is the default hard ID in the example, but your hard ID may differ. Check your Bloomreach customer identification setup.

📘

Still having trouble?

For issues related to Iretable's own configuration, permissions, or platform-specific behavior outside Median.co's, refer to Bloom Reach's integration documentation.