Skip to main content

BazaarVoice Integration

GSM Middleware integrates with BazaarVoice to sync product reviews across your BigCommerce stores using three methods: the Authentic Discovery API, SFTP Standard Client Feed import, and automated Schema.org markup generation.

Overview

The BazaarVoice integration provides:

  • Authentic Discovery API — Pull reviews from BazaarVoice's SEO-friendly API endpoint
  • SFTP Feed Import — Parse BazaarVoice Standard Client Feed XML files from SFTP
  • Schema.org Markup — Generate and sync JSON-LD review markup to BigCommerce custom fields
  • Individual Review Storage — Store each review in rm_item_reviews with SHA-256 hash deduplication
  • Aggregate Ratings — Track average rating, review count, and last sync per product

Version Added: 1.16.0 (Discovery API), 1.17.0 (SFTP Feed), 1.18.15 (Schema Markup)


Site Configuration

BazaarVoice settings are configured per-site in the Site Form Modal → BazaarVoice tab (BigCommerce sites only).

Sync Toggles

Three independent sync methods can be enabled:

ToggleLabelPurpose
bazaarvoice_syncEnable Product Sync to SFTPExport product data TO BazaarVoice via SFTP
bv_sftp_syncEnable Feed Review ImportImport reviews FROM BazaarVoice SFTP feed
bv_discovery_syncEnable Authentic Discovery API SyncPull reviews via BazaarVoice SEO API

Shared Settings

FieldDescription
Name / Client IDBazaarVoice client identifier (shared across Discovery API and SFTP)
Product ID MappingHow to match BV products to middleware items: prod_id, sku, or upc

SFTP Configuration

Visible when either SFTP-based sync method is enabled:

FieldDescription
SFTP HostBazaarVoice SFTP server hostname
SFTP UsernameSFTP login username
SFTP PasswordSFTP login password (encrypted at rest)

Discovery API Settings

FieldDescription
Environmentstaging or production (determines API endpoint and rate limits)
API Key (Production)BazaarVoice API key for production (encrypted)
API Key (Staging)BazaarVoice API key for staging (encrypted)

Authentic Discovery API

