Search.../

startCollectingRequests( )

Developer Preview

Sets settings.collectionStates.collectingRequests to true for given appId.

Description

When the collection state is set to true, collecting requests is enabled and customers may request notifications for out of stock products. While collecting is enabled, customers see a "Notify When Available" button on out-of-stock items. Customers can click the button to enter their email address, which creates the notification request.

Admin Method

This function requires elevated permissions to run. This function is not universal and runs only on the backend.

Authorization

Request

This endpoint does not take any parameters

Response Object

NAME
TYPE
DESCRIPTION
settings
BackInStockSettings

Back in stock settings info.

Status/Error Codes

Was this helpful?

startCollectingRequests example

Copy Code
1import { backInStockSettings } from 'wix-ecom-backend';
2
3 async function startCollectingRequests(appId) {
4 try {
5 const result = await backInStockSettings.startCollectingRequests(appId);
6
7 return result;
8 } catch (error) {
9 console.error(error);
10 // Handle the error
11 }
12 }
13