Skip to content

DEVDOCS-6212:[Update]B2B Refresh - Non-Catalyst Channel Setup #861

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 1, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions docs/b2b-edition/headless.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
# Creating Channels
# Channel Setup for Non-Catalyst Frameworks

B2B Edition's Buyer Portal can be used with headless storefronts created using a third-party solution, such as WordPress or Next.js. This allows you to extend B2B Edition's front-end buyer tools to multiple headless storefronts, while managing your back-end processes from the BigCommerce control panel.

Follow the instructions in this article to set up a headless storefront channel that uses the default, hosted version of the Buyer Portal. If you want to deploy a locally-developed custom Buyer Portal to your headless channel, see the [Headless Guide](https://github.com/bigcommerce/b2b-buyer-portal/blob/main/docs/headless.md) in the `b2b-buyer-portal` repository.

<Callout type="info">
These instructions are for enabling B2B Edition on non-Catalyst headless frameworks. See [B2B Edition](https://www.catalyst.dev/docs/b2b) for Catalyst-specific considerations.
</Callout>

<Steps>

### Prepare

You will need to create two API tokens for your BigCommerce store. They have different permissions required, so please pay attention to which one is used for the step you are working on. Refer to this [support article](https://support.bigcommerce.com/s/article/Store-API-Accounts?language=en_US#:~:text=Level%20API%20Accounts-,1.,to%20use%20the%20API%20account) for more information on how to create API Accounts.
You will need to create two API tokens for your BigCommerce store. They have different permissions required, so please pay attention to which one is used for the step you are working on. Refer to this [support article](https://support.bigcommerce.com/s/article/Store-API-Accounts) for more information on how to create API Accounts.

* Create a token (TOKEN_A) with modify permissions for the following resources:
- Channel listings
Expand Down Expand Up @@ -42,10 +50,6 @@ X-Auth-Token: {{TOKEN_A}}
}
```

<Callout type="info">
Currently we’re working with [Vercel template, and that uses NextJS](https://github.com/B3BC/b2b-headless-example).
</Callout>

### Generate an impersonation token

[Generate an impersonation token](/docs/storefront-auth/tokens/customer-impersonation-token) by using the next cURL as base and using TOKEN_B.
Expand All @@ -64,7 +68,7 @@ X-Auth-Token: {{TOKEN_B}}

### Create a site for the channel

[Create the site for the channel](/docs/rest-management/sites#create-a-site), you should use TOKEN_A.
[Create the site for the channel](/docs/rest-management/sites#create-a-site), using TOKEN_A.

```http filename="Example request: Create an impersonation token" showLineNumbers copy
POST https://api.bigcommerce.com/stores/{store_hash}/v3/sites
Expand Down Expand Up @@ -92,7 +96,9 @@ Add the following script tag on your application.
```
### Enable headless channel on the B2B dashboard

In the B2B dashboard, go to **Storefronts** > **Headless Storefronts** and select **Activate B2B** for the storefront channel.
In the B2B Edition control panel, go to **Storefronts** > **Headless Storefronts** and select **Activate B2B** for the storefront channel.

![Activating B2B on a headless storefront](https://storage.googleapis.com/bigcommerce-production-dev-center/images/B2B%20Edition/Channel-Setup-for-non-Catalyst-Frameworks/enable-b2b-headless.png)

### Make products available on your new channel

Expand Down