Embedding the Engagement Rx Portal into Your Mobile App

Modified on Mon, 12 Feb 2024 at 09:47 AM

You can embed the Engagement Rx solution into your own mobile app to create a more seamless experience for your users. The embedding capabilities allow your users full access to Engagement Rx features.


How to embed in your mobile app


The Engagement Rx portal can be embedded in your mobile app using a mobile app WebView.  A typical scenario is as follows:


NOTE:  All of the API methods below are described in the Engagement Rx API Reference documentation


1. Lookup member using the member ID from your system


Call the API method below to get the member record.



NOTE: keyField represents the unique identifier for the member in your platform


1a. If member was not found, create a record for the member in Engagement Rx



When creating a new member, the following fields are required:



  • keyField


However, we recommend also including the following fields (if available) to further personalize the member experience:



  • firstName

  • lastName

  • emailAddress

  • birthdate

  • gender


All of these fields are described in the API Reference documentation


2. Get an authentication token to use for Single Sign-On (SSO) to Engagement Rx


Call the API method below to get an authentication token.  The token returned is valid for 1 minute and is used for facilitating the Single Sign-On process in the next step



3. Load the Engagement Rx SSO endpoint URL into your mobile app WebView


The endpoint URL uses the following format:


https://www.engagementrx.com/<portalPrefix>/sp/token/sso?token=&isEmbedded=&RelayState=


The <portalPrefix> should be replaced by the prefix configured for your portal (see White Label Configuration).  The endpoint supports the following query string parameters:




  • token (required) - The SSO authentication token received from the client API call in step #2


  • isEmbedded (required) - See (Embed Modes) below for a description of the available options.


  • relayState (optional) - Clients can deep-link to various platform features. A deep-link will automatically load the specified location immediately after authentication.  This customization can be used by your system to create your own menu within your application.  See Deep linking to content and features for the available relayState options.  NOTE:  If this parameter is not provided, the user is redirected to the Member Dashboard. 


Embed Modes


When embedding Engagement Rx inside a mobile app, there are two different embed modes to allow you to control which navigation elements display in Engagement Rx:


isEmbedded=withmenus



  • Navigation Disabled (hidden):

    • Page Header

      • The logo which appears in the top menu bar



    • Page Footer

      • The copyright and legal notices





  • Navigation Enabled (visible):

    • Page header

      • Language selector

      • Notifications bell

      • Member Profile button



    • Left-side navigation

      • Main menu



    • Page Footer

      • The Help button






isEmbedded=blank—The top navigation bar and all encompassing navigation buttons are turned off.  In the footer, the copyright and legal notices are turned off, and the Help button is visible.



  • Navigation Disabled (hidden):

    • Page Header

      • Header is completely removed and not visible including:

        • The logo which appears in the top menu bar

        • Language selector

        • Notifications bell

        • Member Profile button





    • Left-side navigation

      • The left-side navigation is completely removed and not visible including

        • Main menu





    • Page Footer

      • The copyright and legal notices





  • Navigation Enabled (visible):

    •  

    • Page Footer

      • The Help button






Related Customizations


The following customizations are always available and can be used in conjunction with these embed options:


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article