HI
I am facing issues while prefilling name & email to web widget. I am able to open chat on page load but unable to prefill name & email
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Chat</title>
<!-- Start of Zendesk Widget script -->
<script id="ze-snippet"
<!-- End of Zendesk Widget script -->
<style type="text/css">html { background: #243553; }</style>
</head>
<body>
<script>
document.addEventListener( 'DOMContentLoaded', function( event ) {
zE('messenger', 'open');
// zE('webWidget', 'prefill', {
// name: { value: "test User", readOnly: true },
// phone: { value: "1234567987", readOnly: true }
// });
});
</script>
</body>
</html>
Error:
Method webWidget.prefill does not exist.
A note from Zendesk: API methods associated with the Web Widget (Classic) are still being executed on this page. This website is now using the new Web SDK (messaging experience) which no longer supports these APIs. If you don't intend to use the Web Widget (Classic), we recommend that you remove this code from your website. Whilst not recommended, leaving them won't cause any issues.