This actual demo was done using the old Predictive Engagement SDK. I populated email, givenName and familyName using the traits mapper described here Map traits to link customer records - Genesys Documentation. I used this javascript to trigger it:
scriptPE.onload = (function(a,t,c,l,o,u,d){a['_genesysJourneySdk']=o;a[o]=a[o]||function(){
(a[o].q=a[o].q||[]).push(arguments)},a[o].l=1*new Date();u=t.createElement(c),
d=t.getElementsByTagName(c)[0];u.async=1;u.src=l;u.charset='utf-8';d.parentNode.insertBefore(u,d)
})(window, document, 'script', 'https://apps.usw2.pure.cloud/journey/sdk/js/web/v1/ac.js', 'ac');
ac('init', 'orgID', { region: 'region' ,
globalTraitsMapper: [
{
"fieldName": "login_email",
"traitName": "email"
}, {
"fieldName": "firstname",
"traitName": "givenName"
}, {
"fieldName": "mobilenr",
"traitName": "homePhone"
}, {
"fieldName": "lastname",
"traitName": "familyName"
}
]
});
This maps form fields on the website in that demo (login_email, firstname, mobilenr and lastname) to the correct fields to identify a user.
However, if the customer fills the chat form before starting and you have Single Customer View (About single customer view - Genesys Cloud Resource Center) enabled, it should happen automatically with Widget v2. The form uses a field called email for the email address, and this is used to match as described in the docs above.