Biggest thing first I am not much of a developer but more an admin, my team is working on passing through a specific visitors UUID from our webpage into salesforce. We are looking to have this UUID passed into the Prechat form details and saved on the Chat Visitor record once the chat finishes. We have our script with extra prechat info but we are not seeing this actually save in salesforce once the chat finishes. does anyone see where we may be going wrong?
JavaScript
var initESW = function(gslbBaseURL) {
embedded_svc.settings.displayHelpButton = true; //Or false
embedded_svc.settings.language = ''; //For example, enter 'en' or 'en-US'
embedded_svc.settings.enabledFeatures = ['LiveAgent'];
embedded_svc.settings.entryFeature = 'LiveAgent';
embedded_svc.settings.extraPreChatFormDetails = [
{
"label": "Participant Account UUID",
"value": "{$uuid}",
"displayToAgent": true
}
];
embedded_svc.settings.extraPrechatInfo = [{
"entityFieldMaps": [{
"doCreate": true,
"doFind": true,
"fieldName": "Participant_Account_UUID__c",
"isExactMatch": true,
"label": "Participant Account UUID"
}],
"entityName": "LiveChatVisitor"
}];
embedded_svc.init(
'https://benefitresource--service.my.salesforce.com',
'https://service-bri.cs9.force.com/test',
gslbBaseURL,
'00DK000000WfuyF',
'BRI_Chat',
{
baseLiveAgentContentURL: 'https://c.la3-c1cs-dfw.salesforceliveagent.com/content',
deploymentId: '572K000000002Di',
buttonId: '573K000000002n5',
baseLiveAgentURL: 'https://d.la3-c1cs-dfw.salesforceliveagent.com/chat',
eswLiveAgentDevName: 'BRI_Chat',
isOfflineSupportEnabled: true
}
);
};
if (!window.embedded_svc) {
var s = document.createElement('script');
s.setAttribute('src', 'https://benefitresource--service.my.salesforce.com/embeddedservice/5.0/esw.min.js');
s.onload = function() {
initESW(null);
};
document.body.appendChild(s);
} else {
initESW('https://service.force.com');
}