In-App Messaging

Transform In-App messaging into a dynamic, personalized experience for your brands users.

  • Messaging

Learn to seamlessly integrate and elevate customer engagement within your brands applications by adding In-App Messaging.

The SDK (Software Development Kit) is to be integrated, utilizing its APIs to interface with the app. The SDK facilitates continuous conversations by communicating with the Conversational Cloud in the background. 

Agents interact with consumers through the Conversational Cloud's web interface. The SDK is also useful for customizing attributes of the In-App messaging experience as per brand requirements.

You have the option to set up In-App Messaging for both Android and iOS.

1. Set Up In-App Messaging for Android

To set up In-App Messaging for your brand in Android:

1.1 Download the SDK

1. Navigate to https://github.com/LP-Messaging. The LP Messaging Github page appears.

Screenshot 2024-01-08 at 10.25.41 PM.png

2. Click Android-Messaging-SDK. The Android Messaging SDK page appears.

Screenshot 2024-01-08 at 11.01.26 PM.png

Select the latest version of the SDK by clicking androidX_Master > Tags > select the latest version numbering. The latest version of the SDK page appears.

Screenshot 2024-01-08 at 11.06.15 PM.png

3. Click Code > Download Zip

Screenshot 2024-01-08 at 11.11.10 PM.png

The SDK is downloaded in zip format. Extract it before adding to Android Studio.

1.2 Add the SDK to Android Studio

Open Android Studio and add the downloaded SDK.

You must select the SampleApp-Source folder from the downloaded unzipped SDK to open on Android Studio.

You can install the Mobile App Messaging SDK using a couple of different methods:

  • Automatically add the SDK files using Gradle.

For more information on installing using Gradle, see Add SDK using Gradle.

  • Manually copy the SDK files to your project.

For more information on this, see Manually copying SDK files.

1.3 Configure the Android SDK

Set up automatic backup and restore options, customize look and feel to the branding requirements of your brand, and more.

For more detailed information on configuring the Android SDK click here.

After configuring the SDK to the brands requirements you can test out the changes by emulating the attached Sample App.

1.4 Emulate the Sample App

The provided SDK includes a sample app that can be used with Android Studio's emulator for testing the In-App messaging experience.

  • Click the play option on the top of the Android Studio to run the sample app.
Screenshot 2024-01-09 at 2.03.24 PM.png

Upon running the app the built-in Emulator appears.

Screenshot 2024-01-09 at 1.16.24 PM.png

1.5 Configure In-App on Conversational Cloud

Create a campaign, set up engagements and entry points for the mobile app on Conversational Cloud.

1. Log in to your Conversational Cloud account. The homepage appears.

Screenshot 2023-11-23 at 3.43.51 PM.png

2. On the hamburger menu click the Engage tab and click Campaign Builder. The Campaign Builder page appears.

Screenshot 2023-11-27 at 11.00.56 PM.png

3. Click the Add campaign option at the bottom of the page. The Campaign page appears.

Screenshot 2023-11-27 at 11.37.38 PM.png

Provide the following information:

  1. Add Goal: Click to add goals from the goal library or create a new one for your campaign.
  2. Target audience/Campaign time frame: Click the options to add or change the target audience and the campaign time frame for your campaign.
  3. Add engagement: Click to add engagements to your campaign.
Screenshot 2024-01-09 at 3.34.47 PM.png

Select the engagement source as Mobile App. The Settings page appears.

Screenshot 2024-01-09 at 3.40.17 PM.png

Select the required skill and click Next. The Entry point library appears.

Screenshot 2024-01-09 at 3.42.21 PM.png

Click Add new. The add new entry point page appears.

Screenshot 2024-01-09 at 3.51.36 PM.png

Take note of the entry point section name added here as it must be used later in configuring the In-App messaging on Android Studio.

Once added, click Done and Publish the campaign.

1.6 Integrate the SDK to Conversational Cloud

Provide the following information into the emulator:

Screenshot 2024-01-09 at 2.40.03 PM.png
Screenshot 2024-01-09 at 2.46.23 PM.png

