Appearance
Sorting a product collection
Looking for setup prerequisites, authentication details, and package references? Start with the .NET SDK landing page.
When using your own search engine and you want to get a personalized sorting of a collection of Products, you can use SortProducts.
Before going any further, read about handling different types of users here.
csharp
IRecommender recommender = new Recommender(
new Guid("00000000-0000-0000-0000-000000000001"),
"your API Key",
"server-url");
string[] productIds = new[] { "p-1", "p-2", "p-3" };
SortProductsRequest request = new SortProductsRequest(
new Language("da"),
new Currency("DKK"),
"Product Listing Page",
GetUser(),
productIds);
ProductRecommendationResponse response = await recommender.RecommendAsync(request, cancellationToken);The recommended way of using Relewise for category pages is using our search features. Read about how to use our Search API for category pages here.