Search.../

bulkAdjustProductProperty( )

Developer Preview

Adjusts a specified numerical property for up to 100 products at a time. The property can be increased or decreased either by percentage or amount.

Admin Method

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

Syntax

function bulkAdjustProductProperty(adjust: AdjustValue, ids: Array<string>): Promise<BulkAdjustProductPropertiesResponse>

bulkAdjustProductProperty Parameters

NAME
TYPE
DESCRIPTION
adjust
AdjustValue

Numerical property to adjust.

ids
Array<
string
>

Product IDs.

Returns

Return Type:

Promise<
BulkAdjustProductPropertiesResponse
>
NAME
TYPE
DESCRIPTION
bulkActionMetadata
BulkActionMetadata

Bulk action metadata.

results
Array<
BulkProductResult
>

Bulk action results.

Was this helpful?

bulkAdjustProductProperty example

Copy Code
1import { products } from 'wix-stores.v2';
2
3 async function bulkAdjustProductProperty(adjust, ids) {
4 try {
5 const result = await products.bulkAdjustProductProperty(adjust, ids);
6
7 return result;
8 } catch (error) {
9 console.error(error);
10 // Handle the error
11 }
12 }
13