Skip to main content
RichRelevance

Recommend: Sorting Product Recommendations by User Location

Overview  

Algonomy consultants can configure product recommendations sorting by proximity (distance) to the user, when the latitude and longitude of both the products and the user are given.

Audience

This information is intended for Algonomy consultants as they work with their clients.

Benefits  

This feature helps you sort product recommendations by proximity (distance) to the user, when the latitude and longitude of both the products and the user are available.

Proximity Sort Configurations

Algonomy consultants can configure product recommendations sorting by proximity (distance) to the user, when the latitude and longitude of both the products and the user are given.

To configure product recommendations sorting by proximity to the user: 

  1. On the RR Portal landing page in the left pane, click Admin and then click Site Configuration RR.
  2. Go to Proximity Sort Configurations.
    1. Select Enable Proximity Sorting.
    2. Provide Latitude Longitude Attribute Name of the products along with the product feed. 
      The attribute name must contain the list of latitude and longitude values for products, based on which the product is identified.
    3. Type  ";" (Semicolon) for Latitude Longitude Separator

      IMPORTANT: The latitude and longitude values within the attribute should be delimited by a ";" for example:
      37.7856799;-122.3980373,47.6140283;-122.3371095

      The first value in the delimited string is the latitude and the second the longitude. The example shows two coordinate pairs delimited by a comma as they would be passed in a product attribute feed as having multiple attribute values specified in the column-based format.  

      sorting_by_geo_location.png
      Notes:
    • The request to runtime must contain latitude and longitude as decimal values, for example, lat=37.37&long=-122.39.
    • If a product is associated with multiple latitudes and longitudes, the latitude and longitude closest to the user is used as the distance to sort the products.
  3. (Optional) To narrow down the results, use region before sorting.
    This helps to sort the products that are available to the user for the given region. Products can also be regionalized and values such as in-stock can be provided with a region. You can then sort the results further within a region.