# Verify BigCommerce customers and checkout emails

Source: https://docs.rocketverifier.com/integrations/bigcommerce

> Paste the RocketShield snippet into Storefront, Script Manager to check checkout, account and contact forms as shoppers type. Connect a store API account from Dashboard, Integrations, BigCommerce to verify every customer, write the result into customer attributes and verify new customers as they are created.

RocketVerifier for BigCommerce has two parts: a **RocketShield** snippet that checks forms on the storefront, and a **customer sync** that verifies every customer record.

## Add RocketShield with Script Manager

**Step 1. Create a shield**

Open [RocketShield](https://app.rocketverifier.com/dashboard/rocketshield) and create a shield. Add the store's domains to **Allowed domains**: the custom domain, `store-xxxx.mybigcommerce.com`, and the checkout domain if it is different. Choose the blocking rules and message, then copy the `rs_` key.

**Step 2. Create the script**

In BigCommerce open **Storefront, Script Manager, Create a Script** and set:

| Field | Value |
| --- | --- |
| Name | `RocketShield` |
| Placement | Footer |
| Location | All pages (the snippet narrows this down itself, and this includes the checkout) |
| Script category | Essential |
| Script type | Script |

**Step 3. Paste the snippet**

Paste this into **Script contents** and replace the key:

Script Manager:

```html
<script>
(function () {
  var SHIELD_KEY = 'rs_REPLACE_WITH_YOUR_SHIELD_KEY';
  // 'forms': checkout, account creation/login and contact pages only.
  // 'all':   every page (also protects footer newsletter forms).
  var PAGES = 'forms';
  var WIDGET_URL = 'https://app.rocketverifier.com/widget/v2.js';

  if (!/^rs_[A-Za-z0-9_-]+$/.test(SHIELD_KEY) || SHIELD_KEY.indexOf('REPLACE') !== -1) return;
  if (window.__rocketShieldLoaded) return;

  var path = (window.location.pathname || '/').toLowerCase();
  var isCheckout = /^\/(embedded-)?checkout(\/|$|\.php)/.test(path) || path === '/finishorder.php';
  var isAccount = path === '/login.php' || path === '/account.php';
  var isContact = /^\/contact(-us)?(\/|$)/.test(path);
  if (PAGES !== 'all' && !(isCheckout || isAccount || isContact)) return;

  window.__rocketShieldLoaded = true;
  var existing = window.rocketShieldConfig || {};
  var config = {};
  for (var k in existing) {
    if (Object.prototype.hasOwnProperty.call(existing, k)) config[k] = existing[k];
  }
  config.apikey = SHIELD_KEY;
  config.platform = 'bigcommerce';
  window.rocketShieldConfig = config;

  var s = document.createElement('script');
  s.src = WIDGET_URL;
  s.async = true;
  (document.head || document.body).appendChild(s);
})();
</script>
```

**Step 4. Test it**

Save, then type `disposable@sandbox.rocketverifier.com` into the account creation form on the storefront.

### Choose which pages are protected

Set `PAGES` at the top of the snippet:

- `'forms'` (default): `/checkout`, `/embedded-checkout`, `/finishorder.php`, `/login.php` (login and account creation), `/account.php` and `/contact-us`.
- `'all'`: every page, which also covers footer newsletter forms.

Until the placeholder key is replaced, the snippet does nothing.

### Checkout

Script Manager scripts run on the checkout with Optimized One-Page Checkout. The checkout is a React app, and RocketShield picks up its email field as soon as it appears, with live feedback under the field. Every customer created at checkout is also verified by the customer sync below. The [RocketShield guide](https://docs.rocketverifier.com/integrations/widget) covers every rule and option.

## Sync customers with the native connector

The customer sync verifies the customers already in your store and every new one, and writes the result into customer attributes you can filter and export.

### Connect BigCommerce

**Step 1**

In BigCommerce create a store API account (**Settings → Store-level API accounts**) with the **Customers: modify** scope.

**Step 2**

In RocketVerifier open **Dashboard → Integrations → BigCommerce**, paste the credentials below (the access token and store hash) and click **Connect**. They are validated against the platform before anything is saved.

**Step 3**

Pick the source to sync, the schedule and the write-back options in the integration settings, then click **Sync now** or wait for the schedule.

| Field | Required | Where to find it |
| --- | --- | --- |
| API key | Required | The API account's access token. |
| Store hash | Required | The `stores/<hash>` part of the API path shown with the API account. |

Credentials are stored encrypted and are only ever sent to the platform's own API hosts.

### What it syncs

**Sources.** All customers or any customer group.

**Incremental syncs.** Customers modified since the last sync.

### Schedules and credits

- **Schedule:** manual, daily, weekly or monthly. **Sync now** starts a run immediately. One sync runs per integration at a time, and an address already on its way through another run is never charged twice.
- **Mode:** *Full* checks every contact in the source except those verified in the last *N* days (default 30, range 0 to 365). *Incremental* checks only contacts changed since the last sync. Turn on per-status intervals to re-check unknown and catch-all addresses sooner than valid ones.
- **Credits:** each sync is a regular verification job at 1 credit per unique address. `unknown` results are refunded when the job completes. Addresses you verified recently anywhere in RocketVerifier are written back from that result for free. If the balance is too low, the sync stops with `insufficient_credits` before anything is charged.
- **Quarantine:** optionally re-check risky, catch-all and unknown contacts automatically every 1 to 90 days (default 14), so each one moves to Send or Remove once the result is clear.
- **Results** are written back when the job completes. The sync history in the dashboard shows updated, failed and skipped counts for every run, and a finished run fires the `integration.sync.completed` webhook event.

### Write-back

**Status fields.**

- `rv_email_status`
- `rv_email_sub_status`
- `rv_email_score`
- `rv_verified_at`
- `rv_email_recommendation`

Customer attributes, created on first use.

Status is one of `deliverable`, `undeliverable`, `risky` or `unknown`, and sub-status is a [`sub_status`](https://docs.rocketverifier.com/results#sub-status) value (`none` when there is no extra detail). Score runs from 0 to 100, verified-at is an ISO 8601 UTC timestamp, and recommendation is `send`, `review` or `remove` (valid is send; invalid and disposable are remove; risky, catch-all and unknown are review). Field names can be changed in the integration settings, and a blank name keeps the default.

### Auto-verify new contacts

Turn on **Auto-verify new contacts**. RocketVerifier registers a `store/customer/created` webhook to `https://api.rocketverifier.com/webhooks/connectors/bigcommerce/{integration_id}`. Every delivery carries a secret token unique to the integration, and each customer is read fresh from BigCommerce before it is verified.

Each new contact costs 1 credit. Addresses this integration verified recently (30 days by default) are skipped, and webhook events are de-duplicated for 24 hours, so platform retries never charge twice. Turn on **Send an email.verified webhook for each new contact** to receive every result as an [`email.verified`](https://docs.rocketverifier.com/api/webhooks) event with `source` set to the platform.

## Frequently asked questions

### Why must the script category be Essential?

With BigCommerce's cookie consent banner on, Functional and Analytics scripts wait for the shopper's consent, which would leave your forms unprotected until they accept. Essential scripts load right away. Mention the script in your privacy policy.

### Does it work on a headless or Catalyst storefront?

Headless storefronts do not use Script Manager. Add the two-line RocketShield embed to the storefront's layout instead, and the customer sync works the same way.

### Do I need a BigCommerce app?

No. The snippet is pasted into Script Manager, and the customer sync connects with a store API account.
