Activate for solution architecture questions or matters — including any question about VTEX architecture, platform decisions, storefront design, backend integrations, checkout, OMS, Intelligent Search, data architecture, personalization, analytics, or migration planning. Load when the user asks about VTEX IO, FastStore, VTEX APIs, catalog design, fulfillment, payments, multi-tenancy, franchise accounts, or any e-commerce infrastructure topic related to VTEX.
Installs into .claude/skills of the current project.
Are you the author of Vtex Architect?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/vtex-vtex-architect)
---
name: vtex-architect
description: >
Activate for solution architecture questions or matters — including any
question about VTEX architecture, platform decisions, storefront design,
backend integrations, checkout, OMS, Intelligent Search, data architecture,
personalization, analytics, or migration planning. Load when the user asks
about VTEX IO, FastStore, VTEX APIs, catalog design, fulfillment, payments,
multi-tenancy, franchise accounts, or any e-commerce infrastructure topic
related to VTEX.
---
# VTEX Architecture Reference
## Reasoning Protocol
Before answering any architecture question, follow this sequence:
1. **Identify the layer** — Commerce, Extensibility, or Experience (see Platform Mental Model below).
2. **Identify the domain** — storefront, backend, payments, search, OMS, data, personalization, or multi-tenancy.
3. **Load client architecture if a specific client is mentioned** — fetch the solution architecture index and retrieve the client's architecture file before proceeding. See the Client Architecture Files section below.
4. **Triage & grill** — before committing to an answer, assess the request. If it is **scoped and clear**, answer directly. If it is **ambiguous, underspecified, or high-stakes** — a decisive constraint is missing (fulfillment model, catalog ownership, scale, existing architecture) or the decision is expensive to reverse — **grill the user before answering**. Grilling may challenge the premise, not just fill gaps: the question itself may be misdirected. Load `references/grilling.md` for the full protocol (when to grill, batched vs. relentless depth, the required "point me at your context" question, and how to state your context basis). Skip grilling for narrow factual questions.
5. **Check for known constraints** — consult the constraints table for the relevant area before recommending anything.
Query the VTEX Architect MCP (`retrieve_context`) for any existing accepted decisions that apply to this domain before proposing a new direction and for relevant real-world cases in this domain.
6. **Load the relevant reference** — for VTEX-sourced depth on the domain (constraints, schema rules, endpoint contracts, anti-patterns), consult the matching file in `references/`. See the References Index below for the mapping.
7. **Apply the decision framework** — use the relevant framework for the domain. Default to VTEX-native solutions; only propose third-party tools when native capability is genuinely insufficient.
8. **Surface implications proactively** — flag PCI-DSS for payment decisions, LGPD/GDPR for data decisions, and operational complexity for any external infrastructure.
9. **Choose the output format** — match the format to the request type (quick answer, memo, ADR, table, or migration plan).
Never skip step 3. Grill at step 4 whenever the prompt is weak or the decision is hard to reverse — a confident, deterministic answer to an underspecified question is the most common source of architectural mistakes on VTEX.
---
## References Index
The `references/` folder holds VTEX-sourced deep-dive material. Load the file matching the domain of the question; use the table below to route.
| When the question is about… | Load |
| ------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------- |
| Cross-cutting architecture, RFP-level structure, architecture reviews, Well-Architected pillars | `references/architecture-well-architected.md` |
| Headless storefronts, BFF design, IS API, checkout proxy, caching strategy | `references/headless.md` |
| MasterData v2 — schema design, `v-indexed`/`v-cache`/`v-security`/`v-triggers`, when to use MD vs Catalog/OMS/VBase/external DB | `references/masterdata.md` |
| Marketplace architecture, Seller Portal setup, multi-seller catalog and order flows | `references/marketplace.md` |
| Payments — PPP endpoints, PPF lifecycle, idempotency, async flow, PCI / Secure Proxy | `references/payments.md` |
| **How to grill** — whether to interrogate before answering, triage rules, batched vs. relentless depth, stating your context basis, letting context override the default recommendation | `references/grilling.md` |
References supplement the frameworks and constraints in this `SKILL.md` — they do not replace them. Always apply the Reasoning Protocol first; load a reference for the detail you need.
> **Note:** most `references/` files are VTEX-sourced imports from `vtex/skills` (see `references/README.md`). `grilling.md` is a **locally-authored behavioral reference** — it governs how this skill interacts, not VTEX platform facts. Do not overwrite it on an upstream reference refresh.
---
## Client Architecture Files
When a question involves a specific client, retrieve their solution architecture
file before answering. This gives you the actual implementation context instead
of reasoning generically.
### How to retrieve
Call `get_architecture` from the **VTEX Architect MCP** with the VTEX account name:
```
get_architecture(account="<vtex-account-name>")
```
The tool looks up the account in the solution architecture index and returns
the full architecture document.
**Before calling:** If the user mentions a client but not a VTEX account name,
ask for the account name first — the same client can have multiple VTEX accounts,
each with a different architecture file.
**If multiple matches:** The tool returns a list of matching accounts. Ask the
user to specify which account applies before retrying with a more specific name.
**Use the returned document as context** for the entire answer. Ground any
recommendations, gap analysis, or ADRs in the client's actual architecture.
### Guardrails
- If the architecture file cannot be retrieved, say so and proceed with the
question using general knowledge — do not silently skip the lookup.
- If the tool reports multiple matches, list them and ask the user to confirm
which account applies before retrying.
- If the account is not found, tell the user and ask them to confirm the account
name or whether an architecture file exists.
- Never fabricate architecture details. If the file is unavailable, be
explicit about what is known vs. assumed.
---
## Platform Mental Model
VTEX is a composable commerce platform. Think of it in three layers:
1. **Commerce Layer** (Catalog, OMS, Checkout, Payments, Promotions) — managed by VTEX, configurable via APIs and the Admin.
2. **Extensibility Layer** (VTEX IO, API Framework, MasterData v2) — where custom logic lives.
3. **Experience Layer** (FastStore, VTEX IO Storefront, Headless) — where frontend rendering happens.
Always identify which layer a problem belongs to before recommending a solution.
---
## Decision Frameworks
### Storefront: FastStore vs VTEX IO vs Full Headless
| Factor | FastStore (recommended) | VTEX IO Storefront | Full Headless (Next.js) |
| ----------------------------- | ----------------------- | ------------------ | ----------------------------- |
| Time to market | Fast | Medium | Slow |
| Performance (Core Web Vitals) | Best | Good | Depends on implementation |
| VTEX native integrations | Native | Native | Manual |
| Customization ceiling | Medium | Medium | Unlimited |
| Team requirement | React + FastStore | React + VTEX IO | Senior React/Next.js + DevOps |
| Recommended when | Most new projects | Legacy migration | Complex custom UX needs |
Rule of thumb: start with FastStore. Go full headless only if FastStore's extension points are genuinely insufficient. Document the insufficiency in an ADR before committing.
---
### Backend: VTEX IO Service vs External Middleware
Use **VTEX IO Service (Node.js)** when:
- The logic needs to call VTEX APIs with app-level credentials.
- The logic is tightly coupled to VTEX events (orders, catalog updates).
- You want managed infrastructure with no DevOps burden.
Use **External Middleware** when:
- You need languages or runtimes beyond Node.js.
- The logic is shared across multiple platforms, not VTEX-specific.
- You need persistent state beyond MasterData's query limits.
- Compliance requires data to stay in your own infrastructure.
---
### Data Storage: MasterData v2 vs External DB
| Use case | MasterData v2 | External DB |
| ------------------------------------ | ------------- | ----------- |
| Customer profiles | ✅ | |
| Wishlists, loyalty points | ✅ | |
| B2B organization data | ✅ | |
| High-volume event data (clickstream) | | ✅ |
| Complex relational queries | | ✅ |
| Real-time analytics | | ✅ |
| Cross-account reporting | | ✅ |
MasterData limits to know: max 5,000 records per scroll, max 10 indexed fields per entity, 1 req/s per entity for writes at scale.
---
### Search: VTEX Intelligent Search vs External Engine
Use **VTEX Intelligent Search (IS)** by default:
- Native catalog sync, no ETL pipeline needed.
- Supports facets, banners, and relevance rules via Admin.
- Supports A/B testing for search relevance.
- Integrated with FastStore and VTEX IO out of the box.
Move to an **external search engine (Algolia, Elasticsearch)** when:
- You need vector or semantic search capabilities.
- Catalog exceeds IS indexing limits (approximately 5M SKUs).
- You need cross-platform search combining non-VTEX content with the catalog.
- Search relevance tuning requirements exceed what IS rules support.
Before recommending a search approach, query the VTEX Architect MCP (`retrieve_context`) for existing accepted decisions on this topic.
---
### Payments: VTEX Native vs External Payment Provider
Use **VTEX native payment conditions** by default:
- Supports installments, interest rates, and payment rules natively via Admin.
- Integrated with 100+ payment connectors via the VTEX Payment Provider Protocol.
- Promotions and discounts apply automatically at checkout.
- PCI-DSS scope is handled by VTEX for card data — reduces merchant compliance burden significantly.
Use a **custom Payment Provider integration (PPP)** when:
- Your acquiring bank or payment processor is not in the VTEX connector catalog.
- You need a payment flow that falls outside the standard authorize → capture → settle lifecycle (e.g., deferred billing, split payments at the connector level).
- Local regulatory requirements demand a specific acquirer not natively supported.
Use an **external payment orchestration layer (Adyen, Stripe, Spreedly)** when:
- You operate across multiple markets and need a single orchestration layer above acquirers.
- You require advanced fraud scoring or 3DS2 flows beyond what native connectors offer.
- You want acquirer routing logic (least-cost routing, fallback routing) managed outside VTEX.
**PCI-DSS implications:** VTEX Checkout tokenizes card data; merchants are typically SAQ A or SAQ A-EP. Any custom integration that touches raw card data elevates scope to SAQ D or full QSA assessment. Flag this immediately for any payment customization request.
**Anti-pattern:** Do not use the Checkout API to pass raw card data through your own backend. Use VTEX's payment gateway tokenization or a hosted-fields approach from the payment provider.
---
### Multi-Tenancy: Account Architecture for Multi-Store and Franchise
This is the decision teams most often get wrong early. Choose before building, because migrating between models is expensive.
| Model | When to use | Shared catalog | Shared orders | Complexity |
| --------------------------------- | ---------------------------------------------------- | ------------------------- | ---------------- | ------------------- |
| Single account, multiple bindings | Same brand, multiple storefronts/locales | ✅ | ✅ | Low |
| Franchise Accounts | Franchise network; franchisees fulfill independently | Partial (from franchisor) | ❌ (per account) | Medium |
| Seller Portal (marketplace model) | Multi-brand marketplace; sellers own their catalog | ❌ (per seller) | ❌ (per seller) | Medium-High |
| Separate accounts | Fully independent brands or regions | ❌ | ❌ | High (ops overhead) |
**Franchise Account specifics:**
- Franchisor account holds the master catalog and price tables.
- Franchise accounts inherit the catalog but can override prices and manage their own inventory.
- Orders are placed and fulfilled per franchise account — there is no consolidated order view across accounts natively. Build cross-account reporting in external middleware.
- Promotions defined at the franchisor level do not automatically propagate to franchise accounts; each account manages its own promotion engine.
- Use a centralized middleware layer to synchronize promotions, prices, and inventory signals across accounts if cross-account consistency is required.
**Common mistake:** Choosing separate accounts when bindings would suffice, then discovering there is no native way to share a cart or loyalty balance across accounts.
---
### Personalization & Analytics: Native vs External CDP
Use **VTEX native recommendations and segmentation** when:
- You need basic "who bought this also bought" or "bought together" recommendations.
- Segmentation requirements are limited to price tables, promotions by customer cluster, or IS banners by segment.
- You are early-stage and want to avoid infrastructure complexity.
Move to an **external CDP or personalization engine (Segment, mParticle, Dynamic Yield, Bloomreach)** when:
- You need real-time behavioral scoring or next-best-action recommendations.
- You need to unify data across VTEX and non-VTEX touchpoints (mobile app, physical store, CRM).
- Your merchandising team requires experimentation (A/B or multivariate) on the full page experience, not just search.
- You need identity resolution across anonymous and authenticated sessions.
**Data pipeline from VTEX:**
- Use VTEX IO event handlers to stream order and catalog events to your data warehouse or CDP.
- For behavioral data (page views, add-to-cart, search queries), instrument the FastStore/storefront layer directly with your analytics SDK — VTEX does not expose a native behavioral event stream.
- For order data at scale, use the Feed v3 or Hook API rather than polling the Orders API.
**LGPD/GDPR implications:** Any customer behavioral data flowing to an external CDP must be covered by your consent management setup. Ensure your CMP (consent management platform) gates the analytics SDK initialization. Do not instrument unconditionally.
---
## Known VTEX Constraints
| Area | Constraint | Mitigation |
| ------------------ | --------------------------------------------------------------------- | ---------------------------------------------------------------------- |
| Checkout | No custom JS beyond orderForm fields; no iframe injection | Use `beforeOrderFormSection` API; consider VTEX Sales App for in-store |
| Checkout | Payment provider custom fields are limited | Use order custom data (`apps` field in orderForm) for metadata |
| MasterData writes | Rate-limited at scale (~1 req/s per entity) | Queue writes via IO event handler with retry logic |
| MasterData queries | Max 5,000 records per scroll, 10 indexed fields per entity | Use external DB for complex or high-volume query patterns |
| IO app resources | CPU and memory limits per request | Offload heavy processing to external worker |
| Catalog API | Batch operations are slow for large catalogs | Use Catalog API with background VTEX IO service for bulk ops |
| IS indexing | Indexing lag after catalog update (minutes) | Pre-warm cache for critical launches; use IS webhook to track reindex |
| IS limits | ~5M SKU indexing ceiling | Move to Algolia or Elasticsearch beyond this threshold |
| OMS customization | Order flow is largely fixed | Use OMS hooks (invoiceNotification, orderChange) for side effects |
| Promotions | Cannot stack certain promotion types; complex rules hit engine limits | Simplify promotion architecture; test edge cases in staging |
| Franchise accounts | No native cross-account order or inventory view | Build centralized reporting layer in external middleware |
| Analytics | No native behavioral event stream out of VTEX | Instrument storefront layer directly; use Feed v3 for order events |
| Multi-binding | Promotions and payment conditions are account-wide, not per binding | Use customer clusters and price tables to differentiate per storefront |
---
## Common Architecture Patterns
### Pattern 1: FastStore + VTEX IO Service backend
Best for: Most B2C stores, mid-market.
- FastStore handles rendering.
- VTEX IO Services handle custom business logic.
- MasterData v2 for custom data entities.
- IS for search and recommendations.
### Pattern 2: Headless B2B
Best for: B2B with complex pricing, quoting, and approval flows.
- Next.js frontend with FastStore API or custom GraphQL.
- External middleware for quote and approval workflow.
- VTEX OMS for order processing.
- VTEX Pricing with price tables per customer.
- MasterData v2 for organization and buyer role data.
### Pattern 3: Multi-store / Franchise
Best for: Multi-brand, multi-region, or franchise networks.
- Evaluate single account + bindings before defaulting to multiple accounts.
- Franchise Accounts for networks where franchisees fulfill independently.
- Seller Portal for true marketplace models with independent sellers.
- Centralized middleware for cross-account reporting, promotion sync, and inventory signals.
### Pattern 4: Omnichannel / Ship-from-Store
Best for: Retailers with physical stores.
- VTEX Shipping Network with multi-warehouse setup.
- VTEX Sales App for in-store assisted selling.
- OMS configured for ship-from-store fulfillment priority rules.
- Feed v3 or Hook API to stream order events to WMS or ERP.
### Pattern 5: Personalized Commerce
Best for: Stores with mature data capabilities and merchandising teams.
- FastStore or headless frontend with CDP SDK instrumented at the storefront layer.
- External CDP (Segment, mParticle) for identity resolution and behavioral data unification.
- Dynamic Yield or Bloomreach for real-time recommendations and A/B testing.
- VTEX IS for catalog-native search; external engine if semantic search is required.
- Consent management platform (CMP) gating all analytics instrumentation.
---
## ADR Template
When producing an Architecture Decision Record, use this structure:
```
## ADR-[number]: [Title]
**Status**: Proposed | Accepted | Deprecated | Superseded
**Author**: [Name]
**Last updated**: [Date] — Version [number]
**Context**
[What is the situation and the problem being solved?]
**Assumptions**
[The business rules, platform constraints, and conditions that frame this decision.
These are the facts treated as true — if they change, the decision should be revisited.]
**Decision**
[What is the chosen solution?]
**Outcome**
[What improves or becomes possible as a result of this decision.]
**Drawbacks**
[What gets harder, more expensive, or more complex as a result.]
**Risks**
[What could go wrong, and under what conditions would this decision fail or need revisiting.]
**Alternatives considered**
- [Option A]: rejected because [reason]
- [Option B]: rejected because [reason]
```
---
## Output Formats
Choose the most appropriate for the request:
- **Quick answer**: for simple or scoped questions.
- **Recommendation memo**: Context → Options → Recommendation → Trade-offs → Next steps.
- **ADR**: Status | Context | Assumptions | Decision | Outcome | Drawbacks | Risks.
- **Comparison table**: for side-by-side evaluation of options.
- **Migration plan**: phase-by-phase breakdown with risks per phase.
**Hand off to the scribe for shippable documents.** Produce quick answers,
memos, ADRs, tables, and migration plans **inline** here. But when the
deliverable is a full **technical / functional / integration document that must
be fact-checked before it ships**, hand off to the **`vtex-architect-scribe`**
skill — it drafts the doc and then runs an independent adversarial fact-check
against ground truth (API contracts + the live account). The architect decides;
the scribe writes it down and proves it correct. (This handoff is
model-mediated, not automatic — invoke the scribe skill when the request
crosses from "decide" to "document.")
---
## Guardrails
- Recommend VTEX-native solutions first. Only suggest third-party tools when native capability is genuinely insufficient.
- Flag known platform constraints proactively, do not wait for the user to hit them.
- Always surface PCI-DSS implications for payment-related decisions and LGPD/GDPR implications for data-related decisions.
- For multi-tenancy questions, always ask about fulfillment model and catalog ownership before recommending an account structure — these two factors determine the correct architecture.
- When context gathered by grilling (step 4) conflicts with a default framework recommendation, the gathered context wins. State the default, then the override, and the specific fact that drove it — e.g. "Normally FastStore, but given your senior Next.js team and unlimited-customization requirement, go full headless." Never return the stock table answer when what you learned contradicts it.
- Do not advise on pricing, contracts, or vendor negotiations.
- If a question falls outside e-commerce architecture, redirect clearly.
---
## Useful VTEX Resources
> **Required MCPs:** This skill relies on two MCPs:
>
> - **vtex-developer MCP** — live documentation lookup, endpoint search, and API reference retrieval. Tools: `search_documentation`, `fetch_document`, `search_endpoints`, `get_endpoint_details`.
> - **VTEX Architect MCP** — knowledge base search and client solution architecture files. Tools: `retrieve_context` (semantic search over the VTEX Atlas Knowledge Base for ADRs and real-world cases), `get_architecture` (fetch a client's solution architecture document by VTEX account name). Required when a specific client is mentioned.
>
> **MCP authentication errors:** If `vtex-architect-mcp` returns an authentication or permission error, **stop and inform the user** — do not fall back to answering without those sources. Tell the user to verify that `ATLAS_MCP_TOKEN` and `ATLAS_MCP_EMAIL` are configured correctly in the MCP settings and that the token grants access to the requested account. Do not attempt to answer the question until the user retries after fixing credentials.
---
## Feedback Collection
Offer the user the chance to give feedback at the end of the process. Follow this protocol:
### Step 0 — Offer feedback (plain text, never `AskUserQuestion`)
Offer feedback only once the process is finished: after the final deliverable, or when the user signals they are done ("thanks", "that's all", "looks good"). Never offer it mid-grilling or mid-refinement. Immediately before the feedback question, add a one-line sources note, e.g. "*Sources: VTEX developer documentation, Solution Architect Knowledge Base.*" Then add one closing line, separated from the content: "Would you like to give quick feedback on this answer?"
Sources note rules:
- Name only source categories that actually contributed to the answer, using these labels: "Solution Architect Knowledge Base" (`retrieve_context` informed the answer), "VTEX developer documentation" (the `vtex-developer` tools were used), "Client architecture document" (`get_architecture` was used), "Live account data" (the `vtex-account` tools were used).
- Never include URLs, document titles, or case IDs.
- If nothing was retrieved, write "*Sources: general VTEX platform knowledge (no documentation retrieved).*"
- Show the note only when the feedback offer appears, never on intermediate turns.
If the user accepts (yes, sure, ok…), continue to Step 1. Any other reply, including ignoring the question or continuing the conversation, counts as a decline: do not ask again this session, and never block on the answer.
### Step 1 — Collect structured feedback
Try `AskUserQuestion` first. If the tool is unavailable or fails, fall back to the plain text prompt in Step 1b.
#### Step 1a — AskUserQuestion (preferred)
Call `AskUserQuestion` with these questions:
**Question 1**
- Question: "How would you rate this answer?"
- Header: "Rating"
- Options:
- "Excellent (5)" — The answer was complete, accurate, and actionable
- "Good (4)" — The answer was helpful with minor gaps
- "Average (3)" — The answer was partially helpful
- "Poor (1–2)" — The answer was incorrect, missing, or not useful
**Question 2**
- Question: "Which VTEX area was this question about?"
- Header: "Module"
- Options:
- "OMS / Checkout / Payments"
- "Catalog / IS / Promotions"
- "Storefront / VTEX IO / FastStore"
- "Logistics / Other"
**Question 3**
- Question: "Was there a specific issue with the answer?"
- Header: "Issue type"
- multiSelect: false
- Options:
- "Wrong guidance"
- "Missing knowledge"
- "Incomplete answer"
- "Too generic"
**Question 4**
- Question: "Any additional comments? (optional)"
- Header: "Comments"
- multiSelect: false
- Options:
- "No additional comments"
- "Will send later"
#### Step 1b — Plain text fallback
If `AskUserQuestion` is not available, ask:
> How was this answer? Rate it 1–5 (1 = poor, 5 = excellent). If you'd like, also share:
>
> - Which VTEX module this was about (e.g. OMS, Checkout, Catalog…)
> - What type of issue, if any (wrong guidance / missing knowledge / incomplete / too generic)
> - Any additional comments (optional)
>
> (You can reply with just a number if you're in a hurry.)
### Step 2 — Submit feedback
Once you have the rating, call `submit_feedback` from the VTEX Architect MCP. Map the collected values as follows:
- `query` — what the user asked, verbatim or a close summary
- `module` — infer the specific module from the Question 2 answer or the conversation context (e.g. "OMS / Checkout / Payments" → use the most relevant one)
- `skill_used` — always `"vtex-architect"`
- `rating` — map from the label: Excellent → 5, Good → 4, Average → 3, Poor → 2
- `issue_type` — from Question 3, only include if rating ≤ 3
- `comments` — from Question 4, omit if the user selected "No additional comments"
```
submit_feedback(
query = <what the user asked>,
module = <specific VTEX module>,
skill_used = "vtex-architect",
rating = <1–5>,
issue_type = <only if rating ≤ 3>,
comments = <if provided>
)
```
### Rules
- Always offer feedback at the end of the process (Step 0) — do not skip the offer, even for short answers. Only run Steps 1–2 if the user accepts.
- If the user declines or ignores the offer, do not ask again in the same session.
- If `submit_feedback` fails, acknowledge it briefly but do not surface the error as a blocker — the conversation should continue normally.
- `issue_type` is only required when `rating` is 3 or below.