To offer a more seamless and smooth experience for customers we introduced support for automatic authentication in the chat widget we use in our Customer Centre in SuperOffice version 8.5 R05.
Well great news, but what if you want to embed SuperOffice chat on an external website?
For each chat channel that you configure in your system, we generate a unique script tag that allows you to embed a chat widget on any other site.
Let’s expand this a bit with a real-life scenario:
Your customer has an external website that allows their customers to log in and they want to add SuperOffice chat to this page. This website exists outside our eco-system, so you know that our authentication mechanism will not work, but you would prefer that customers would not have to manually fill out the pre-chat form as they already have authenticated.
How to solve this?
It is possible to expand the script tag with data-attributes to pass values into the pre-chat form. The following four attributes are supported:
- Name: data-customerName="John Rowling"
- Email: data-customerEmail="firstname.lastname@example.org"
- Phone: data-customerPhone="12345678"
- Company: data-companyName="Liberty Inc"
- data-customerName="cookie:someValue": Get the value from the cookie named "someValue"
- data-customerName="url:someParameter": Get the value from the URL parameter named "someParameter"
All four fields supports this syntax.
This would now give you, for example, a newly expanded script tag using information from the cookie.
The pre-chat form would automatically populate based on present cookie values as shown in image.