MishaBook a demo

Aug 14, 2026

Data Requirements for AI in Ecommerce

Data requirements for ecommerce AI are the minimum set of fields, schemas, and integrations required to make accurate decisions about customer acquisition, retention, margin, and inventory. Without them, AI optimizes against noise.

Why Data Quality Matters More Than Model Quality

A sophisticated AI model trained on bad data will confidently recommend the wrong actions. In ecommerce, this means overspending on unprofitable channels, retargeting the wrong segments, or pricing below cost. The model itself is not the constraint - data is.

The rule: if a human cannot audit the decision by hand, the AI should not make it. This means every input field must be traceable to a source system, and every calculation must be reproducible. Brands that skip this step typically discover problems after 2 - 4 weeks of automation, when margin or ROAS has already degraded.

Core Data Fields Required Before Automation

Five data categories must be clean and connected before running any AI automation in ecommerce:

  • UTM parameters (source, medium, campaign, content, term) - must be consistent across all paid channels and applied at the click level, not session level. Mismatch between ad platform UTM and analytics UTM is the most common source of channel misattribution.
  • Cost of goods sold (COGS) by SKU - required for margin calculation. If COGS is missing, bundled, or outdated, AI cannot distinguish profitable products from loss leaders. Update COGS monthly or when supplier costs change.
  • Shipping cost by destination and weight - AI needs to calculate true unit economics. Flat - rate shipping masks regional margin differences. If shipping is subsidized, document the subsidy rule.
  • Customer subscription or cohort ID - required for retention automation. Without it, AI cannot identify repeat customers or calculate lifetime value. Subscription IDs must persist across order history.
  • Product hierarchy (category, subcategory, collection, supplier) - required for merchandising and inventory automation. Flat product lists without hierarchy limit AI's ability to make category - level decisions.

Audit Checklist: Before Connecting Data Sources

Run this checklist on each data source before integration:

  • Source system: Where does this data live? (Shopify, Klaviyo, Stripe, custom database, spreadsheet). If it is a spreadsheet, establish a process to migrate to a connected system.
  • Freshness: How often is this data updated? Real - time, daily, weekly? If daily, what time? If weekly, which day? AI needs to know the lag.
  • Completeness: What percentage of records have this field populated? If less than 95%, document the missing - data rule (null = 0, null = unknown, null = exclude from analysis).
  • Consistency: Is this field defined the same way across systems? Example: does 'revenue' in Shopify match 'revenue' in your analytics platform? Check 5 - 10 sample orders.
  • Ownership: Who maintains this data? Assign a person, not a team. They own updates, corrections, and schema changes.
  • Retention: How far back does this data go? AI needs at least 6 months of historical data to train on seasonal patterns. 12 months is better.

UTM Strategy: The Foundation of Channel Attribution

UTM parameters are the primary mechanism for connecting ad spend to revenue. Inconsistent UTM schemes are the root cause of 70% of channel attribution errors in DTC brands.

Define a UTM standard before running ads:

Source: the platform (facebook, google, tiktok, email, organic). Use lowercase, no spaces.

Medium: the ad format (cpc, cpm, email, organic). Consistent across all channels.

Campaign: the campaign name. Include the month and year (jan_2025_winter_sale). Avoid generic names like 'campaign_1'.

Content: the ad creative variant or audience segment (if relevant). Optional but useful for A/B testing.

Term: the keyword (for search only). Leave blank for social and email.

Enforce this standard in all ad platforms. Set up UTM validation rules in your analytics platform to flag malformed parameters. If UTMs are inconsistent, AI cannot attribute revenue to channels accurately, and margin calculations will be wrong.

Cost of Goods and Margin: The Constraint on Automation

AI cannot optimize for profitability without COGS. Many brands treat COGS as a static percentage of revenue, but it varies by product, supplier, and order volume.

Establish COGS by SKU:

Include all direct costs: materials, labor, packaging, inbound freight. Exclude overhead, rent, salaries.

Update COGS when supplier prices change. If a supplier raises prices, update the SKU within 48 hours.

For bundles or kits, calculate COGS as the sum of component SKU costs.

For dropshipped products, use the supplier's cost, not the wholesale price.

Once COGS is defined, calculate gross margin per order: (revenue - COGS - shipping cost - payment processing fee) / revenue. This is the input AI needs to make acquisition and retention decisions. If gross margin is below 30%, most acquisition channels will be unprofitable. AI should flag this automatically.

Subscription and Cohort Data: Required for Retention Automation

Retention automation (email, SMS, product recommendations) requires a stable customer identifier that persists across orders and channels.

For subscription brands: subscription ID must be unique, immutable, and linked to the customer email. When a customer upgrades, downgrades, or pauses, the subscription ID remains the same. Retention AI uses this to identify at - risk subscribers (declining usage, missed renewals) and trigger interventions.

For non - subscription brands: create a cohort ID based on first purchase date (cohort_jan_2025). This allows AI to segment customers by acquisition month and calculate cohort - level retention rates. Without cohort data, AI cannot distinguish between a new customer with low repeat rate and a mature customer with high repeat rate.

Link subscription or cohort ID to all downstream systems: email platform, analytics, product database. If this ID is missing or inconsistent, retention automation will fail silently - AI will send emails to the wrong segment or at the wrong time.

Data Governance: Ownership and Maintenance

Data quality degrades over time without governance. Assign a data owner (typically a marketing ops or analytics person) who is responsible for:

Monitoring data freshness: are integrations running on schedule?

Validating data accuracy: are sample records correct?

Documenting schema changes: when a field is added or removed, update the data dictionary.

Resolving conflicts: if two systems report different values for the same metric, investigate and document the reason.

The data owner should run a weekly audit: check integration logs, spot - check 10 - 20 records, and flag any anomalies. This takes 30 - 60 minutes per week and prevents silent data corruption.

Questions

FAQ

What if we don't have 6 months of historical data?

Start with whatever you have, but acknowledge the limitation. AI trained on 2 - 3 months of data will miss seasonal patterns and may overfit to recent trends. Run AI in advisory mode (recommendations only, no automation) until you have 6 months of history. Use this time to audit data quality and fix UTM inconsistencies.

Can we use estimated or average COGS instead of actual COGS by SKU?

No. Estimated COGS will cause AI to misidentify profitable products. A product with 40% estimated margin but 20% actual margin will be over - acquired, destroying overall profitability. Spend 1 - 2 weeks to calculate actual COGS by SKU. This is non - negotiable before running margin - based automation.

How do we handle missing UTM parameters?

Set a default rule: if a parameter is missing, tag it as 'untagged' or 'direct'. Do not leave it blank. This makes it visible in reporting and forces the team to fix the source. Track the percentage of untagged traffic weekly. If it exceeds 5%, investigate the source.

What happens if we connect data sources but don't establish governance?

Data quality will degrade within 2 - 4 weeks. Integrations will break silently, COGS will become outdated, UTMs will drift, and AI will start making decisions based on stale or incorrect data. Assign a data owner before connecting anything. This is the only way to maintain data quality at scale.

Want this on your account?

Thirty minutes. Bring the number that keeps you up.

More from the blog