1. Account ID: You can source your brands account Identification number from the profile icon in the top navigation bar in the Conversational Cloud.

Screenshot 2024-01-09 at 2.52.29 PM.png

2. AppInstallID: You can source your brands installation identifier by clicking Manage > Channel Setup > Mobile App > Configure the Mobile in App page appears.

Screenshot 2024-01-09 at 2.57.46 PM.png

Click Proceed to configure. The Add new Mobile App source page appears.

Screenshot 2024-01-09 at 3.02.07 PM.png

If the appInstallid is not available click the Create option to view the appInstallid.

Copy the appInstallid available here to the emulator in Android Studio.

Screenshot 2024-01-09 at 5.29.09 PM.png

Click Monitoring. The Monitoring page appears.

Screenshot 2024-01-09 at 6.26.44 PM.png

Provide the entry point section name that you created when creating the engagement, into the EntryPoint field and click GET ENGAGEMENT. The engagement details appear.

Screenshot 2024-01-09 at 6.31.31 PM.png

The appearance of the engagement settings signal that the entry point section provided matches the one created earlier.

Click OPEN MESSAGING. The Messaging page appears.

Screenshot 2024-01-09 at 6.34.22 PM.png

Click OPEN ACTIVITY. The In-App Messaging chat window appears.

Screenshot 2024-01-09 at 6.36.53 PM.png

The routed skill is activated and the chat appears as required.

2. Set Up In-App Messaging for iOS

To set up In-App Messaging for your brand in iOS:

2.1 Download the iOS SDK

1. Navigate to https://github.com/LP-Messaging. The LP Messaging Github page appears.

Screenshot 2024-01-23 at 12.04.32 AM.png

2. Click iOS-Messaging-SDK. The iOS Messaging SDK page appears.

Screenshot 2024-01-23 at 12.07.36 AM.png

Select the latest version of the SDK by clicking master > Tags > select the latest version numbering. The latest version of the SDK page appears.

Screenshot 2024-01-23 at 12.08.52 AM.png

3. Click Code > Download Zip

Screenshot 2024-01-23 at 12.10.52 AM.png

The SDK is downloaded in zip format. Extract it before adding to Xcode.

2.2 Install the SDK into your project

You can install Conversational Cloud Mobile App Messaging SDK for iOS using a few different methods:

  • Automatically using CocoaPods.

For more information on installing using CocoaPods see, Automatically using CocoaPods.

  • Automatically using SPM.

For more information on installing using SPM see, Automatically using SPM.

  • Manually copying the libraries to your Xcode Project.

For more information on this see, Manually copying the libraries to Xcode.

Once installed, you can move on to configuring the project settings.

For this guide let us use the CocoaPods method.

2.3 Setting up through CocoaPods

After the SDK is downloaded and extracted. You must install CocoaPods to add it to your Xcode. 

Open a new terminal window. 

Ensure that you have quit Xcode before proceeding.

Screenshot 2024-02-08 at 4.42.21 PM.png

Navigate the terminal directory to Sample Apps > Swift in the extracted SDK. To do this you can use the CD command and drag the folder into the terminal.

Ensure that you add a space after the cd command. You can also manually type in the directory following the cd command for example:cd /Desktop/iOS/iOS-Messaging-SDK-6.17.0/Sample\Apps

Screen.gif

Once the directory change is reflected, type the command export GEM_HOME="$HOME/.gem" into the terminal and hit the return key.

Screenshot 2024-02-08 at 5.21.21 PM.png

Next update your gem package manager with the command sudo gem update. You are prompted for your password, type it in and hit the return key.

Screenshot 2024-02-08 at 5.50.16 PM.png

Once the installation is completed, install Homebrew using the command /bin/bash -с "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)". You are prompted for your password, type it in and hit the return key and once more when prompted.

Screenshot 2024-02-08 at 6.05.46 PM.png

