Jang_RSR Member since 2017 4 posts
Posted: 3 months ago
Last activity: 3 months 1 week ago

Attempts to load the chat widget on-demand

we have a requirement to load the chat widget on-demand. this is required as user identifier is loaded asynchronously. so we need to load the chat widget only after customer data available in website.


we have modified idex.html to load the widget.

<!DOCTYPE html>
<title>Pega test page</title>

    <script src='https://xxxxxxxxxxxxxxx/prweb/app/default/?pyActivity=pzIncludeMashupScripts'></script>
    <script src="domWrapper.js"></script>
    <script src='PegaHelperExtension.js'></script>
    <script src='PegaHelper.js'></script>
    <link rel="stylesheet" type="text/css" href="PegaStyles.css?nocache=20200611T145831.601GMT">

        // this will not be called until the button is clicked
        function loadChat() {

        .content {
            font-family: Arial, Helvetica, sans-serif;
            max-width: 1024px;
            margin: 0 auto;

    <div class="content">
        <h1>2) Load chat widget on demand - not working</h1>
            This is a non-working version that attempts to load the chat widget on-demand, which is what the application
            will need to do after the user identifier is loaded asynchronously.
        <p><strong>Click Load chat to load the chat widget:</strong><br />
            <a href="#" onclick="loadChat()">Load chat</a></p>




please suggest how can we do it.


Pega Customer Service for Financial Services 8.3 Conversational Channels Financial Services Lead System Architect
Share this page LinkedIn