Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

If you need to send some predefined values, you can use a special parameter called ‘’parameters’’ from our /wiki/spaces/WDP/pages/2682913539 Deployment Kit. This option would allow you to skip the step of room selection and launch the Visualizer with the chosen room scene and a specific product applied to the surface.

...

Expand
titleoption #1: launching the Visualizer with a predefined room scene
Code Block
languagejs
<html>
<head></head>
<body>
<script
        class="wizart__floating-button"
        data-title="Custom button title"
        data-token="5sqE3XBME9tOTgZfc8bI5IxritvBLfwuJWU7txisyrliCpifqKRa7LHYJ7cz"
        data-parameters='{"room_uuid":"184164cb-2a4d-49b7-a716-50685b3cd70d"}'
        src="https://wizart-filesd35so7k19vd0fx.fra1.cdn.digitaloceanspaces.comcloudfront.net/production/integration/floating-button.min.js"
></script>
</body>
</html>
Expand
titleoption #2: launching the Visualizer with a predefined room scene
Code Block
languagejs
<html>
<head></head>
<body>
<script type="application/javascript"
        defer
        src="https://wizart-filesd35so7k19vd0fx.fra1.cdn.digitaloceanspaces.comcloudfront.net/production/integration/floating-button.min.js">
</script>
<script type="application/javascript">
    document.addEventListener("DOMContentLoaded", function(event) {
        var floatingButton = new window.WFloatingButton({
            token: "5sqE3XBME9tOTgZfc8bI5IxritvBLfwuJWU7txisyrliCpifqKRa7LHYJ7cz",
            element: document.getElementsByTagName("body")[0]
        });

        floatingButton.render({
            parameters: JSON.stringify({
                room_uuid: '184164cb-2a4d-49b7-a716-50685b3cd70d',
            })
        });
    });
</script>
</body>
</html>

...

Expand
titleoption #1: launching the Visualizer with a predefined room scene and a predefined product applied
Code Block
languagejs
<html>
<head></head>
<body>
<script
        class="wizart__floating-button"
        data-title="Custom button title"
        data-token="5sqE3XBME9tOTgZfc8bI5IxritvBLfwuJWU7txisyrliCpifqKRa7LHYJ7cz"
        data-vendor_code="Wallpaper 06"
        data-parameters='{"room_uuid":"184164cb-2a4d-49b7-a716-50685b3cd70d"}'
        src="https://wizart-filesd35so7k19vd0fx.fra1.cdn.digitaloceanspaces.comcloudfront.net/production/integration/floating-button.min.js"
></script>
</body>
</html>
Expand
titleoption #2: launching the Visualizer with a predefined room scene and a predefined product applied
Code Block
languagejs
<html>
<head></head>
<body>
<script type="application/javascript"
        defer
        src="https://wizart-filesd35so7k19vd0fx.fra1.cdn.digitaloceanspaces.comcloudfront.net/production/integration/floating-button.min.js">
</script>
<script type="application/javascript">
    document.addEventListener("DOMContentLoaded", function(event) {
        var floatingButton = new window.WFloatingButton({
            token: "5sqE3XBME9tOTgZfc8bI5IxritvBLfwuJWU7txisyrliCpifqKRa7LHYJ7cz",
            element: document.getElementsByTagName("body")[0]
        });

        floatingButton.set({ vendorCode: 'Wallpaper 06' }); //a product vendor code

        floatingButton.render({
            parameters: JSON.stringify({
                room_uuid: '184164cb-2a4d-49b7-a716-50685b3cd70d',
            })
        });
    });
</script>
</body>
</html>