# How to automatically trigger the Select Lenses button when I select a specific variant

## 1. Create 2 product's metafields

Goto Settings > Custom data > Metafield definitions > Products

<figure><img src="/files/clNd3VaaFQinOYcns03b" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/Uh7N8C5fcqjalRs3CRk3" alt=""><figcaption><p>lool.autoTriggerVariantIds</p></figcaption></figure>

<figure><img src="/files/72goOfkyOa85FhYBTIFc" alt=""><figcaption></figcaption></figure>

## 2. Goto the product page and finish the configure

<figure><img src="/files/GWLcwk9DS0T3v1Y7nmmM" alt=""><figcaption></figcaption></figure>

The Wide's variant id is 41743364653233, so the select lenses button will be triggered when you select the Wide variant on product page, If you want to configure multiple variants, just separate the variant IDs with commas

<figure><img src="/files/fet5XqYDq6KkkwUmuxqx" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://pb-apps.gitbook.io/lool/how-to/how-to-automatically-trigger-the-select-lenses-button-when-i-select-a-specific-variant.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
