Sep 20, 2024
Define the personalization strategy
Creates a new personalization strategy.
Usage
Required ACL:
recommendation
Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
using Algolia.Search.Clients;
using Algolia.Search.Models.Personalization;
var client = new PersonalizationClient(
new PersonalizationConfig(
"ALGOLIA_APPLICATION_ID",
"ALGOLIA_API_KEY",
"ALGOLIA_APPLICATION_REGION"
)
);
var response = await client.SetPersonalizationStrategyAsync(
new PersonalizationStrategyParams
{
EventScoring = new List<EventScoring>
{
new EventScoring
{
Score = 42,
EventName = "Algolia",
EventType = Enum.Parse<EventType>("Click"),
},
},
FacetScoring = new List<FacetScoring>
{
new FacetScoring { Score = 42, FacetName = "Event" },
},
PersonalizationImpact = 42,
}
);
Did you find this page helpful?