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.
2. Click Android-Messaging-SDK. The Android Messaging SDK page appears.
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.
3. Click Code > Download Zip.
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.
- Manually copy the SDK files to your project.
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.
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.
Upon running the app the built-in Emulator appears.
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.
2. On the hamburger menu click the Engage tab and click Campaign Builder. The Campaign Builder page appears.
3. Click the Add campaign option at the bottom of the page. The Campaign page appears.
Provide the following information:
- Add Goal: Click to add goals from the goal library or create a new one for your campaign.
- Target audience/Campaign time frame: Click the options to add or change the target audience and the campaign time frame for your campaign.
- Add engagement: Click to add engagements to your campaign.
Select the engagement source as Mobile App. The Settings page appears.
Select the required skill and click Next. The Entry point library appears.
Click Add new. The add new entry point page appears.
ℹ️ 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:
1. Account ID: You can source your brands account Identification number from the profile icon in the top navigation bar in the Conversational Cloud.
2. AppInstallID: You can source your brands installation identifier by clicking Manage > Channel Setup > Mobile App > Configure the Mobile in App page appears.
Click Proceed to configure. The Add new Mobile App source page appears.
ℹ️ 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.
Click Monitoring. The Monitoring page appears.
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.
ℹ️ 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.
Click OPEN ACTIVITY. The In-App Messaging chat window appears.
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.
2. Click iOS-Messaging-SDK. The iOS Messaging SDK page appears.
Select the latest version of the SDK by clicking master > Tags > select the latest version numbering. The latest version of the SDK page appears.
3. Click Code > Download Zip.
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.
- Automatically using SPM.
- Manually copying the libraries to your Xcode Project.
Once installed, you can move on to configuring the project settings.
For this guide we will 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.
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
Once the directory change is reflected, type the command export GEM_HOME="$HOME/.gem"
into the terminal and hit the return key.
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.
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.
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.
After this is completed, provide the command brew install cocoapods
.
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
.
Once completed a file named "SampleApp.xcworkspace" will appear in your Swift folder.
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.
2.4 Configure the iOS SDK
Set up app extensions, customize look and feel to the branding requirements of your brand, and more.
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.
Upon running the app the built-in Emulator appears.
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.
2. On the hamburger menu click the Engage tab and click Campaign Builder. The Campaign Builder page appears.
3. Click the Add campaign option at the bottom of the page. The Campaign page appears.
Provide the following information:
- Add Goal: Click to add goals from the goal library or create a new one for your campaign.
- Target audience/Campaign time frame: Click the options to add or change the target audience and the campaign time frame for your campaign.
- Add engagement: Click to add engagements to your campaign.
Select the engagement source as Mobile App. The Settings page appears.
Select the required skill and click Next. The Entry point library appears.
Click Add new. The add new entry point page appears.
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.
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.
Select Monitoring. Provide the following information into the simulator:
1. Account ID: You can source your brands account Identification number from the profile icon in the top navigation bar in the Conversational Cloud.
2. AppInstallID: You can source your brands installation identifier by clicking Manage > Channel Setup > Mobile App > Configure the Mobile in App page appears.
Click Proceed to configure. The Add new Mobile App source page appears.
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.
The routed skill is activated and the chat appears as required.
3. Push Notifications
Design & Code
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:
- 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).
- The LivePerson SDK registers (userID + APN/FCM token) to LivePerson Pusher.
- LivePerson Pusher adds a new record for the new consumer token.
- Any message notification is sent to LivePerson’s UMS with an LivePerson JWT.
- All messages are verified by the LivePerson Gatekeeper.
- When UMS generates a new message to the consumer, a new notification is generated to LivePerson Pusher.
- LivePerson Pusher sends the message with APN/FCM token to Brand Proxy (Customer Pusher).
- Brand Pusher sends a push notification via FCM/APN to the consumer device.
- LivePerson UMS sends the message to the agent queue, to be reviewed by the brand agent.
Pros of Push Notification- 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.
- 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- 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.
- 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.
- 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
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.
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.
Ready to move on? Click here to proceed.