Skip to main content
Internal Service β€” This is not an HTTP endpoint. It’s called directly by the generate-all orchestrator.

Purpose

Fetches products from a Shopify store using the public products.json API and creates entity records for each discovered product. Runs in GROUP 1d (parallel with all GROUP 1 tasks, its output feeds GROUP 2b and 2c).

Shared Service

This task uses the shared discover_products service:
The same service is used by:
  • Onboarding (this task - GROUP 1d)
  • Cron (discover-products)

Function Signature

Parameters

Returns

Also returns a list of discovered products for GROUP 2b and 2c:

Execution Flow

GROUP 2b (Product Prompts) and GROUP 2c (Generate Product LLMs) run in parallel when products are discovered. GROUP 2 starts after GROUP 1a, 1b, and 1d complete.

How It Works

Products are fetched directly from Shopify’s public products.json API:
  1. Direct API access - Fetch from {store_url}/products.json
  2. Pagination - Automatically fetches all pages of products
  3. No AI required - Product data comes directly from Shopify
  4. Instant extraction - No scraping or content parsing needed
This is faster and more reliable than using AI to extract products from scraped content.

Database Schema

Products are stored as entities with type = 'product':

Code Location

Error Handling

If product discovery fails, GROUP 2b and 2c are skipped and onboarding continues without product prompts or product LLMs.