User-specific data

we have a product search react app implemented with Algolia react-instantsearch. For each product we display a title, image, category and price. We would like to implement pricing personalisation, ie. for some of our logged in users we want to get a different/personalised price from Algolia. The personalised price can’t be calculated on the fly (like eq. -10%), it will be a custom price entered by our admin. Is there a way to push this data to Algolia and tie it to a product/user pair somehow?


There is multiple ways to do that:

  • The easiest: Store N price in your record and choose what to use and display at query time
    title: “Shoes”
    currency: “$”,
    price_std: 10,
    price_premium: 5,
    price_pro: 7

  • Duplicate records and/or index and use the correct one depending on the personas
    Usually harder to implement but at least do not leak price differences.

If the price change for all users, then Algolia might not be able to handle that for you.
That means using Algolia for search and then on frontend apply the different price that you fetched on your side.

I’m pretty sure “1 Price Per User” is hardly a good idea and won’t be maintainable manually by an admin in the long term, so the first solution might probably be the best for you.

Hope this helps

1 Like