hac_scaffold_greenfield_site
Scaffold a complete greenfield SAP Commerce site with BaseStore, ProductCatalog, OCC headless URLs, OAuth clients, and optional B2B org hierarchy to launch a new B2B or B2C storefront.
Instructions
Scaffolds a complete greenfield SAP Commerce site, BaseStore, ProductCatalog, OCC headless URL patterns, OAuth clients, and optional B2B organization hierarchy.
⚠️ IMPORTANT — Full Zero-to-Live Pipeline Orchestration: When a user asks to "build a site from scratch" or "从零建站", this tool is only STEP 1 of a mandatory 7-step pipeline. After calling this tool, the AI agent MUST automatically continue executing ALL remaining steps WITHOUT waiting for further user instructions:
Step 1: hac_scaffold_greenfield_site → Create BaseSite, BaseStore, Catalogs, OAuth Step 2: hac_ingest_external_storefront → If source_url is provided, crawl the website to extract product categories, product names, descriptions, prices, images, and attributes, then auto-generate and import ImpEx Step 3: hac_impex_import → (If user provides CSV/Excel/ImpEx instead of URL) Step 4: hac_groovy_execute → Bind product images from CDN/S3/crawled URLs Step 5: hac_catalog_sync → Sync ProductCatalog from Staged to Online Step 6: hac_solr_reindex → Full Solr reindex to make products searchable Step 7: hac_spartacus_doctor + hac_storefront_autofix → Diagnose and auto-heal the headless Spartacus storefront (CORS, OAuth, OCC URL patterns)
The user should only need to provide:
Customer name (site_name)
B2B or B2C (channel)
Currencies and languages
The customer's existing website URL (source_url) — optional, for product crawling
Everything else is automatic. Do NOT ask the user to manually specify each step.
Args: site_id: Unique site identifier (e.g. 'apac-beverages') site_name: Human-readable site name (e.g. 'APAC Beverages B2B Store') channel: 'B2B' or 'B2C' currency: Primary currency code (e.g. 'HKD', 'USD', 'CNY') languages: List of language codes (e.g. ['zh_TW', 'en']) source_url: Customer's existing website/storefront URL to crawl for products. When provided, agent MUST auto-invoke hac_ingest_external_storefront after site creation to populate the catalog. storefront_origin: Spartacus frontend origin for CORS configuration content_catalog: Custom content catalog ID (auto-generated if omitted) delivery_countries: List of delivery country codes setup_b2b_org: Whether to scaffold B2B org hierarchy (only when channel='B2B') monthly_budget: B2B cost center monthly budget amount approval_threshold: B2B order approval threshold amount
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| channel | No | B2B | |
| site_id | Yes | ||
| currency | No | USD | |
| languages | No | ||
| site_name | Yes | ||
| source_url | No | ||
| setup_b2b_org | No | ||
| monthly_budget | No | ||
| content_catalog | No | ||
| storefront_origin | No | http://localhost:4200 | |
| approval_threshold | No | ||
| delivery_countries | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |