In a previous blog, we configured a chat widget which allowed engagement with customer service agents. When creating the widget, I ignored the authentication field which is available on the chat widget form.
This blog focuses on configuring authentication which will allow the agent to see that the person who initiated the chat is known to the organisation.
The video below shows how we can easily create a chat authentication record if using a D365 Portal or a Power App Portal which forces the person initiating the chat to log in prior to being able to initiate a new chat conversation with an agent.
In the above video we saw that the two fields needed to be configured on the chat authentication record are the public key URL and the JavaScript client function.
The public key URL should be set to be [https://portalurl]/_services/auth/publickey and the JavaScript client function should be set to be auth.getAuthorizationToken.
If the authentication record is created and associated to the chat widget, users interacting with the chat widget will be forced to log in if not already logged. This is perfect in scenarios where chat may only be offered for key portal users.
If there is a need to allow unauthenticated customers to ask questions but you also want to give priority to customers who are already doing business with you or may even have a special enhanced SLA, two chat widgets will need to be created (one chat widget for authenticated chats and another for unauthenticated chats). To toggle which widget is shown, the code snippet needs to be modified. The code below will allow the appropriate chat widget to be shown based on if the customer is logged in.
{%if user%}
<!—Embed script for auth chat widget-->
{%else%}
<!—Embed script for unauth chat widget-->
{%endif%}
This hopefully has shown how we can simply configure authentication within the Omni Channel Engagement Hub for a Power App Portal.
Any questions? Please let me know in the comments below.