D O C U M E N T A T I O N
BigCommerce connector by Candyspace
The connector app allows editors to select products from their BigCommerce account and reference them inside of Contentful entries.
To use the app, you will need:
An account with BigCommerce.
A content type with a field of type Short text
or Short text, list
.
Acquire a BigCommerce store hash and access token to use with the app by following the below steps on the BigCommerce website:
A) Get your Store hash
Log into your BigCommerce Store Control Panel
Go to Advanced Settings > API Accounts
Click create API Account (Create V2/V3 API Token)
The API Path will be displayed as:
https://api.bigcommerce.com/stores/abcde12345/v3/
abcde12345 is the store hash
B) Get your Access token
Log into your BigCommerce Store Control Panel
Go to Advanced Settings > API Accounts
Click create API Account (Create V2/V3 API Token)
Enter a Name for the app/integration corresponding to this account. The name can be a minimum of four characters long.
Under OAuth Scopes, scroll down to Products and select read-only
When you’ve finalised your changes, click Save. A successful save will display the pop-up shown below. It will contain the API credentials required for your app - specifically the Access Token. You will be prompted by your browser to download a .txt file containing the same credentials for safekeeping on your computer.
KEEP A NOTE OF YOUR CREDENTIALS!
There is no way to return to the pop-up after you dismiss it. Make sure you store your credentials – either by copying/pasting the contents of each field out of the pop-up or by keeping the downloaded .txt file. We recommend adding the API Path value from Step 2 to these credentials, as it is used for all API calls using the token.
Please see the Authenticating BigCommerce’s REST APIs guide for more details.
C) Fill in the details
Fill in the BigCommerce store hash and your access token in the BigCommerce app installation screen.
From the list of available fields, select all fields for which you would like to install the BigCommerce app.
Click on Install.
This will modify the fields in the selected content types and change their appearance to use the BigCommerce app.
Further information can be found on BigCommerce's help centre.
To reference BigCommerce products from your Contentful entries:
Navigate to the Content page.
Select or create a new entry of the content type for which you installed the app.
Find the field and click on "Select a product".
Scroll through the available products using the “load more” button or search through them, select the one(s) you want and click save.
Your selection should now appear like this:
How does the BigCommerce connector app work with product variants?
At present the connector app works by selecting the leading product only and therefore does not select and present product variants therefore not making them available for selection.
What is the difference between installing the app for a field of type Short text vs Short text, list?
When the app is installed for fields of type Short text the product picker widget will allow you select a single product. For fields of type Short text, list the widget will allow you to select multiple products.
How can I query the BigCommerce catalog API for product IDs I saved in my Contentful entries?
There are multiple ways to retrieve products but the simplest way is via the BigCommerce catalog API. There are two differences to consider when using the BigCommerce catalog API:
For multiple products send a GET request to the following URL filling in the params in brackets and providing your BigCommerce store Access Token as an X-Auth-Token
header:
https://api.bigcommerce.com/stores/{$$.env.store_hash}/v3/catalog/products?sku:in={$$.product_skus}
Refer here for more details.
For a single product send a GET request to the following URL filling in the params in brackets and providing your BigCommerce store Access Token as an X-Auth-Token
header:
https://api.bigcommerce.com/stores/{$$.env.store_hash}/v3/catalog/products/{product_id}
See here for more details.
For any further help on the apps functionality or features or any implementation help please contact Candyspace at support@candyspace.com.