Install the iAdvize chat on your mobile app - Mobile SDK V2

You need to install iAdvize chat on your mobile app? This article will guide you step by step through the implementation of the mobile SDK V2.

1. Upstream work

  • Before you begin implementation on your end, make sure with your CSM that the Mobile SDK v2 functionality is enabled for branding
  • Also, make sure to review the Mobile SDK v2 technical documentation with your development team before you start your exchanges: https://developers.iadvize.com/documentation/mobile-sdk
  • As well as all the SDK articles available here in this knowledge base
  • We are at your disposal in case of questions during this preparation phase

Once these steps are validated, you are ready to start the implementation!

2. Prerequisites 

  • Profile: administrator and developer
  • The version of your app:
    • iOS: minimum iOS 12
    • Android: minimum API 21

3. Engage your visitors from the Mobile SDK

Go to the "Engagement" section > Campaigns
  • To create your campaign and mobile engagement rule
  • Then, name it and choose Inbound as a type of strategy
  • Select Mobile App as an entry point to engage your audience
  • Create a targeting rule by clicking on Add and name it



Save the targeting rule ID (framed in red below) as the developer will need it to integrate these rules of engagement within the Mobile SDK v2.

From the version 2.5 and onward the SDK supports video conversations, the targeting rule creation process is the same but you will also need to note for which type of conversation channel the rule will be used (chat or video) as it will be needed for the integrator to trigger it.

In the case of a video targeting rule, you will need to ensure that the correponding respondents are setup to answer video conversations.
 
NB: You will then have to route your conversation to the right respondents.


4.
Activate the Mobile SDK push notifications

In order to receive notifications related to SDK iAdvize conversations in your mobile application, you must generate the JSON FCM private key file and configure certain push notification information on the iAdvize administration site.

4.1. Generating the JSON FCM private key file

First, open the Firebase console.

Then go to the project settings and navigate to the Cloud Messaging tab:

EN 1.jpg

 

In Firebase Cloud Messaging API (V1), click on the link Manage service accounts, which redirects to the Google Cloud Console:

 

Select the appropriate service account by clicking on the link:

 

Finally, go to the Keys tab, then Add a key and finally Create a key. Select the JSON key type:

 

The private key file will be downloaded automatically.

 

4.2. Upload the private key file to the iAdvize administration

Go to Engagement > Settings and select Mobile App channel in the dropdown list


You can then provide push notifications information for iOS and/or Android.

iOS

On iOS you will have to provide a certificate and private key pair. Starting with a .p12 file you can run this terminal command:

openssl pkcs12 -in AppProductionPushCertificate.p12 -out Cert.pem -nodes -clcerts

then you can run:

cat Cert.pem

Copy/paste certificate and private key (including their separators -----BEGIN----- / -----END-----) in the form as printed in the terminal.

 

Android

In the Android section, you must fill in the text field with the JSON content downloaded in the previous step. Remember to save.

To update the configuration file of the Android application, follow these steps:

  • Open the Firebase console
  • Go to Project Settings
  • Go to the General tab
  • In the App section, select the appropriate mobile application
  • Click the google-services.json button to download it

This new file must replace the one already present in your application.


⚠️ It won't be possible to start a conversation is this setting is not fulfilled.


5. Activate the satisfaction survey at the end of the conversation

You can measure your customers' satisfaction (CSAT: Customer Satisfaction), their capacity to recommend you to their friends (NPS: Net Promoter Score) and give them the possibility to leave a comment at the end of the conversation. 
Go to the admin in the Engagement > Settings > Chat > Satisfaction Survey section and check the box "Send the customer a satisfaction survey".
More information on how this satisfaction questionnaire works in this dedicated article.


6. Find your project identifier

As an iAdvize customer you will be assigned to one or more projects on the iAdvize Administration website. A project contain specific configurations for a website and/or your mobile application. Each project is identified by a unique ID that you can find on the iAdvize Administration website.

First select your project using the dropdown list
:


T
hen the project identifier can be found in the URL, here framed in red :



Save that project id, the developer will need it for the SDK integration.

7. Start integrating the Mobile SDK into your apps

Once you have completed these steps, the developer can start integrating the iAdvize SDK into your apps. Don’t forget to provide him/her with: