# Implementing Winning Tests

{% hint style="info" %}
Applying your variant is available for theme and template tests only.
{% endhint %}

## Implementing a winning test template

Once a test is ended, you will have the choice to apply your test variant as your new default experience for your homepage or for the assigned collections, products, or pages. To do this, click **Apply variant** in the top right corner of your test. Your store will now use your variant template as the default experience for all products, collections, or pages originally assigned to your control.&#x20;

<figure><img src="https://314821113-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDg2m2UmvTCMjmBjnzBKA%2Fuploads%2FOHms7KFKBo9O0QEt346Y%2FScreen%20Recording%202024-06-12%20at%206.15.25%20PM.gif?alt=media&#x26;token=cd817f7f-e8be-493e-b27d-44958cca6052" alt=""><figcaption><p>Apply Variant</p></figcaption></figure>

{% hint style="success" %}
**FAQ: Can I apply variants for inconclusive tests?**

You can still choose to implement the test variant of an inconclusive test as the new default experience. Open the test menu in the top right corner (the ⁝ button), and you should see an option to apply the variant.
{% endhint %}

## How winning test templates are implemented

Depending on the type of template you've tested, the implementation method may vary. Most template tests can be automatically implemented with the **Apply variant** button.

#### **Homepage (Index) templates**

<mark style="background-color:green;">✓ Shoplift can automatically implement</mark>

Unlike other template types on your store, homepage templates are not "assigned" - your store will always use a suffix-less index template (i.e. index.liquid or index.json) as your default homepage template.

This means that in order to implement a suffixed homepage template as your new default experience, Shoplift must replace the JSON or liquid code from your original, suffix-less template (`index.json`) with the JSON or liquid code from your tested, suffixed template (i.e. `index.sl-AE2FB8F1.json`).&#x20;

However, we don't delete the original code found in your older, suffix-less index template. Instead, we migrate it to a new template that contains the date of implementation as the suffix (i.e. `index.05-04-2024.json`).

If you would like to revert to your original homepage template at any time, simply replace the code in your `index.json` template with the code from your previous template, now named with the date of implementation as the suffix.

**Collection, product, and page templates**

<mark style="background-color:green;">✓ Shoplift can automatically implement</mark>

When a tested collection, product, or page template is implemented via a winning test, Shoplift simply reassigns whichever collections, products, or pages are currently assigned to your original (control) template to your variant (tested) template. Your original template is unchanged, and can be reassigned at any time.

**Variant templates of a different template type**

<mark style="background-color:red;">✕ Requires manual implementation</mark>

When you test templates of different types (i.e. a homepage template vs. a page builder template), Shoplift cannot automatically apply the variant template as the new default experience. To apply the variant template manually, you can either create a new template (i.e. create a new homepage template and apply the changes there) or assign the template to site pages through your page builder tool.

## Implementing a winning test theme

Once a test is ended, you will have the choice to apply your test variant as your new theme. To do this, click **Apply variant** in the top right corner of your test. Your store will now use your variant theme as the default experience for your entire site.


---

# 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://docs.shoplift.ai/test/implementing-winning-tests.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.
