BigCommerce
This integration allows content editors to select BigCommerce products in Prepr content items.
Introduction
You can connect Prepr to BigCommerce , a platform including online store creation, search engine optimization, hosting, and marketing and security from small to Enterprise sized businesses. This integration allows you to view and search the BigCommerce catalog directly in Prepr and include products in your web app content.
Activating BigCommerce integration
Set up an API Client in BigCommerce
Before Prepr can interact with your BigCommerce project, you must get your BigCommerce API Client credentials first.
Log in to your BigCommerce store’s admin panel and create a new API account according to the steps in the BigCommerce guide .
For the OAuth Scopes, click the read-only
option for the Products scope.
Once the account is saved, make sure to save the API credentials securely.
Connect Prepr to BigCommerce
Now that you’ve set up your BigCommerce API Client, you can add BigCommerce as a remote source in Prepr by following the steps below:
-
Go to Settings → Integrations and choose BigCommerce. Click the Activate button.
If you do not have access to the BigCommerce integration yet, click Request activation to contact our Sales team.
-
In the Connect to BigCommerce modal, enter your BigCommerce store domain URL, such as
store-yourstorehash.mybigcommerce.com
, paste the BigCommerce API access token you saved in the previous step and click the Save button.
Once the integration is activated, you can see the BigCommerce remote source in the Schema page.
Allow editors to add BigCommerce catalog data to content items
Once you’ve connected to BigCommerce, follow the steps below to allow editors to add BigCommerce products to content items.
-
First, go to the model or component where editors can add BigCommerce catalog data and add a Remote content field, or enable the BigCommerce remote source in a dynamic content field in the model or component.
Once done, editors can add the BigCommerce data they need to a specific content item.
Retrieve BigCommerce content using the API
Once you have content items with BigCommerce products you can retrieve the corresponding data using the Prepr GraphQL API.
QUERY
query query Items {
Posts {
items {
_id
title
_slug
# remote content field
bigcommerce {
_id
_json
description
sku
title
}
}
}
}
That’s it. Now your web page includes catalog data from BigCommerce. Prepr will synchronize your remote content automatically to keep it up to date.