# Sort by best selling

By default, our app will calculate the best selling rank by our own app's algorithm based on the orders. But if you want to sort by best-selling based on Shopify, we have to do the steps below manually:

{% hint style="info" %}
Because Shopify doesn't provide a way for our app to get best-selling data, we have to create a collection sorted by best-selling. In this way, our app can get best-selling data from Shopify.
{% endhint %}

1\. Go to **your store admin -> Products -> Collections -> Create collection**

![](/files/3BtT3KkV5yE8dN29VBxw)

2\. In the create new collection page, enter the following information below:

![](/files/aduHbhevmxelOO17OuVt)

**Title**: Enter exactly the name **FLASHSEARCH\_SMART\_COLLECTON\_BEST\_SELLING**

**Collection availability:** Unselect all channels to not allow this collection visible on your store.

**Conditions**:&#x20;

* Product must match: **all conditions**
* The rule like thi&#x73;**: Price -> is greater than ->** -999999999

**Products**: Choose sort by **Best selling**

3\. After fill all the information below, click the "Save" button.

4\. Go to **Flash Search app admin -> Home ->** Click **"Sync your store"** button

![](/files/OoRmXn4iXctaIhN6AFxP)

**5.** Wait until the sync progress is done. After finished, you can go to your store and check the result by selecting **Best selling** in the dropdow&#x6E;**:**

![](/files/lGjoQdusKV0vjTp7Djcr)


---

# 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.flashsearch.io/sort/sort-by-best-selling.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.
