Matching

Last updated:

How to sort products in your advice based on a given answer

Sometimes you want the user to have the ability to choose what's more important to them. For example, when you want to know if the user prefers quality or price. You can do this by using the "sorting" feature when setting up your matching rules.

1. Go to "Matching" in the left navigation.
2. Go to the "Data matching" tab.
3. Select the question you want to edit on the left.
4. Open the answer you want to apply the sorting for.
5. Click the "add" button and choose "Add sorting".
6. Choose which property you want to sort on and in which direction.

Screenshot 2025-02-18 at 10.05.56

Please note: sorting will be applied after the scoring. This means the sorting will only be applied to products with the same score. To see which scores products have in your advice, please check out the "Match testing" section on the matching documentation page.

Sorting by distance

When you have a property of the "Location" type, you can also sort based on distance.

Example: dealer locator

1. Add a property to your feed and set the type to "Location". This property will need to be in the lat,lng format. For example: 52.377892,4.899730.

Screenshot 2026-03-16 at 13.35.23

2. Create a flow where the user can input it's own location.

Screenshot 2026-03-16 at 14.09.42

3. Make sure you have "Variables" enabled (Settings -> Configure -> Enable variables) and add a variable "location" to the "Text input" step where we'll store the user input.

Screenshot 2026-03-16 at 13.37.56

4. Next, in the operation step, we'll use the "location" variable in a Google Maps API call to get the user location GPS (latitude/longitude) data.

Screenshot 2026-03-16 at 13.38.13

5. In the operation step, go to the variables tab and add a "lat_lng" variable where we store the API result in the correct format (lat,lng).

Screenshot 2026-03-16 at 13.43.50

6. Now that we have the user's lat/lng data, we can go to "Feed -> Matching" and add a "Sort by" rule to the operation answer where we'll sort on distance between the feed location and user's location.

Screenshot 2026-03-16 at 13.39.14

7. [optional] When you have "Calculated properties" enabled (Settings -> Feed -> Enable calculated properties), you can use the "internal.distance" variable to show the distance in the results.

Screenshot 2026-03-16 at 13.39.36

Awesome! You have now created a dealer locator where the user enters a zip code or location on which the results are sorted by distance to the user.

Screenshot 2026-03-16 at 14.04.45

Was this article helpful?

Yes

No

Need help?

Can't find what you're looking for? Our team is happy to help.

Contact support

Live within an hour. No developers needed.

Turn doubts into confident purchases.

4.8 rating · 300+ shops already chose Qonfi
Fox
Not sure where to start?
Book a 20‑minute demo with Fox
Loading available times…