How to Configure Messenger Automatic Sign-In (SSO)

Automatically identify your customers when they log into your application

Last Updated: January 24, 2023

What's in this article?

What is Automatic Sign-In in Messenger?

When you use Messenger inside an application that has already authenticated your customer, you don’t want to ask them for their email address again in order to get help or chat with you. That’s where automatic sign-in or customer matching comes in. Since you have already authenticated the customer’s for the session, you can pass that identification to Messenger and automatically sign the customer into the application to provide them with more personalized experiences.

This means that your customer will be able to chat with you without filling out any additional information and that chat will automatically attach to the correct Customer and Contact inside CXMEngine when it enters your queue. You can also leverage Virtual Assistants to provide additional personalized support for the customer without asking for any identifying information.


How Do I Configure Automatic Sign-In for Messenger?

Setting up automatic sign-in with Messenger is easy using our OvationMessenger.identifyUser() function. 

When Messenger first loads inside your application, just pass a User’s identifying credentials to Messenger to automatically authenticate the user into Messenger. 

To identify your customer, pass email (required), phone number (optional), and first name (optional). If no matches are found, the user will not be authenticated and will be asked for their email (required), name (optional), and phone number (option) when they begin a chat conversation. If more than one match is found, CXMEngine will match to the first Customer and Contact found.

The flow will look like this:

  1. The Messenger application starts up on load of your application (likely somewhere like www.partner-app.com/login). The Messenger app will now be visible but no user has been identified yet.
  2. Once the user logs into your application, you will call the identifyUser function (for example, OvationMessenger.identifyUser({email: '[user email address]'})). When the next screen loads, the Messenger application will have the user identification included and the user will no longer have to add in identifying information to begin a live chat.


API Information & Example Code

APIDescriptionParameters
OvationMessenger.identifyUser(User)

Pass a user’s identifying credentials to Messenger when it first loads to automatically authenticate the user into Messenger. If no matches are found, the user will not be authenticated and will be asked for their email (required), name (optional), and number (option) to begin a chat conversation.User [Object]
An object containing the information to identify. Include only one property. 

Example: 
OvationMessenger
  .identifyUser({
    email: 'customer@domain.com',
    phone: ‘415-690-1610’,
    firstName: ‘Alan’,
  })


Do I need to update my installed Messenger Code Snippet?

No, you do not need to update the code snippet that you used to install Messenger. Just make a call to OvationMessenger.identifyUser() after the user has logged into your application.


How Does Customer Matching Interact with Cookies?

If you use the OvationMessenger.identifyUser() call to match your customers, this will override any sessions saved in cookies. 


What Customer information does it match against?

The .identifyUser() function matches the User’s information against the Contact data in your CXMEngine instance. Contacts are children to Locations and Customers so it will automatically associate with the correct Location and Customer if it matches.

Help us improve. Was this article helpful?


Can't find what you're looking for? Submit an Article Request.