Apply when deciding where and how a VTEX IO app should store and read data. Covers when to use app settings, configuration apps, Master Data, VBase, VTEX core APIs, or external stores, and how to avoid duplicating sources of truth or abusing configuration stores for operational data. Use for new data flows, caching decisions, refactors, or reviewing suspicious storage and access patterns in VTEX IO apps.
Use this skill when the main question is where data should live and how a VTEX IO app should read or write it.
Designing new data flows for an IO app
Deciding whether to use app settings, configuration apps, Master Data, VBase, or VTEX core APIs
Reviewing code that reads or writes large, duplicated, or critical datasets
Introducing caching layers or derived local views around existing APIs
Do not use this skill for:
detailed Master Data schema or entity modeling
app settings or configuration app schema design
auth tokens or policies such as AUTH_TOKEN, STORE_TOKEN, or manifest permissions
service runtime sizing or concurrency tuning
Decision rules
Choose the right home for each kind of data
Use app settings or configuration apps for stable configuration managed by merchants or operators, such as feature flags, credentials, external base URLs, and behavior toggles.
Use Master Data for structured custom business records that belong to the account and need validation, filtering, search, pagination, or lifecycle management.
Use VBase for simple keyed documents, auxiliary snapshots, or cache-like JSON payloads that are usually read by key rather than searched broadly.
Use VTEX core APIs when the data already belongs to a VTEX core domain such as orders, catalog, pricing, or logistics.
Use external stores or external APIs when the data belongs to another system and VTEX IO is only integrating with it.
Keep source of truth explicit
Treat VTEX core APIs as the source of truth for core commerce domains such as orders, products, prices, inventory, and similar platform-owned data.
Do not mirror complete orders, catalog records, prices, or inventories into Master Data or VBase unless there is a narrow derived use case with clear ownership.
If an IO app needs a local copy, store only the minimal fields or derived view required for that app and rehydrate full details from the authoritative source when needed.
Do not use app settings or configuration apps as generic operational data stores.
Design reads and caches intentionally
Prefer API-level filtering, pagination, field selection, and bounded reads instead of loading full datasets into Node and filtering in memory.
Use caching only when repeated reads justify it and the cached view has clear invalidation or freshness rules.
When a background job or event pipeline needs persistent processing state, store only the status and correlation data required for retries and idempotency.
Keep long-lived logs, traces, or unbounded histories out of Master Data and VBase unless the use case explicitly requires a durable app-owned audit trail.
Hard constraints
Constraint: Configuration stores must not be used as operational data storage
App settings and configuration apps MUST represent configuration, not transactional records, unbounded lists, or frequently changing operational state.
Why this matters
Using configuration stores as data storage blurs system boundaries, makes workspace behavior harder to reason about, and breaks expectations for tools and flows that depend on settings being small and stable.
Detection
If you see arrays of records, logs, histories, orders, or other growing operational payloads inside settingsSchema, configuration app payloads, or settings-related APIs, STOP and move that data to Master Data, VBase, a core API, or an external store.
Constraint: Core systems must remain the source of truth for their domains
VTEX core systems such as Orders, Catalog, Pricing, and Logistics MUST remain the primary source of truth for their own business domains.
Why this matters
Treating a local IO copy as the main store for core domains creates reconciliation drift, stale reads, and business decisions based on outdated data.
Detection
If an app stores full order payloads, product documents, inventory snapshots, or price tables in Master Data or VBase and then uses those copies as the main source for business decisions, STOP and redesign the flow around the authoritative upstream source.
Constraint: Data-heavy reads must avoid full scans and in-memory filtering
Large or growing datasets MUST be accessed through bounded queries, filters, pagination, or precomputed derived views instead of full scans and broad in-memory filtering.
Why this matters
Unbounded reads are inefficient, hard to scale, and easy to turn into fragile service behavior as the dataset grows.
Detection
If you see code that fetches entire collections from Master Data, VTEX APIs, or external stores and then filters or aggregates the result in Node for a normal request flow, STOP and redesign the access path.
1---2name: vtex-io-data-access-patterns3description: Apply when deciding where and how a VTEX IO app should store and read data. Covers when to use app settings, configuration apps, Master Data, VBase, VTEX core APIs, or external stores, and how to avoid duplicating sources of truth or abusing configuration stores for operational data. Use for new data flows, caching decisions, refactors, or reviewing suspicious storage and access patterns in VTEX IO apps.4---56# Data Access & Storage Patterns78## When this skill applies910Use this skill when the main question is where data should live and how a VTEX IO app should read or write it.1112- Designing new data flows for an IO app13- Deciding whether to use app settings, configuration apps, Master Data, VBase, or VTEX core APIs14- Reviewing code that reads or writes large, duplicated, or critical datasets15- Introducing caching layers or derived local views around existing APIs1617Do not use this skill for:18- detailed Master Data schema or entity modeling19- app settings or configuration app schema design20- auth tokens or policies such as `AUTH_TOKEN`, `STORE_TOKEN`, or manifest permissions21- service runtime sizing or concurrency tuning2223## Decision rules2425### Choose the right home for each kind of data2627- Use app settings or configuration apps for stable configuration managed by merchants or operators, such as feature flags, credentials, external base URLs, and behavior toggles.28- Use Master Data for structured custom business records that belong to the account and need validation, filtering, search, pagination, or lifecycle management.29- Use VBase for simple keyed documents, auxiliary snapshots, or cache-like JSON payloads that are usually read by key rather than searched broadly.30- Use VTEX core APIs when the data already belongs to a VTEX core domain such as orders, catalog, pricing, or logistics.31- Use external stores or external APIs when the data belongs to another system and VTEX IO is only integrating with it.3233### Keep source of truth explicit3435- Treat VTEX core APIs as the source of truth for core commerce domains such as orders, products, prices, inventory, and similar platform-owned data.36- Do not mirror complete orders, catalog records, prices, or inventories into Master Data or VBase unless there is a narrow derived use case with clear ownership.37- If an IO app needs a local copy, store only the minimal fields or derived view required for that app and rehydrate full details from the authoritative source when needed.38- Do not use app settings or configuration apps as generic operational data stores.3940### Design reads and caches intentionally4142- Prefer API-level filtering, pagination, field selection, and bounded reads instead of loading full datasets into Node and filtering in memory.43- Use caching only when repeated reads justify it and the cached view has clear invalidation or freshness rules.44- When a background job or event pipeline needs persistent processing state, store only the status and correlation data required for retries and idempotency.45- Keep long-lived logs, traces, or unbounded histories out of Master Data and VBase unless the use case explicitly requires a durable app-owned audit trail.4647## Hard constraints4849### Constraint: Configuration stores must not be used as operational data storage5051App settings and configuration apps MUST represent configuration, not transactional records, unbounded lists, or frequently changing operational state.5253**Why this matters**5455Using configuration stores as data storage blurs system boundaries, makes workspace behavior harder to reason about, and breaks expectations for tools and flows that depend on settings being small and stable.5657**Detection**5859If you see arrays of records, logs, histories, orders, or other growing operational payloads inside `settingsSchema`, configuration app payloads, or settings-related APIs, STOP and move that data to Master Data, VBase, a core API, or an external store.6061**Correct**6263```json64{65 "settingsSchema": {66 "type": "object",67 "properties": {68 "enableModeration": {69 "type": "boolean"70 }71 }72 }73}74```7576**Wrong**7778```json79{80 "settingsSchema": {81 "type": "object",82 "properties": {83 "orders": {84 "type": "array"85 }86 }87 }88}89```9091### Constraint: Core systems must remain the source of truth for their domains9293VTEX core systems such as Orders, Catalog, Pricing, and Logistics MUST remain the primary source of truth for their own business domains.9495**Why this matters**9697Treating a local IO copy as the main store for core domains creates reconciliation drift, stale reads, and business decisions based on outdated data.9899**Detection**100101If an app stores full order payloads, product documents, inventory snapshots, or price tables in Master Data or VBase and then uses those copies as the main source for business decisions, STOP and redesign the flow around the authoritative upstream source.102103**Correct**104105```typescript106const order = await ctx.clients.oms.getOrder(orderId)107108ctx.body = {109 orderId: order.orderId,110 status: order.status,111}112```113114**Wrong**115116```typescript117const cachedOrder = await ctx.clients.masterdata.getDocument({118 dataEntity: 'ORD',119 id: orderId,120})121122ctx.body = cachedOrder123```124125### Constraint: Data-heavy reads must avoid full scans and in-memory filtering126127Large or growing datasets MUST be accessed through bounded queries, filters, pagination, or precomputed derived views instead of full scans and broad in-memory filtering.128129**Why this matters**130131Unbounded reads are inefficient, hard to scale, and easy to turn into fragile service behavior as the dataset grows.132133**Detection**134135If you see code that fetches entire collections from Master Data, VTEX APIs, or external stores and then filters or aggregates the result in Node for a normal request flow, STOP and redesign the access path.136137**Correct**138139```typescript140const documents = await ctx.clients.masterdata.searchDocuments({141 dataEntity: 'RV',142 fields: ['id', 'status'],143 where: 'status=approved',144 pagination: {145 page: 1,146 pageSize: 20,147 },148})149```150151**Wrong**152153```typescript154const allDocuments = await ctx.clients.masterdata.scrollDocuments({155 dataEntity: 'RV',156 fields: ['id', 'status'],157})158159const approved = allDocuments.filter((doc) => doc.status === 'approved')160```161162## Preferred pattern163164Start every data design with four questions:1651661. Whose data is this?1672. Who is the source of truth?1683. How will the app query it?1694. Does the app really need to store a local copy?170171Then choose intentionally:172173- app settings or configuration apps for stable configuration174- Master Data for structured custom records owned by the app domain175- VBase for simple keyed documents or cache-like payloads176- VTEX core APIs for authoritative commerce data177- external stores or APIs for data owned outside VTEX178179If the app stores a local copy, keep it small, derived, and clearly secondary to the authoritative source.180181## Common failure modes182183- Using app settings as generic storage for records, histories, or large lists.184- Mirroring complete orders, products, or prices from VTEX core into Master Data or VBase as a parallel source of truth.185- Fetching entire datasets only to filter, sort, or aggregate them in memory for normal request flows.186- Using Master Data or VBase for unbounded debug logs or event dumps.187- Adding caches without clear freshness, invalidation, or ownership rules.188- Spreading ad hoc data access decisions across handlers instead of keeping source-of-truth and storage decisions explicit.189190## Review checklist191192- [ ] Is this data truly configuration, or should it live in Master Data, VBase, a core API, or an external system?193- [ ] Is the authoritative source of truth explicit?194- [ ] Is VTEX core being treated as authoritative for orders, catalog, prices, inventory, and similar domains?195- [ ] Is local storage limited to data the app truly owns or a narrow derived view?196- [ ] Are reads bounded with filters, field selection, and pagination where appropriate?197- [ ] Does any cache or local copy have clear freshness and invalidation rules?198199## Related skills200201- [`vtex-io-app-settings`](../vtex-io-app-settings/SKILL.md) - Use when the main decision is how to model app-level configuration202- [`vtex-io-service-configuration-apps`](../vtex-io-service-configuration-apps/SKILL.md) - Use when shared structured configuration should be injected through `ctx.vtex.settings`203- [`vtex-io-masterdata-strategy`](../vtex-io-masterdata-strategy/SKILL.md) - Use when the main decision is whether Master Data is the right storage mechanism and how to model it204205## Reference206207- [Master Data](https://developers.vtex.com/docs/guides/master-data) - Structured account-level custom data storage208- [VBase](https://developers.vtex.com/docs/guides/vbase) - Key-value storage and JSON blobs for VTEX IO apps209- [Calling VTEX commerce APIs using VTEX IO clients](https://developers.vtex.com/docs/guides/calling-commerce-apis-3-using-vtex-io-clients) - How to consume Orders, Catalog, Pricing, and other core APIs from VTEX IO210- [Configuring your app settings](https://developers.vtex.com/docs/guides/vtex-io-documentation-4-configuringyourappsettings) - App settings as configuration rather than operational storage211- [Creating an interface for your app settings](https://developers.vtex.com/docs/guides/vtex-io-documentation-creating-an-interface-for-your-app-settings) - Public versus private app settings and config boundaries
Run npx skillmds add vtex/vtex-io-data-access-patterns in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Apply when deciding where and how a VTEX IO app should store and read data. Covers when to use app settings, configuration apps, Master Data, VBase, VTEX core APIs, or external stores, and how to avoid duplicating sources of truth or abusing configuration stores for operational data. Use for new data flows, caching decisions, refactors, or reviewing suspicious storage and access patterns in VTEX IO apps. It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Capability flags: makes network calls. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
vtex (@vtex) published this skill. Their other Agent Skills are listed on their SkillMD profile.