Actions overview
| Action | Description |
|---|---|
WatchListItemAdd | Adds one or more products to the watchlist. |
WatchListItemDelete | Removes a product from the watchlist. |
AddWatchList | Creates a new watchlist. |
DeleteWatchList | Deletes an existing watchlist. |
RenameWatchList | Renames an existing watchlist. |
Actions
WatchListItemAdd
This action adds a product to the user’s watchlist. Both individual products and multiple products can be passed simultaneously. Usage exampleCan be used on product or category pages where customers can add items to their watchlist to find or buy them later. Parameters
| Name | Description |
|---|---|
productId | The ID of the product to be added to the watchlist. |
freeFields.<identifier> | Optional free fields that can be assigned to the watchlist entry. |
multiProducts.<productId>.<quantity> | Allows multiple products to be added simultaneously with their respective quantities. |
| Error code | Description |
|---|---|
missingProductId | Parameter productId is missing or empty. |
invalidProductId | The product with the specified productId does not exist. |
invalidVariantId | The specified variant of the product is invalid or does not exist. |
- $wsWatchList
- $wsWatchList.watchLists
- $wsWatchList.loadWatchList()
- $wsWatchList.isProductOnWatchList()
- $wsWatchList.countWatchListsWithProduct()
WatchListItemDelete
This action removes an entry from the user’s watchlist. Usage exampleCan be used on the watchlist page where customers can delete individual products from their watchlist. Parameters
| Name | Description |
|---|---|
watchListItemId | The ID of the watchlist entry to be deleted. |
| Error code | Description |
|---|---|
missingWatchListItemId | Parameter watchListItemId is missing or empty. |
- $wsWatchList
- $wsWatchList.watchLists
- $wsWatchList.loadWatchList()
- $wsWatchList.loadWatchListItemId()
AddWatchList
This action creates a new watchlist for the logged-in user. Usage exampleCan be used on the watchlist management page where customers can create additional watchlists, e.g., for various occasions or categories. Parameters
| Name | Description |
|---|---|
watchListName | The name of the new watchlist. |
| Error code | Description |
|---|---|
notLoggedIn | The user is not logged in. |
missingWatchListName | Parameter watchListName is missing. |
DeleteWatchList
This action deletes an existing watchlist of the logged-in user. Usage exampleCan be used on the watchlist management page where customers can remove watchlists they no longer need. Parameters
| Name | Description |
|---|---|
watchListId | The ID of the watchlist to be deleted. |
| Error code | Description |
|---|---|
notLoggedIn | The user is not logged in. |
missingWatchListId | Parameter watchListId is missing. |
invalidWatchListId | The specified watchlist does not exist or does not belong to this user account. |
RenameWatchList
This action renames an existing watchlist of the logged-in user. Usage exampleCan be used on the watchlist management page where customers can adjust the name of an existing watchlist. Parameters
| Name | Description |
|---|---|
watchListId | The ID of the watchlist to be renamed. |
watchListName | The new name of the watchlist. |
| Error code | Description |
|---|---|
notLoggedIn | The user is not logged in. |
missingWatchListId | Parameter watchListId is missing. |
missingWatchListName | Parameter watchListName is missing. |
invalidWatchListId | The specified watchlist does not exist or does not belong to this user account. |
