Download skillThe skill is a reference md and part of wix-manage skill. You can use the following command to add the full wix-manage skill to your project:
This recipe outlines the steps to manage pre-orders for product variants, including enabling/disabling pre-orders, setting messages, and configuring limits.
- Wix Stores app installed
- Product with variants already created
- API access with stores permissions
- Products Search API: REST
- Query Inventory Items API: REST
- Bulk Update Inventory Items API: REST
- Update Inventory Item API: REST
Endpoint: POST https://www.wixapis.com/stores/v3/products/search
Use the productId from the search to get variant information:
Endpoint: POST https://www.wixapis.com/stores/v3/inventory-items/query
The response includes:
product.variantName - identifies each variant
inventoryItemId - needed for updates
revision - required for update operations
locationId - inventory location
- Current
preorderInfo settings
- I MUST get user input on which specific variant(s) to update
- I MUST NEVER update all variants without explicit user selection
- I MUST ask the user whether to enable or disable pre-orders for each variant
- If enabling, I MUST get the pre-order message from the user
- If setting a pre-order limit, I MUST ensure
trackQuantity: true is set
Use when applying the same pre-order settings to multiple variants:
Endpoint: POST https://www.wixapis.com/stores/v3/bulk/inventory-items/update
Request Body (Enable Pre-Order):
Request Body (With Pre-Order Limit):
- Pre-order limits ONLY work when
trackQuantity: true
- If variant wasn't tracking quantity, I MUST ask user for initial quantity
- The
revision field is required and must be an integer
Endpoint: PATCH https://www.wixapis.com/stores/v3/inventory-items/{inventoryItemId}
Request Body (Enable Pre-Order):
Request Body (Disable Pre-Order):
When you set a preorderInfo.limit:
- It specifies how many units can be pre-ordered after stock reaches zero
- Example: 10 in stock + limit of 50 = customers can order up to 60 total (10 regular + 50 pre-order)
If setting a limit on a variant that wasn't tracking quantity:
- Inform the user: "
trackQuantity will be enabled for this variant"
- Ask for initial quantity: "What initial stock quantity should I set?"
- Include both in update:
After updating pre-order settings:
- Confirm the changes with the user
- Offer to update other products or variants
- Consider updating product descriptions to mention pre-order availability