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

Quick Start

Installing

In order to install the necessary Chord packages, follow the guide below on how to configure your package manager to access Chord's packages.

npm Access for @chordcommerce Packages

After completing the steps in the guide above, you can install the package and its peer dependencies:

yarn
npm
|

Developing

Your application needs to be wrapped in the <ChordProvider> component. react-autonomy keeps track of your application state and makes it available to components. For example, what is currently in a user's cart is automatically persisted. <ChordProvider> makes the state available throughout your application.

<ChordProvider> requires a configuration object with information about your storefront. Here's an example:

<ChordProvider>

The config object requires these keys:

Name

Type

Description

brandName

String

The store's name.

currency

String

The store's currency. For example, USD.

domain

String

The base URL of the OMS API to use for requests. For example, https://my-store.assembly-api.com.

locale

String

The store's locale. For example, en-US.

omsId

String

A unique identifier generated by Chord during provisioning.

storeId

String

A unique identifier generated by Chord during provisioning.

tenantId

String

A unique identifier generated by Chord during provisioning.

Once your application is wrapped in the <ChordProvider> component, you can use SDK methods throughout your code. For example, here's a React component for adding an item to the cart:

<AddToCartButton>
Updated 28 Nov 2022
Did this page help you?
Yes
No
UP NEXT
Release Notes
Docs powered by archbee 
<ChordProvider>