How It Works

  1. Iterates through all active items (rm_items) for the site
  2. Calls the BazaarVoice Authentic Discovery API for each product
  3. Deduplicates reviews using SHA-256 hash of product_id|review_id|submission_time
  4. Inserts new reviews into rm_item_reviews
  5. Recalculates aggregate ratings from actual stored reviews (not BV's aggregates)
  6. Updates rm_items with bv_rating_value, bv_review_count, bv_last_synced

Environment-Specific Endpoints

EnvironmentBase URLRate Limit
Staginghttps://seo-stg.bazaarvoice.com1,200 req/min
Productionhttps://seo.bazaarvoice.com3,000 req/min

Rate-limit-aware request delays are applied automatically with a 10% safety margin.

REST API

GET /wp-json/gsm-middleware/v1/items/{id}/reviews

Returns paginated reviews with aggregate data for a specific item.

Admin Testing Tool

Navigate to Tools → Testing → BazaarVoice Authentic Discovery API to manually trigger a review sync:

  • Select a site from the dropdown
  • Reviews are processed in chunks (10 products per batch) with real-time progress
  • Progress bar shows products processed, reviews found, new reviews, and errors
  • Environment badge (staging/production) displayed during sync
  • Abort button stops processing after the current batch completes

Cron Setup

External cron script for automated sync:

/usr/bin/php /path/to/plugins/gsm-middleware/cron/bv-discovery-sync.php --site=57

Configurable intervals via Crontab Generator: 1h, 24h, 3d, 7d, 14d, 30d.


SFTP Feed Import

How It Works

  1. Connects to BazaarVoice SFTP server using PHP ssh2 extension
  2. Downloads the latest .gz feed file from the /feeds directory
  3. Extracts and parses BazaarVoice Standard Client Feed 14.8 XML
  4. Processes both ReviewStatistics (aggregates) and individual <Review> elements
  5. Matches products using the configured bv_product_id_field with UPC array fallback
  6. Inserts reviews into rm_item_reviews with deduplication
  7. Recalculates aggregate ratings from stored reviews (database-derived, not feed-derived)
  8. Tracks last processed feed to skip already-imported files

Requirements

  • PHP ssh2 extension (pecl install ssh2)
  • BazaarVoice SFTP credentials configured per-site
  • Standard Client Feed enabled in your BazaarVoice account

Feed Tracking

ColumnDescription
bv_sftp_last_feed_dateDate of the last successfully processed feed file
bv_sftp_last_processed_fileFilename of the last processed feed

Cron Setup

/usr/bin/php /path/to/plugins/gsm-middleware/cron/bv-sftp-sync.php --site=57

Typically scheduled daily via the Crontab Generator.


Schema.org JSON-LD Markup

How It Works

After the SFTP feed import completes, the system automatically generates Schema.org compliant JSON-LD markup for product reviews:

  1. Schema_Markup_Generator queries rm_item_reviews for each product
  2. Generates two separate JSON-LD blocks per product:
    • Individual Reviews — Array of schema.org/Review objects (configurable, defaults to 50 most recent)
    • Aggregate Ratingschema.org/AggregateRating object (matches Google's rich snippet requirements)
  3. Stores generated markup in rm_item_schema_markup with generation timestamp
  4. Optionally syncs markup to BigCommerce product custom fields

BigCommerce Custom Field Sync (Legacy)

When enabled, the system automatically pushes JSON-LD to BigCommerce custom fields after generation:

Custom FieldContent
bazaarvoice_schema_reviews_jsonldIndividual reviews JSON-LD
bazaarvoice_schema_aggregate_jsonldAggregate rating JSON-LD
  • Incremental sync — Only updates products where schema was generated/updated since last sync
  • Batch processing — 50 products per batch for API efficiency
  • Sync time tracked via bv_schema_last_synced column in rm_sites
Preferred Method

For new implementations, use the Metafield Sync method below which combines reviews and aggregate into a single metafield with dynamic size management.


BazaarVoice Metafield Sync

Version Added: 1.18.37

The Metafield Sync pushes combined BazaarVoice review JSON-LD (individual reviews + aggregate rating) to BigCommerce product metafields using the suma namespace. This is the preferred method for making review data available to headless storefronts.

How It Works

  1. Queries rm_item_schema_markup for products with review data that has changed since last sync
  2. Builds combined JSON-LD payload containing both individual reviews and aggregate rating
  3. Dynamically reduces review count if payload exceeds the 65,535-byte metafield limit
  4. Upserts to BigCommerce product metafield (namespace: suma, key: bazaarvoice_reviews)
  5. Updates metafield_last_synced timestamp in rm_item_schema_markup

Metafield Details

PropertyValue
Namespacesuma
Keybazaarvoice_reviews
Permission Setread (accessible via Storefront API)
Max Size65,535 bytes

Dynamic Size Reduction

The sync starts with up to 50 reviews per product. If the resulting JSON exceeds the 65,535-byte metafield limit:

  1. Reduces the review count iteratively until the payload fits
  2. The aggregate rating always reflects ALL reviews (not just those in the payload)
  3. This ensures accurate aggregate data while fitting within BigCommerce's constraints

Per-Site Toggle

Enable via Site Form Modal → BazaarVoice tab:

ToggleColumnDescription
Enable Review Sync to BigCommercebv_metafield_syncControls whether the daily cron pushes combined review JSON-LD to product metafields

This toggle is only visible for BigCommerce sites.

Staleness Detection

The sync only pushes data when reviews have actually changed since the last push:

  • Compares generated_at (from rm_item_schema_markup) against metafield_last_synced
  • Products with unchanged reviews are skipped, reducing unnecessary API calls

REST API

Push Reviews Manually

POST /wp-json/gsm-middleware/v1/items/push-reviews

Authentication: Requires manage_options capability.

Push review metafields for a specific site or set of items on demand.

Items Page Integration

The Items page includes BV Metafield Sync controls:

  • Checkbox selection — Select multiple items for bulk operations
  • Per-row "Push Reviews" button — Push reviews for a single product
  • Bulk "Push Reviews to BC" action bar — Push reviews for all selected items

See Items Page for details.

Cron Entry Point

/usr/bin/php /path/to/plugins/gsm-middleware/cron/bv-metafield-sync.php --site=57
  • Runs daily (configurable hour in Crontab Generator)
  • Automatically triggered after SFTP feed sync completes
  • Only processes sites with bv_metafield_sync enabled

Dry Run Mode

Preview what would be synced without pushing to BigCommerce:

/usr/bin/php /path/to/plugins/gsm-middleware/cron/bv-metafield-sync.php --site=57 dry_run=1

Outputs all items needing sync with their review count, rating, JSON size, and a preview of the JSON-LD payload.

Database

New column on rm_item_schema_markup (Migration 022):

ColumnTypeDescription
metafield_last_syncedDATETIMEWhen metafield was last pushed to BigCommerce

New column on rm_sites (Migration 023):

ColumnTypeDescription
bv_metafield_syncTINYINTEnable BV Metafield Sync for this site (default: 0)

REST API Endpoints

Get Schema Markup

GET /wp-json/gsm-middleware/v1/items/{id}/schema-markup

Query Parameters:

ParameterTypeDefaultDescription
formatstringjsonjson for structured data, html for ready-to-use <script> tags

JSON Response:

{
"success": true,
"data": {
"reviews_jsonld": { "@context": "https://schema.org", ... },
"aggregate_jsonld": { "@context": "https://schema.org", ... },
"generated_at": "2026-05-12 14:30:00",
"review_count": 47
}
}

HTML Response: Returns ready-to-embed <script type="application/ld+json"> tags for direct frontend use.

Regenerate Markup

POST /wp-json/gsm-middleware/v1/items/{id}/schema-markup/regenerate

Authentication: Requires manage_options capability.

Manually regenerates the JSON-LD markup for a specific item from current review data.

Database Table

Table: rm_item_schema_markup (Migration 020)

ColumnTypeDescription
idINTAuto-increment primary key
item_idINTForeign key to rm_items
reviews_jsonldLONGTEXTIndividual reviews JSON-LD
aggregate_jsonldLONGTEXTAggregate rating JSON-LD
review_countINTNumber of reviews included
generated_atDATETIMELast generation timestamp

Database Schema

rm_item_reviews

Stores individual reviews (created by Migration 016):

ColumnTypeDescription
idINTAuto-increment primary key
item_idINTForeign key to rm_items
review_idVARCHAR(128)BazaarVoice review identifier
ratingTINYINTStar rating (1-5)
titleVARCHAR(500)Review title
review_textTEXTFull review content
reviewer_nameVARCHAR(255)Reviewer display name
submission_timeDATETIMEWhen the review was submitted
hashVARCHAR(64)SHA-256 deduplication hash
sourceVARCHAR(32)Source (discovery_api or sftp_feed)
created_atTIMESTAMPRow creation time

Index: Unique index on hash for deduplication.

Aggregate Columns on rm_items

ColumnTypeDescription
bv_rating_valueDECIMAL(3,2)Average review rating
bv_review_countINTTotal review count
bv_last_syncedDATETIMELast sync timestamp

Items Page Integration

The Items page detail modal includes a BazaarVoice Reviews card showing:

  • Aggregate star rating visualization
  • Total review count
  • Last sync timestamp
  • Scrollable list of individual reviews with pagination