Once the installation is completed, provide the command (echo; echo 'eval "S(/opt/homebrew/bin/brew shellenv)**) > /Users/gauthamthomas/.zprofile and hit the return key. Then provide the command eval "S(/opt/homebrew/bin/brew shellenv)" and hit the return key to add Homebrew to your path. 

Screenshot 2024-02-08 at 6.13.10 PM.png

After this is completed, provide the command brew install cocoapods.

Screenshot 2024-02-08 at 6.17.06 PM.png

In a text editor of your choice input the following:

ruby:
source 'https://github.com/LivePersonInc/iOSPodSpecs.git' platform :ios, '13.0' # use_frameworks! target 'SampleApp' do pod 'LPMessagingSDK','6.15.0.895' end

Save it in Swift folder under the name "Podfile". Once done, return to the terminal window and provide the command pod install.

Screenshot 2024-02-08 at 6.56.50 PM.png

Once completed a file named "SampleApp.xcworkspace" will appear in your Swift folder.

Screenshot 2024-02-08 at 6.59.57 PM.png

You have installed the SDK using Cocoapods.

You can install Conversational Cloud Mobile App Messaging SDK for iOS using a few different methods:

  • Automatically using SPM.
  • Manually copying the libraries to your Xcode Project.

For more information on installing using these methods see, Knowledge Base.

2.4 Configure the iOS SDK

Set up app extensions, customize look and feel to the branding requirements of your brand, and more.

For more detailed information on configuring the iOS SDK see, here.

After configuring the SDK to the brands requirements you can test out the changes by emulating the attached Sample App.

2.5 Emulate the Sample App

The provided SDK includes a sample app that can be used with Xcode's emulator for testing the In-App messaging experience.

  • Click the play option on the top of the Xcode to run the sample app.

Ensure that you select a device to simulate from the top of Xcode before clicking build option. 

Screenshot 2024-02-08 at 8.27.47 PM.png

Upon running the app the built-in Emulator appears.

Screenshot 2024-01-09 at 1.16.24 PM.png

2.6 Configure In-App on Conversational Cloud

Create a campaign, set up engagements and entry points for the mobile app on Conversational Cloud.

1. Log in to your Conversational Cloud account. The homepage appears.

Screenshot 2023-11-23 at 3.43.51 PM.png

2. On the hamburger menu click the Engage tab and click Campaign Builder. The Campaign Builder page appears.

Screenshot 2023-11-27 at 11.00.56 PM.png

3. Click the Add campaign option at the bottom of the page. The Campaign page appears.

Screenshot 2023-11-27 at 11.37.38 PM.png

Provide the following information:

  1. Add Goal: Click to add goals from the goal library or create a new one for your campaign.
  2. Target audience/Campaign time frame: Click the options to add or change the target audience and the campaign time frame for your campaign.
  3. Add engagement: Click to add engagements to your campaign.
Screenshot 2024-01-09 at 3.34.47 PM.png

Select the engagement source as Mobile App. The Settings page appears.

Screenshot 2024-01-09 at 3.40.17 PM.png

Select the required skill and click Next. The Entry point library appears.

Screenshot 2024-01-09 at 3.42.21 PM.png

Click Add new. The add new entry point page appears.

Screenshot 2024-01-09 at 3.51.36 PM.png

Take note of the entry point section name added here as it must be used later in configuring the In-App messaging on Xcode.

Once added, click Done and Publish the campaign.

2.7 Integrate the SDK to Conversational Cloud

Upon loading up Xcode with the app, navigate to MonitoringViewController tab and search for entrypoints.

Screenshot 2024-02-09 at 3.34.04 PM.png

Replace the value with the entry point section name you provided under Step 2.6 when you configured the entry point in Conversation Cloud.

Select a device to simulate and run the simulator. The simulator appears with the app.

Screenshot 2024-02-09 at 3.27.03 PM.png

Select Monitoring. Provide the following information into the simulator:

Screenshot 2024-02-09 at 3.49.23 PM.png
Screenshot 2024-01-09 at 2.46.23 PM.png

1. Account ID: You can source your brands account Identification number from the profile icon in the top navigation bar in the Conversational Cloud.

Screenshot 2024-01-09 at 2.52.29 PM.png

2. AppInstallID: You can source your brands installation identifier by clicking Manage > Channel Setup > Mobile App > Configure the Mobile in App page appears.

Screenshot 2024-01-09 at 2.57.46 PM.png

Click Proceed to configure. The Add new Mobile App source page appears.

Screenshot 2024-01-09 at 3.02.07 PM.png

If the appInstallid is not available click the Create option to view the appInstallid.

Copy the appInstallid available here to the simulator in Xcode.  Click Get Engagement > Click Show Conversation with Campaign. The In-App Messaging chat window appears.

If upon clicking GET ENGAGEMENT errors are returned, ensure that you try the simulation with a different devide and click Init SDE and then Send SDE before following the above step.

Screenshot 2024-02-09 at 3.57.16 PM.png

The routed skill is activated and the chat appears as required.

3. Push Notifications

Design & Code
Screenshot 2024-02-16 at 10.13.07 AM.png

Description: Push and local notifications are a key factor that makes the experience better for consumers — they never have to stay in your app or keep the window open, as they will get a proactive notification as soon as a reply or notice is available.

Prerequisites: Technical Review, SDK Review. Implementation from brand side: to share certificates, to initialize SDK method

Risks/Challenges: Misunderstanding of the different Android and iOS processes for managing push notifications can result in project delays and design errors.

Push notifications are designed to allow an agent to communicate with or respond to consumer inquiries when the consumer is not using the brand application. The process for push notifications is described below: 

  1. The LivePerson SDK generates a request for a new token (UID) from the Apple Push Notification Service (APN), or the Firebase Cloud Messaging (FCM) service (for Android OS devices). 
  2. The LivePerson SDK registers (userID + APN/FCM token) to LivePerson Pusher. 
  3. LivePerson Pusher adds a new record for the new consumer token. 
  4. Any message notification is sent to LivePerson’s UMS with an LivePerson JWT. 
  5. All messages are verified by the LivePerson Gatekeeper. 
  6. When UMS generates a new message to the consumer, a new notification is generated to LivePerson Pusher. 
  7. LivePerson Pusher sends the message with APN/FCM token to Brand Proxy (Customer Pusher). 
  8. Brand Pusher sends a push notification via FCM/APN to the consumer device. 
  9. LivePerson UMS sends the message to the agent queue, to be reviewed by the brand agent.
Pros of Push Notification
  1. User Engagement: Push notifications are designed to allow an agent to communicate with or respond to consumer inquiries when the consumer is not using the brand application. Please note, conversation is started from client side. Agent will not start conversation with consumer via push notification.
  2. Notification Opportunities via Proactive messaging API Liveperson: Push from brand can start conversation with client Proactive Messaging for App Messaging - LivePerson Knowledge Center
Cons of Push Notifications
  1. User Interruption: If not used judiciously, push notifications can be intrusive and annoying, leading to a negative user experience. Too many or irrelevant notifications can result in users disabling them or even uninstalling the app.
  2. Opt-Out Rate: Users have the option to disable push notifications, and a high opt-out rate may diminish the effectiveness of this communication channel.
  3. Technical Limitations: Push notifications rely on an internet connection, and there can be technical issues, such as delays or failures in delivering notifications, especially in regions with poor network connectivity.
LiveEngage Configuration: Push Certificate
Screenshot 2024-02-16 at 10.20.50 AM.png

Description: As push notifications are configured in the SDK it is necessary to load the push certificates into LiveEngage. This is done in the App Data Sources view of the Campaigns tab.  

Goal: Configure the push notification Android and iOS certificates.

Ownership/Audience: CSM/SE assist brand with configuration.

Prerequisites: Define Push Notification Plan, Push Notification, Account Provisioning.

Risks/Challenges: Incorrect configuration of push certificates will result in push not working.

Reference Links

LP Messaging SDK

Push and local notifications significantly enhance the consumer experience by eliminating the need for them to remain within your app or keep the window open. 

Instead, they receive proactive notifications immediately upon the availability of a reply or notice.

For more detailed information on configuring Push Notifications for In-App Messaging see, here for iOS and here for Android.