# Klaviyo

Send try-on leads from the TryOnCloud Shopify app to Klaviyo, then build flows and segments on them.

> **Note:** This is a feature of the Shopify app. It is not part of the Developer API.

## Connect

1. Open the TryOnCloud app in your Shopify admin.
2. Go to **Leads > Integrations** and click **Connect** on the Klaviyo row.
3. Approve access in Klaviyo. That is it: no API keys to copy.

The connection uses OAuth with PKCE and minimal permissions. Tokens are encrypted, and delivery retries automatically if Klaviyo is briefly unavailable.

## What is sent

When a shopper leaves their email after a try-on, TryOnCloud records a **Try-On Lead** event on that shopper's Klaviyo profile:

| Property | Example |
|---|---|
| `Source` | `TryOnCloud Virtual Try-On` |
| `ProductNames` | `["Floral Wrap Dress"]` |
| `ProductURLs` | Product page URL |
| `ProductImages` | Product image URL |
| `Items` | Name, product ID, URL, image and price |
| `ConsentedAt` | When the shopper gave their email |

The event is consent-safe: TryOnCloud does not subscribe shoppers to any list. Your own Klaviyo consent settings decide who receives marketing.

## Flow ideas

- **Abandoned try-on:** 24 hours after a Try-On Lead with no order, send the product they tried.
- **Segment:** everyone who tried a product in a collection, for a launch email.
