website logo
Navigate through spaces
Chord Commerce
⌘K
Getting Started
CMS
Data
OMS
Integrations
👩‍💻Developer Tools
Shopify
Docs powered by archbee 

useProduct

This page's documentation only applies to Chord's Next.js starter prior to the release of the React SDK. The Next.js starter now uses the React SDK and does not use the methods documented on this page. Check out the React SDK Reference for complete documentation, and the React SDK Migration Guide for details on how to upgrade.

The useProduct hook returns a set of functions for product-related operations.

Example

JS
|

Returns

The useProduct hook returns an object with these properties:

Property

Description

createStockRequest



Functions

createStockRequest

The createStockRequest adds the customer to a product variant wait list in the OMS. When the variant is marked back in stock, customers on the wait list will automatically receive an email notification.

Arguments:

createStockRequest(options)

Argument

Type

Description

options.email

String

The email address to sent an email to when the variant is back in stock.

options.sku

String

The variant SKU.

options.slug

String

For kits only, the slug of the kit.

Returns:

Promise<void>: A Promise that resolves when the stock request has been created.

Example:

JS
|
Updated 14 Nov 2022
Did this page help you?
Yes
No
UP NEXT
useSubscription
Docs powered by archbee 
TABLE OF CONTENTS
Example
Returns
Functions
createStockRequest