You need to sign in to do that
Don't have an account?

addcustomDetail dynamic value liveagent
Hello,
Can anyone please give me idea how to dynamically get value from addCustomDetail in LiveAgent.
This code is not working..
liveagent.addCustomDetail("First_Name",document.getElementById("FirstName").value);
and here's the whole Code.
Can anyone please give me idea how to dynamically get value from addCustomDetail in LiveAgent.
This code is not working..
liveagent.addCustomDetail("First_Name",document.getElementById("FirstName").value);
and here's the whole Code.
<script type='text/javascript' src='https://c.la1-c1cs-ukb.salesforceliveagent.com/content/g/js/41.0/deployment.js'></script> <script type='text/javascript'> //Custom Details liveagent.addCustomDetail("Customer_Name",document.getElementById("prechat_field_name").value); //CASE liveagent.addCustomDetail("Case_Status", "New"); liveagent.addCustomDetail("Case_Origin", "Chat"); liveagent.addCustomDetail("Case_Record Type", "01228000000isic"); liveagent.addCustomDetail("Case_Product", "House and Land"); liveagent.findOrCreate("Case") .map("Subject","Case_Origin",false,false,true) .map("Status","Case_Status",false,false,true) .map("Product__c","Case_Product",false,false,true) .map("RecordTypeId","Case_Record",false,false,true) .saveToTranscript("CaseId") .showOnCreate(); //End of Custom Details liveagent.init('https://d.la1-c1cs-ukb.salesforceliveagent.com/chat', '5725D000000000f', '00D5D0000000TZM'); </script>I hope you can help me here.. Thank you!
- The order of execution and the code that you are executing
- The Names that you're giving to the values (specifically, the underscore).
Maybe you should try something like this:For the second poing: let me know if you want to give this values to standar fields or this are just the labels for the fields.