---
title: useProduct
slug: oms/useproduct
docTags: 
createdAt: 2022-11-07T21:27:00.000Z
---

:::hint{type="info"}
**This page's documentation only applies to Chord's** [Next.js starter](https://github.com/chordcommerce/nextjs-starter-autonomy) **prior to the release of the&#x20;**[React](docId\:EwXkRz0JhH0zPphIkkcrI)**. 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](https://docs-beta.chord.co/chord-ui/module-react-autonomy) **for complete documentation, and the&#x20;**[React SDK Migration Guide](docId\:qMilHJFPz9WbJYZbe50Ku)**for details on how to upgrade.**
:::

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

## Example

```javascript
import { useProduct } from '~/hooks/actions'

// inside a function component
const { createStockRequest } = useProduct()
```

## Returns

The `useProduct` hook returns an object with these properties:

| Property             | Description |
| -------------------- | ----------- |
| `createStockRequest` |             |

## Functions

### createStockRequest&#x20;

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.&#x20;

**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:**

```javascript
import { useProduct } from '~/hooks/actions'

export default () => {  
  const { createStockRequest } = useProduct()
  await createStockRequest({ email, sku })
} 
```
