Shopify
Brightspot's Shopify integration lets you search and import products and collections from a Shopify store into federated search, and can keep an imported product in sync automatically when it changes in Shopify.
Configuring the integration
Shopify accounts are configured per site, and a site can have more than one store account.
To configure a Shopify account:
- From the left navigation, under Admin, click Sites & Settings.
- From the Integrations tab, expand the Shopify cluster.
- Under Settings, add an account, and complete the following fields:
- In the Internal Name field, type a name to identify this account in selection fields.
- In the Store Url field, type the URL for your Shopify store—for example,
https://brightspot.myshopify.com. - In the Shopify Access Token field, type the access token for your Shopify store's custom app.
- In the Api Secret Key field, type the API secret key for your Shopify store's custom app.
- Click Save.
Importing products and collections
You can use integrated search to import Shopify products and collections into Brightspot. Importing a collection also imports its first 10 products; if a collection has more, its edit page links to the rest directly in Shopify.
This module doesn't ship a content type for imported products or collections. Which content type an import converts to depends entirely on what your project has implemented.
To import Shopify products or collections:
- In the header, click the search field to open the search panel.
- Under Global Filters, from the content-type filter, select Shopify Product or Shopify Collection.
- Perform an integrated search. For details, see Performing integrated searches in Brightspot.
- Click the product or collection you want to import.
- Click Import.
- Complete your site's workflow and publish the asset.
If your project's converter targets the built-in Product content type, imported metadata—title, description, storefront URL, images, and options and variants—populates the Options field as described there. For the full metadata field list and where each value comes from, see the Shopify API reference; for how to write the converter itself, see Extending the integration.
Configuring automatic updates
Each Shopify account has an optional Auto Update Settings field for keeping imported products in sync with Shopify automatically, instead of relying on an editor to search for and re-import a changed product.
Enabling this only queues the update. Applying it to a Brightspot product record requires your project to implement ShopifyProductWebhookProcessor—see Extending the integration.
To configure automatic Shopify updates:
- Open the Shopify account, and under Auto Update Settings, select Set.
- Toggle on Enabled.
- Under Auto Update User, select the Brightspot user to attribute update actions to.
- Under Subscriptions, add a subscription, and select the Events to subscribe to: New Products, Product Deletions, Product Updates, or any combination.
- Under Processor, select the implementation your project provides.
- Click Save.
Brightspot checks for new Shopify transactions once a minute. The read-only Subscription Statuses field reports whether each subscription's webhook registration succeeded, and can take up to five minutes to update after saving. Webhook registration also requires a task host to be configured in Global Settings—if none is configured, the field shows a note asking for one instead of a status.
Synchronization applies only to products, not collections—a change to a collection's title, or to which products belong to it, in Shopify does not update the corresponding collection in Brightspot. Synchronization also only picks up changes made after you enable it; products already imported before enabling do not get checked retroactively.
Configuring product reports
If you connect your Shopify account to Google Analytics, you can display Google Analytics data for your Shopify products in Brightspot.
Product reports require the com.brightspot.go:lib-model-google-analytics-4-product dependency in addition to this module, and a working Google Analytics 4 integration.
To configure product reports:
- In your Shopify console, connect your Shopify account to Google Analytics. For details, see the Shopify documentation.
- From the left navigation, under Admin, click Sites & Settings, then select the Global site.
- Under the Integrations tab, expand the Google Analytics 4 cluster.
- Toggle on Product Report Enabled.
- Under Product Metrics to Display, click Add, then select the metrics. These metrics are displayed in the GA Product Data tab on a product's content edit page. If none are selected, all metrics are displayed.
- Under Product Analytics Timeframe, select an option from the list to customize product analytics dynamic lists, or retain the default of seven days.
- Click Save.