Skip to main content

Hi -

 

I have a custom embedded chat deployment setup with a pre-chat form.  This is utilizing a chat bot as well.

 

There is no issue with the pre-chat fields being pre-populated as set in the embedded chat deployment code, and this data flows to the transcript record as well to custom fields I have set.

 

My question is, I thought with pre-chat form, by default Salesforce is supposed to search or create a contact based on the pre-chat fields.  There is no searching or creating being done.  I have to put a disclaimer, the chat tests I did, were only with a chat bot and never transfered to a live agent.

 

Do I have to have the chat transferred to a live agent for the contact search or create to complete?  Or, do I need to add this is my embedded chat deployment code?  I actually did add the embedded_svc.settings.extraPrechatInfo code, but contacts are still not being searched or created.

 

Is there something I am missing?

 

Thanks in advance!

 

Chris Valko

1 条评论
  1. 2020年7月7日 15:02

    As per documentation, searching happens automatically. In my situation, the contact was getting created everytime, despite being found. I had to update the embedded_svc.settings.extraPrechatInfo and below is what I used to prevent creating new contact..

    If you see below, for "Contacts", I have used "docreate" = false, but still want to search the contacts.

    embedded_svc.snippetSettingsFile.extraPrechatInfo = [{

    "entityName": "Contact",

    "entityFieldMaps" : [{

    "doCreate":false,

    "doFind":true,

    "fieldName":"FirstName",

    "isExactMatch":true,

    "label":"First Name"

    }, {

    "doCreate":false,

    "doFind":true,

    "fieldName":"LastName",

    "isExactMatch":true,

    "label":"Last Name"

    }, {

    "doCreate":false,

    "doFind":true,

    "fieldName":"Email",

    "isExactMatch":true,

    "label":"Email"

    }]

    }];

    })();

0/9000