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

# Shopify Flow

> Trigger Shopify Flow automations when shoppers try on your products. No setup, no connection.

Genlook adds two triggers to [Shopify Flow](https://apps.shopify.com/flow), Shopify's free automation app. Any workflow can react to try-ons: tag customers, notify your team, or hand the event to the many email, SMS, and loyalty apps that plug into Flow as actions.

There is nothing to connect or enable. If Genlook is installed on your Shopify store, both triggers are already available in the Flow editor.

<Note>
  Shopify Flow is free and made by Shopify. If you don't have it yet, install it from the App Store. This integration is Shopify-only; on other platforms, use [Klaviyo](/docs/virtual-tryon/integrations/klaviyo) or [webhooks](/docs/virtual-tryon/integrations/webhooks).
</Note>

## The two triggers

|          | **Virtual try-on completed**           | **Virtual try-on session completed**                        |
| -------- | -------------------------------------- | ----------------------------------------------------------- |
| Fires    | Once per try-on, within seconds        | Once per browsing session, 30 minutes after the last try-on |
| Contains | The customer and the product tried on  | The customer, session totals, and the most tried-on product |
| Best for | "Tag customers who tried on product X" | "Follow up after a fitting session of 3+ items"             |

Both are sent side by side. A workflow subscribes to one trigger; use two workflows if you want to react to both.

## Before you build

Triggers fire for identified shoppers: they are logged in, or they shared their email through the widget (enable **Email Collection** in Genlook **Settings**).

* **Logged-in shoppers** fire with their full Shopify customer attached, so every customer condition and action works.
* **Email-only shoppers** fire without a customer. Product fields still work, but steps that need a customer won't run.
* **Anonymous shoppers** don't fire triggers. When they later identify, their earlier try-ons from that device are replayed into Flow at that moment, so a workflow can receive a short burst of events whose try-ons happened earlier.

## Build a workflow

<Steps>
  <Step title="Open Shopify Flow">
    In your Shopify admin, open the **Flow** app and click **Create workflow**.
  </Step>

  <Step title="Pick a Genlook trigger">
    Click **Select trigger** and search for "try-on". **Virtual try-on completed** and **Virtual try-on session completed** appear under Genlook.
  </Step>

  <Step title="Add conditions and actions">
    Build on the trigger's data: check which product was tried on, add count conditions on the session trigger, then add actions such as **Add customer tags** or **Send internal email**.
  </Step>

  <Step title="Turn it on">
    Activate the workflow. It runs for every matching try-on from then on; each run shows up in the workflow's run history.
  </Step>
</Steps>

## Trigger data

### Virtual try-on completed

| Field         | Notes                                                      |
| ------------- | ---------------------------------------------------------- |
| Customer      | The full Shopify customer, when the shopper is logged in   |
| Product       | The full Shopify product that was tried on                 |
| Product title | The title as plain text, for quick conditions and messages |

### Virtual try-on session completed

| Field          | Notes                                                                                                                                         |
| -------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| Customer       | The full Shopify customer, when the shopper is logged in                                                                                      |
| Product        | The product tried on most during the session                                                                                                  |
| Try on count   | Total try-ons in the session, repeats included                                                                                                |
| Product count  | Distinct products tried on                                                                                                                    |
| Product titles | The products tried on, as a comma-separated list                                                                                              |
| Products       | The full session lineup, most tried-on first (up to 25). Each entry carries `productId` (numeric id), `title`, `productUrl`, and `tryOnCount` |

Customer and Product are real Shopify references, not snapshots: a workflow can use any of their fields (tags, order history, product type, vendor, and so on) in conditions and actions, not just the ones listed here. The entries of the **Products** list are plain data instead of references; loop over them in message templates to recap the whole fitting room, and use **Product** when you need a full resource.

## Ideas

* Tag customers with the product they tried on and build segments or ad audiences from the tag.
* Notify your team when a customer with the `VIP` tag completes a try-on session.
* Use a Flow **wait** step: one day after **Virtual try-on session completed**, check whether the customer placed an order, and follow up through a connected email or SMS app if not.
* Condition on **Try on count** of at least 3 to catch shoppers deep in a fitting session.

## Verify it's working

1. Create a workflow triggered by **Virtual try-on completed** with an observable action, like adding a customer tag.
2. Log in to your storefront as a test customer and complete a try-on.
3. Open the workflow in Flow and check its run history.
