Intercom

Deep Linking

Set up Deep Linking within your app and notification links will automatically open directly into your app.

JavaScript Bridge Functions

Prompt for Push Notification Permission

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

Provide a callback function or otherwise a promise is returned.

↔️Median JavaScript Bridge

median.intercom.registerPush({'callback': function});
// Return value:
{
  "granted": true | false
}

Update User

Register a new user or update an existing user. Accepts object of any key/value pairs such as name and email

↔️Median JavaScript Bridge

median.intercom.updateUser({
  name: "Bob",
  email: "[email protected]"
});

Log Event

Log an event in Intercom programmatically

↔️Median JavaScript Bridge

median.intercom.logEvent({
  eventName: eventValue
});

Present Carousel

Present a Carousel by passing in carouselID from Intercom workspace

↔️Median JavaScript Bridge

median.intercom.presentCarousel({
  carouselID: STRING
});

References

iOS

https://developers.intercom.com/installing-intercom/docs/ios-push-notifications
https://developers.intercom.com/installing-intercom/docs/ios-configuration#update-a-user
https://developers.intercom.com/installing-intercom/docs/ios-configuration#submit-an-event
https://developers.intercom.com/installing-intercom/docs/ios-configuration#present-a-carousel-programmatically

Android

https://developers.intercom.com/installing-intercom/docs/android-fcm-push-notifications
https://developers.intercom.com/installing-intercom/docs/android-configuration#update-a-user
https://developers.intercom.com/installing-intercom/docs/android-configuration#submit-an-event
https://developers.intercom.com/installing-intercom/docs/android-configuration#present-a-carousel-programmatically