Guide to Use Shopify Data in Product Discovery Collection
Steps to configure Shopify data in Product Discovery Collection
- Converting Product Data to Shopify-Compatible CSV
- Getting Shopify Store Fields for SearchBlox Product Discovery
Converting Product Data to Shopify-Compatible CSV
Overview
Any product dataset (JSON, CSV, etc.) can be converted into a Shopify-compatible CSV for import via Shopify Admin > Products > Import. The conversion involves mapping source fields to Shopify's 49-column CSV format and structuring rows correctly for variants and images.
TIP:
Claude Code to generate a custom conversion script for any dataset:
You can use Claude Code to quickly generate a custom conversion script for any dataset. Simply provide your source data file and ask Claude Code to create a script that maps its fields to the Shopify CSV format. It will analyze the data structure and produce a ready-to-use converter.
Key Shopify CSV Fields
| Shopify Field | Description |
|---|---|
| Handle | URL-friendly product identifier (lowercase, hyphens, no special chars) |
| Title | Product name |
| Body (HTML) | Product description in HTML |
| Vendor | Brand or manufacturer |
| Type | Product category (e.g., Skincare > Moisturizer) |
| Tags | Comma-separated tags for filtering and search |
| Variant Price | Selling price |
| Variant Compare At Price | Original price (shows strikethrough if higher than selling price) |
| Image Src | Image URL |
| Variant SKU | Stock-keeping unit identifier |
| Option1 Name / Value | First variant option (e.g., Size) |
| Option2 Name / Value | Second variant option (e.g., Color) |
| Variant Inventory Qty | Stock quantity |
| Published | TRUE to make the product visible |
CSV Structure
Shopify uses a multi-row format where products with multiple variants or images span several rows, all sharing the same Handle:
Row 1: Contains all product-level data (Title, Body, Vendor, Tags, etc.) + first variant + primary image.
Additional variant rows: Same Handle, only variant-specific fields filled (Option value, SKU, Price, Inventory).
Additional image rows: Same Handle, only Image Src, Image Position, and Image Alt Text filled.
Examples:
Example 1:A product with 2 sizes and 3 images:
Row Handle Title Option1 Value Image Src Image Position 1 hydrating-cream Hydrating Cream 50ml primary.jpg 1 2 hydrating-cream 100ml 3 hydrating-cream side-view.jpg 2 4 hydrating-cream close-up.jpg 3 Example 2: Ulta Dataset Conversion:
As a reference, the convert_to_shopify.py script converts an Ulta product JSON file to Shopify CSV:
python convert_to_shopify.py ulta_products.json shopify_products.csvKey mappings used in this example:
Source Field Shopify Field product_name Handle (auto-generated), Title brand_name Vendor raw_description / summary Body (HTML) category_1, category_2, category_3 Type (joined with >) retail, sale_price Variant Price, Variant Compare At Price primary_image_url Image Src sku Variant SKU product_size, color Option1, Option2 uniq_id Metafield: searchblox.uniq_id
Importing into Shopify
- Go to Shopify Admin > Products > Import.
- Upload the generated CSV file.
- Review the preview and click Import products.
- Shopify will create all products with their variants and images.
For full details on Shopify's CSV format and requirements, see the official guide: Using CSV files — Shopify Help
Getting Shopify Store Fields for SearchBlox Product Discovery
Overview
To create a Product Discovery collection in SearchBlox, you need three fields from your Shopify store:
| Field | Description | Example |
|---|---|---|
| Store Domain | Your Shopify store's .myshopify.com domain | your-store.myshopify.com |
| Access Token | Admin API access token (starts with shpat_) | shpat_xxxxxxxxxxxxxxxxxxxx |
| API Version | Shopify API version for requests | 2025-07 |
Steps to Get Each Field
- Store Domain
- Access Token (Admin API)
- API Version
Store Domain
- Log in to your Shopify Admin panel.
- The URL in your browser will be: https://admin.shopify.com/store/
- Your store domain is: .myshopify.com
Alternatively, go to Settings > Domains in Shopify Admin.
Access Token (Admin API)
Important — Shopify credential changes (January 2026): Shopify has deprecated the legacy custom app flow where you could create an app directly in the Shopify Admin and copy a static shpat_ access token from the screen. New apps must now be created through the Shopify Developer Dashboard or Shopify CLI, and access tokens are obtained via OAuth-based flows (client credentials grant, token exchange, or authorization code grant) rather than being displayed as a one-time copyable value. Tokens also expire regularly for improved security. See Shopify's official guide on generating access tokens for current instructions.
For existing custom apps (created before January 2026), the previously issued shpat_ tokens continue to work. If you already have one, you can use it directly in SearchBlox.
For new apps, follow these steps:
- Go to the Shopify Developer Dashboard and create a new app.
- Configure the required Admin API scopes:
- read_products — to read product data
- read_product_listings — to read product listings
- read_inventory — to read inventory levels (optional)
- read_content — to read pages/blogs (optional)
- Install the app on your store.
- Note the Client ID and Client Secret from the app's credentials page.
- Obtain the access token using the Client Credentials Grant flow:
Request
POST https://{your-store}.myshopify.com/admin/oauth/access_token
Content-Type: application/json
Payload
{
"grant_type": "client_credentials",
"client_id": "<your_client_id>",
"client_secret": "<your_client_secret>"
}
Response
{
"access_token": "shpat_xxxxxxxxxxxxxxxxxxxx",
"scope": "read_products,read_inventory,...",
"expires_in": 86400
}
Note: Tokens obtained via the client credentials grant expire after 24 hours. You will need to request a new token when the current one expires. This flow is available for apps installed on stores you own.
API Version
Shopify releases new API versions quarterly (e.g., 2025-01, 2025-04, 2025-07, 2025-10). Use the latest stable version available at the time of setup. In SearchBlox, select Custom from the API Version dropdown and enter the version string.
SearchBlox Configuration
- In SearchBlox Admin, navigate to the Product Discovery collection setup.
- Enter the fields:
- Store Domain: your-store.myshopify.com
- Access Token:
shpat_xxxxxxxxxxxxxxxx - API Version: Select Custom and enter the version (e.g., 2025-07)
- Save the configuration. SearchBlox will use the Shopify Admin API to fetch product data for indexing and search.
References:
Shopify CSV & Product Import
- Using CSV files to import and export products — Official guide on Shopify's CSV format and column requirements
- Importing products with a CSV file — Step-by-step import instructions
- Sample product CSV template — Downloadable Shopify CSV template
- Sample product CSVs with images (GitHub) — Shopify-provided sample product CSVs to seed a store
Shopify API & Authentication
- Authentication and authorization overview — Overview of Shopify's auth model
- Generate access tokens for custom apps— Current instructions for obtaining Admin API tokens
- OAuth authorization code grant— Manual OAuth flow implementation
- API access scopes reference — Full list of available API scopes (read_products, read_inventory, etc.)
- Shopify Custom App Deprecation 2026 & Dev Dashboard Guide — Summary of the January 2026 credential changes
Updated about 2 hours ago
