Savelists

Introduction

What Are Savelists

Much like Spotify, which gives us the ability to create playlists so that we can sort and organise our songs based on their genre, mood or however we want to. We can name the playlists whatever we want to and add as many songs as we wish to as per our convience; we have the feature to create savelists. We will follow the Spotify Playlist analogy throughtout the documentation of the same to understand things better.

The idea behind savelists is that the user should be able to add n number of products to a certain place where the end user can revist the site and view those products at a later point in time. The user should also be able to remove a product from the savelist if they no longer wish to keep the said product in the savelist.

Let's discuss in details as to what the user should be able to do and what is the scope of savelists.

Scope of Savelists

Let's discuss how much coverage the Savelist feature will have, do a little impact analysis as to how it is crucial and discuss the use cases in detail.

  1. Coverage The Savelist feature is suupposed to cover entirity of the website, i.e. for any product that is being displayed on the website it should be available to be added to a savelist. This implies - that the following should be exposed sitewide:
    • User Savelists
    • Savelist Methods

Speaking of Savelist Methods - we will understand each one of them in depth; but before that we need to understand the core archictecture of Savelists.

On the other hand - User Savelists are the savelists created by the user; we need them to be available site wide so that if the user wishes to add a product to a savelist from anywhere in the site - the savelists aare required for the following reasons: - Render list of User Savelists, so that the user can pick which savelist they wanna add the product to. - To maintain the state of the heart-icon, if the product is already added to the savelist - the icon should turn red - else no filled color. - For any operation, savelist_id is required, hence we need the User Savelists.

Quantity

Here, this section will address two broad use cases of of the term Quantity.

  • First, quantity with respect to how many items can be added to a savelist - and as mentioned earlier; we can add as many items as we can to a certain savelist. There is no theoretical limit on how many products can be added to a savelist.
  • Second, for a product, we have a parameter that we are supposed to parse when making a network request to ECOM API endpoints. This parameter is the quantity parameter; which defines the quantity of items we wanna save for that particular item. Though we don't show this quantity in our UI anywhere; and there isn't any usecase either where we make use of this quantity.

The general idea behind it is that if we move the product to trolley from savelist - the quantity in the trolley should be the the quantity that we added when we added the product to the savelist. But this functionality is unexplored in our product as of 10/12/2024.

Adding Products in Bulk

Contrary to what one might think, or assume; we cannot add products in bulk to a savelist as of 10/12/2024. It's funny; but what's more funny is that we send the product code of the product that is to be added and, the savelist id of the savelist to which we are adding as query parameters and not as part of the body of the post request.

So if you wanna add a lot of products to a savelist, you will have to do it one by one, iterating over a loop of product ids.


Copyright © 2026