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.
Syntax
function startCollectingRequests(appId: string): Promise<StartCollectingRequestsResponse>
startCollectingRequests Parameters
NAME
TYPE
DESCRIPTION
appId
string
ID of the app to start accepting notification requests for.
Returns
Return Type:
Promise<
StartCollectingRequestsResponse
>NAME
TYPE
DESCRIPTION
settings
BackInStockSettings
Back in stock settings info.
Was this helpful?
startCollectingRequests example
Copy Code
1import { backInStockSettings } from 'wix-ecom-backend';23 async function startCollectingRequests(appId) {4 try {5 const result = await backInStockSettings.startCollectingRequests(appId);67 return result;8 } catch (error) {9 console.error(error);10 // Handle the error11 }12 }13