Initial room
Open Room Viewer straight in a room you chose, instead of the room chooser.
By default the dialog opens on its room chooser: the shopper picks one of your rooms or uploads a photo; the inline RoomViewer opens in the first room. With roomId Room Viewer opens directly in the room you name, the initial room. The shopper can still switch rooms or upload a photo.
<button type="button" data-vizbl-room-viewer-dialog data-vizbl-room-viewer-room-id="YOUR_ROOM_ID" ...>
View in your room
</button>Where room ids come from
The rooms Room Viewer offers are the active scenes on the Scenes page of the dashboard your key comes from: the built-in rooms and the ones you uploaded. A scene you turn off disappears from the widget.
The Scenes page does not show ids. To get one, open Widget code in the Rugs or Flooring dashboard and choose the room the product should open in: the code then carries the room's id in its room-id attribute. Copy that value into roomId. Wall Art's Get code has no room choice yet.
When the id does not match
- An id that is not among the key's active rooms, or a room without a surface for the type (a wall for wall art, a floor for rugs), opens the room chooser as if no id were set.
- An empty
roomIddoes nothing. - In React, a new
roomIdwhile the viewer is open moves the shopper to that room. Setting it back to empty leaves them where they are.