diff --git a/components/campaign-templates-grid.tsx b/components/campaign-templates-grid.tsx index 6526a47..6a852ed 100644 --- a/components/campaign-templates-grid.tsx +++ b/components/campaign-templates-grid.tsx @@ -16,22 +16,6 @@ type CampaignTemplate = { const BASE = 'https://nextcommerce-campaign-templates.netlify.app'; const TEMPLATES: CampaignTemplate[] = [ - { - name: 'olympus', - slug: 'olympus', - description: - 'Default pick. Single-step single-product checkout — lowest-friction conversion, used in most campaigns.', - link: `${BASE}/olympus/checkout/`, - page_links: [ - { label: 'Presell', url: `${BASE}/olympus/presell/` }, - { label: 'Landing', url: `${BASE}/olympus/landing/` }, - { label: 'Checkout', url: `${BASE}/olympus/checkout/` }, - { label: 'Upsell — stepper', url: `${BASE}/olympus/upsell-bundle-stepper/` }, - { label: 'pills', url: `${BASE}/olympus/upsell-bundle-tier-pills/` }, - { label: 'cards', url: `${BASE}/olympus/upsell-bundle-tier-cards/` }, - { label: 'Receipt', url: `${BASE}/olympus/receipt/` }, - ], - }, { name: 'apollo', slug: 'apollo', @@ -48,22 +32,6 @@ const TEMPLATES: CampaignTemplate[] = [ { label: 'Receipt', url: `${BASE}/apollo/receipt/` }, ], }, - { - name: 'olympus-mv-single-step', - slug: 'olympus-mv-single-step', - description: 'Products with variants (size, flavor, color) on a single-step checkout.', - link: `${BASE}/olympus-mv-single-step/checkout/`, - page_links: [ - { label: 'Presell', url: `${BASE}/olympus-mv-single-step/presell/` }, - { label: 'Landing', url: `${BASE}/olympus-mv-single-step/landing/` }, - { label: 'Checkout', url: `${BASE}/olympus-mv-single-step/checkout/` }, - { label: 'Upsell — MV', url: `${BASE}/olympus-mv-single-step/upsell-mv/` }, - { label: 'Upsell — stepper', url: `${BASE}/olympus-mv-single-step/upsell-bundle-stepper/` }, - { label: 'pills', url: `${BASE}/olympus-mv-single-step/upsell-bundle-tier-pills/` }, - { label: 'cards', url: `${BASE}/olympus-mv-single-step/upsell-bundle-tier-cards/` }, - { label: 'Receipt', url: `${BASE}/olympus-mv-single-step/receipt/` }, - ], - }, { name: 'apollo-mv-single-step', slug: 'apollo-mv-single-step', @@ -81,6 +49,38 @@ const TEMPLATES: CampaignTemplate[] = [ { label: 'Receipt', url: `${BASE}/apollo-mv-single-step/receipt/` }, ], }, + { + name: 'olympus', + slug: 'olympus', + description: + 'Single-step checkout with the original Olympus tiered card layout. Use when it matches your existing design.', + link: `${BASE}/olympus/checkout/`, + page_links: [ + { label: 'Presell', url: `${BASE}/olympus/presell/` }, + { label: 'Landing', url: `${BASE}/olympus/landing/` }, + { label: 'Checkout', url: `${BASE}/olympus/checkout/` }, + { label: 'Upsell — stepper', url: `${BASE}/olympus/upsell-bundle-stepper/` }, + { label: 'pills', url: `${BASE}/olympus/upsell-bundle-tier-pills/` }, + { label: 'cards', url: `${BASE}/olympus/upsell-bundle-tier-cards/` }, + { label: 'Receipt', url: `${BASE}/olympus/receipt/` }, + ], + }, + { + name: 'olympus-mv-single-step', + slug: 'olympus-mv-single-step', + description: 'Products with variants (size, flavor, color) on a single-step checkout.', + link: `${BASE}/olympus-mv-single-step/checkout/`, + page_links: [ + { label: 'Presell', url: `${BASE}/olympus-mv-single-step/presell/` }, + { label: 'Landing', url: `${BASE}/olympus-mv-single-step/landing/` }, + { label: 'Checkout', url: `${BASE}/olympus-mv-single-step/checkout/` }, + { label: 'Upsell — MV', url: `${BASE}/olympus-mv-single-step/upsell-mv/` }, + { label: 'Upsell — stepper', url: `${BASE}/olympus-mv-single-step/upsell-bundle-stepper/` }, + { label: 'pills', url: `${BASE}/olympus-mv-single-step/upsell-bundle-tier-pills/` }, + { label: 'cards', url: `${BASE}/olympus-mv-single-step/upsell-bundle-tier-cards/` }, + { label: 'Receipt', url: `${BASE}/olympus-mv-single-step/receipt/` }, + ], + }, { name: 'olympus-mv-two-step', slug: 'olympus-mv-two-step', diff --git a/content/agent-setup.md b/content/agent-setup.md index 239b230..dce05b2 100644 --- a/content/agent-setup.md +++ b/content/agent-setup.md @@ -1,4 +1,4 @@ - + # Start or continue a NEXT campaign with an AI agent @@ -21,7 +21,7 @@ Store access, repository publishing, deployment, test orders and analytics sends | Funnel/store URL or design | Read the source and distinguish observed facts from proposed behavior | A build brief, commerce dependency plan and local preview | | Existing or cloned campaign repo | Read its instructions, build/configuration and retained evidence | Inspect current behavior and change only what the task requires | | Existing external build | Inspect its own source, build and deployment conventions | The relevant Campaign Cart checks; retain its framework and host | -| Local CampaignSpec, saved Map or Build Packet | Identify the selected campaign and read existing intent/status | The Campaigns OS continuation command for that artifact | +| Local CampaignSpec, saved Map or Build Packet | Identify the selected campaign and read existing intent/status | The Campaigns OS continuation command for that artifact; for a Map saved in the optional [Workspace](https://campaign-map.nextcommerce.com/), its Handoff gives the prompt to continue from | These entries can join the same work at different points. Do not replay provisioning or scaffolding because a new session starts. @@ -41,7 +41,7 @@ npx campaigns-os standardize --target /path/to/existing-campaign --no-doctor --j The report inspects source without modifying the target and does not migrate the project, prove checkout or certify a launch. If the application is not recognized, record that and inspect its own integration rather than changing frameworks to satisfy the detector. -For a clone, record the source commit and list the bindings to replace: campaign and store identity, packages, offers, domains, analytics IDs, URLs and custom business logic. Prior QA applies to the source campaign; new bindings need their own proof. For a maintenance task, compare the requested change with the existing brief, spec and commerce configuration, following the [reconciliation and handoff procedure](https://github.com/NextCommerceCo/campaigns-os/blob/main/docs/build-packet.md) where it applies. +For a clone, record the source commit and list the bindings to replace: campaign and store identity, packages, offers, domains, analytics IDs, URLs and custom business logic. Prior QA applies to the source campaign; new bindings need their own proof. For a maintenance task, compare the requested change with the existing brief, spec and commerce configuration, following the [reconciliation and handoff procedure](https://github.com/NextCommerceCo/campaigns-os/blob/main/docs/build-packet.md#changing-a-campaign-after-handoff) where it applies. ## Build a local preview before connecting commerce @@ -53,7 +53,7 @@ npm install next-campaign-page-kit npx campaign-init --help ``` -Choose a family from the [template catalog](https://github.com/NextCommerceCo/campaign-cart-starter-templates/blob/main/templates.json): preserve a template the user already chose, otherwise recommend one for the product, variant and page requirements and record why. For a non-interactive run, replace the placeholders with the selected values: +Choose a family from the [picker catalog](https://github.com/NextCommerceCo/campaign-cart-starter-templates/blob/main/templates.json), presented with previews and use cases in the [template browser](https://campaigns.nextcommerce.com/templates/): preserve a template the user already chose, otherwise recommend one for the product, variant and page requirements and record why. For a non-interactive run, replace the placeholders with the selected values: ```bash npx campaign-init --non-interactive --json \ diff --git a/content/docs/campaigns/index.mdx b/content/docs/campaigns/index.mdx index 245018e..1e863bb 100644 --- a/content/docs/campaigns/index.mdx +++ b/content/docs/campaigns/index.mdx @@ -9,8 +9,10 @@ Campaigns are fully custom checkout funnels — landing, checkout, upsell, and r Orders created through a campaign are regular store orders. They appear in the store's Orders list alongside storefront orders and are available through the Admin API and webhooks like any other order. - -Give an agent a funnel URL, existing repo or saved Map using the [campaign agent guide](/docs/agent-setup). It can inspect, plan and prepare a local concept before store access is available. The [Campaigns OS Start guide](https://campaigns.nextcommerce.com/start/) also provides the Workspace/Map route. Keep your existing builder and host; the Page Kit quick start below is the reference path for a new static project. + +Start with the [campaign agent guide](/docs/agent-setup). Give your agent a funnel URL, design, existing repository or saved Map. It can inspect, plan and prepare a local preview before store access is available, while preserving your builder and host. + +Once the campaign and its offers are configured in NEXT, [Campaigns OS Start](https://campaigns.nextcommerce.com/start/) sets up your agent to build the pages on a starter template and place a test order. The optional [Workspace](https://campaign-map.nextcommerce.com/) is where you map the campaign, wire products, preview pages and check it; the plan saved there is a Map. The quick start below covers direct Page Kit scaffolding. For direct project scaffolding, use the **[Campaign Page Kit](https://github.com/NextCommerceCo/campaign-page-kit)**: a CLI that scaffolds an SDK-ready starter template, runs a hot-reload dev server, and outputs a static site you can deploy to Netlify, Cloudflare Pages, Vercel, or any static host. @@ -100,7 +102,7 @@ my-campaigns/ ## Starter templates -Pick one at the `campaign-init` template prompt. Each template ships with SDK-ready checkout, upsell, and receipt surfaces, plus the supporting presell and landing pages for that family. Start from a maintained template, then replace campaign-specific copy, assets, package IDs, offer codes, shipping methods, tracking, and routes with values from Campaigns App and your build brief. Use the [current catalog](https://github.com/NextCommerceCo/campaign-cart-starter-templates/blob/main/templates.json) recommendations: Apollo for a standard tiered checkout, or Apollo MV for configurable variant slots. Preserve an existing family when it fits the project. +Pick one at the `campaign-init` template prompt. Each template ships with SDK-ready checkout, upsell, and receipt surfaces, plus the supporting presell and landing pages for that family. Start from a maintained template, then replace campaign-specific copy, assets, package IDs, offer codes, shipping methods, tracking, and routes with values from Campaigns App and your build brief. Follow the recommendations in the [template browser](https://campaigns.nextcommerce.com/templates/): Apollo for a standard tiered checkout, or Apollo MV for configurable variant slots. Preserve an existing family when it fits the project. @@ -179,7 +181,7 @@ Packages can also be **recurring** for subscription products. When you reference ### Offers -**Offers** are price mutation rules that apply when an order meets a condition. Two flavours: +Configure campaign discounts in [Campaigns App Offers & Discounts](https://docs.nextcommerce.com/docs/apps/campaigns-app/campaigns-offers-and-discounts). These are the rules the SDK and campaign templates use for pricing and savings. Two flavours: - **Offer** — automatic, applies when the cart matches the rule (checkout page only) - **Code** — voucher-based, applies when the customer enters a code. Codes stack **on top of** automatic offers, and codes are also the mechanism for applying discounts on **upsell pages** (where automatic offers don't run). @@ -276,7 +278,7 @@ Do not use `?ignore=true` when you are checking that a purchase is reported. See `campaign-init` can run with no prompts — pass every value as a flag: -This example uses `apollo` for a single-step checkout; pick the family from the [template catalog](https://github.com/NextCommerceCo/campaign-cart-starter-templates/blob/main/templates.json). `CAMPAIGN_API_KEY` is the campaign's browser-visible Campaign Cart key, never an Admin API token. +This example uses `apollo` for a single-step checkout; pick the family in the [template browser](https://campaigns.nextcommerce.com/templates/). `CAMPAIGN_API_KEY` is the campaign's browser-visible Campaign Cart key, never an Admin API token. ```bash npx campaign-init --non-interactive \ diff --git a/content/docs/campaigns/meta.json b/content/docs/campaigns/meta.json index 4a739a8..27d9590 100644 --- a/content/docs/campaigns/meta.json +++ b/content/docs/campaigns/meta.json @@ -5,6 +5,7 @@ "description": "Campaign funnels & checkout", "pages": [ "---Guides---", + "[Start with your agent](/docs/agent-setup)", "index", "templates", "page-kit", diff --git a/content/docs/campaigns/page-kit.mdx b/content/docs/campaigns/page-kit.mdx index 76f6176..19ff690 100644 --- a/content/docs/campaigns/page-kit.mdx +++ b/content/docs/campaigns/page-kit.mdx @@ -107,7 +107,7 @@ npm run dev -c my-campaign -p 8080 # specific campaign and port `campaign-init` can run with no prompts. Pass every value as a flag and add `--non-interactive`: -These examples use `apollo` for a single-step checkout; pick the family from the [template catalog](https://github.com/NextCommerceCo/campaign-cart-starter-templates/blob/main/templates.json). `CAMPAIGN_API_KEY` is the campaign's browser-visible Campaign Cart key, never an Admin API token. +These examples use `apollo` for a single-step checkout; pick the family in the [template browser](https://campaigns.nextcommerce.com/templates/). `CAMPAIGN_API_KEY` is the campaign's browser-visible Campaign Cart key, never an Admin API token. ```bash npx campaign-init --non-interactive \ diff --git a/content/docs/campaigns/templates.mdx b/content/docs/campaigns/templates.mdx index e03cf5d..9a8e07d 100644 --- a/content/docs/campaigns/templates.mdx +++ b/content/docs/campaigns/templates.mdx @@ -9,4 +9,8 @@ All templates are available for download on GitHub at [NextCommerceCo/campaign-c These are the options you'll see at the `campaign-init` template picker. Each one installs a complete funnel into your project with SDK-ready checkout, cart, upsell, and receipt surfaces. Treat those commerce surfaces as runtime wiring: replace campaign-specific package IDs, offer codes, shipping methods, copy, assets, and routes, but avoid rebuilding the SDK-owned controls from scratch. +Compare families in the [template browser](https://campaigns.nextcommerce.com/templates/), which presents the [picker catalog](https://github.com/NextCommerceCo/campaign-cart-starter-templates/blob/main/templates.json) with previews and use cases. Keep the family an existing campaign already uses when it fits the change. + + +Continue with the [campaign agent guide](/docs/agent-setup) and give your agent the selected family. You can build locally without a saved Map. diff --git a/scripts/generate-agent-setup.mjs b/scripts/generate-agent-setup.mjs index 24c8bbc..d6e3e44 100644 --- a/scripts/generate-agent-setup.mjs +++ b/scripts/generate-agent-setup.mjs @@ -44,6 +44,8 @@ title: Start or continue a campaign with an agent description: Start from a funnel URL, existing repository or Map, prepare a local preview, and leave a handoff another agent can continue --- +Start here to build or change a campaign with your own coding agent. Bring a URL, design, existing repository or saved Map; store access can follow when you are ready to connect commerce. + Give your coding agent this instruction: \`\`\`text @@ -52,6 +54,12 @@ Read https://developers.nextcommerce.com/agent-setup/prompt.md and help me start The fetched file is plain Markdown at a stable URL. It uses the same source as the instructions below, contains no credentials, and keeps the current CLI and Campaigns docs authoritative. It covers campaign intake, existing builds and continuation. It does not require a new project or store credentials before source inspection and local planning. +Choose the continuation that fits your project: + +- **New campaign:** inspect the source and prepare a local preview. Use the [Page Kit guide](/docs/campaigns/page-kit) for a new static project, or [Campaigns OS Start](https://campaigns.nextcommerce.com/start/) to have your agent set up the build once the campaign and its offers are configured in NEXT. +- **Existing campaign:** keep its build and host, inspect the current revision, and follow the [maintenance procedure](https://github.com/NextCommerceCo/campaigns-os/blob/main/docs/build-packet.md#changing-a-campaign-after-handoff) when it uses Campaigns OS. +- **Saved Map:** open its Handoff in the optional [Workspace](https://campaign-map.nextcommerce.com/), where the campaign is mapped, wired to products and previewed, and give the saved plan to your agent. + ${humanInstructions}`; mkdirSync(docsDir, { recursive: true });