0

I'm implementing live chat in an external web page. The user is already logged in with an username, and I want LiveChat to use it for the greeting.

But if I pass it either to the embedded_svc.settings.extraPrechatFormDetails or embedded_svc.settings.extraPrechatFormDetails, then Salesforce is not able to link with the proper Contact by the email. It's like if I specify it, it tries to reach some Contact that mathc every of the fields.

LINK IT, BUT SAYS "Hi, Guest!"

        embedded_svc.settings.extraPrechatFormDetails = [
        {
        "label": "Email",
        "value": "john.doe@test.com",
        "displayToAgent": true
        }];

        embedded_svc.settings.extraPrechatInfo = [
    {
        "entityName": "Contact", 
        "entityFieldMaps": [    // The list of fields within the record type specified in entityName
            {
                "doCreate": true,
                "doFind": true,
                "fieldName": "Email",
                "isExactMatch": true,
                "label": "Email"
            }
        ]
    },

DOES NOT LINK, BUT SAYS "Hi, Johnny!"

        embedded_svc.settings.prepopulatedPrechatFields = {FirstName: 'Johnny'}; 

        embedded_svc.settings.extraPrechatFormDetails = [
        {
        "label": "Email",
        "value": "john.doe@test.com",
        "displayToAgent": true
        }];

        embedded_svc.settings.extraPrechatInfo = [
    {
        "entityName": "Contact", 
        "entityFieldMaps": [    // The list of fields within the record type specified in entityName
            {
                "doCreate": true,
                "doFind": true,
                "fieldName": "Email",
                "isExactMatch": true,
                "label": "Email"
            }
        ]
    },

Does anybody know why is it happening and how to fix it?

Thanks a lot in advance!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.