Suggest items more expensive than customer's average purchase
AI search is a type of search engine that uses artificial intelligence to understand the userโs intent and provide the most relevant results. Synerise AI search, lets you manage the behavior of the search engine for example by promoting specific products or adding specific circumstances, and also try out various configurations of the search engine by A/B tests.
AI Search not only can search relevant products in the feed based on custom rules but also provides the possibility of applying personalization and filters which can contain dynamic customer attributes such as aggregates and expressions.
This use case describes the process of calculating the average value of purchased items for a specific customer. Knowing this value, you will proceed to create a rule to present in the search results only those items whose price is above the average value a customers spent in the lat 30 days.
Prerequisites
- Enable the AI Search Engine for your workspace.
- Create and configure search index and in the filterable attributes add
Price.Value
as a range attribute. - Implement transaction events using SDK or API.
- Implement AI search in any of your channels (mobile app, website, and so on).
Process
In this use case, you will go through the following steps:
- Create an aggregate to calculate the average value a customer spent in the last 30 days.
- Create a query rule (based on the aggregate created in the first step) that enforces showing in the search results only more expensive products than customer’s average purchase in the last 30 days.
Create an aggregate
In this part of the process, create an aggregate that returns the average value of products bought by an individual customer.
- Go to Analytics > Aggregates > Create aggregate.
- As the aggregate type, select Profile.
- Enter the name of the aggregate.
- Click Analyze profiles by and select Average.
- From the Choose event dropdown list, select the
product.buy
event. - As the event parameter, select $finalUnitPrice.
- Define the period from which data will be analyzed. In our case it will be last 30 days.
- Save the aggregate.
Create a query rule
In this part of the process, create a query rule based on the aggregate created in the previous step. The rule will enforce showing in search results only the products which are more expensive than the average purchase of a customer.
- Go to AI Search > Indexes.
- Select an index from the list.
- Go to the Rules section.
- On the right side of the screen, click Add rule.
- Name the rule.
- To adjust the query conditions, in the Conditions section, click Define.
- Choose the All queries tab.
- Click Apply.
- To define how the search engine reacts to the defined conditions, in the Consequences section, click Define.
- Click Add consequence and choose Filter query results from the dropdown list.
- From the Attribute dropdown list, choose
Price.Value
. - Choose the More than operator.
- In the left field, click the T icon and from the dropdown list, select Aggregate.
- From the list, choose aggregate created in the previous step.
- Enable the Mark as elastic option to make sure that the products more expensive than average value of products bought by a specific customer appear at the top of the search results. If you do not activate this option, search results will show only those products.
- Click Apply.
- In the Schedule section, you can define when the query rule applies.
- Click Save & Publish.
Check the use case set up on the Synerise Demo workspace
You can check the aggregate and query rule settings directly in Synerise Demo workspace.
If you don’t have access to the Synerise Demo workspace, please leave your contact details in this form, and our representative will contact you shortly.