> ## Documentation Index
> Fetch the complete documentation index at: https://docs.selektable.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How it works

> Understanding the Selektable visualization pipeline

# How it works

Selektable uses AI image generation to create realistic product visualizations. Here's what happens under the hood when a customer uses the widget.

## The flow

**1. Customer opens the widget**

The customer clicks the widget button on your product page. The Selektable embed script opens a full-screen modal with the widget UI.

**2. Customer uploads a photo**

For **Room Visualizer**, they upload a photo of their room. For **Virtual Try-On**, they upload a photo of themselves.

**3. AI generates the visualization**

Selektable sends the customer's photo and your product image to an AI model. The model renders the product realistically into the scene.

**4. Customer sees the result**

The generated image is displayed in the widget. The customer can download it, share it, or add the product to their cart.

## Architecture

The system consists of three parts:

| Component | Description |
| - | - |
| **Dashboard** | Web app where you manage stores, widgets, and view analytics |
| **Embed Script** | JavaScript SDK loaded on your product pages |
| **Widget iframe** | The visualization UI, rendered inside an iframe on your site |

The embed script handles communication between your page and the widget iframe using the `postMessage` API. This means the widget works on any domain without CORS issues.

## Widget types

> [card] Room Visualizer
>
> Best for furniture, home decor, wall art, rugs, and lighting. The customer uploads a room photo and the AI places the product in the scene with realistic perspective and lighting.

> [card] Virtual Try-On
>
> Best for clothing, accessories, and eyewear. The customer uploads a photo of themselves and the AI renders the product on them.

## Conversion tracking

Selektable tracks visualizations and correlates them with purchases:

1. Each customer gets a persistent **visitor ID** stored in the browser
2. When a customer generates a visualization, it's recorded with their visitor ID
3. When an order is placed, the webhook matches the order to any recent visualizations
4. The **attribution window** (default: 7 days) determines how far back to look

This gives you data on how many visualizations convert into actual purchases.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.