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:
- On the RR Portal landing page in the left pane, click Admin and then click Site Configuration RR.
- Go to Proximity Sort Configurations.
- Select Enable Proximity Sorting.
- 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. - 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.
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.
- (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.