data-retention-policies

Automate e-commerce data lifecycle with scheduled purging, PII anonymization, and retention audit logging.

3|1|Updated Mar 21, 2026
One-click install
npx skills add https://github.com/tomtoto757/ecomm-ai-team --skill data-retention-policies-tomtoto757
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: data-retention-policies
Source: https://github.com/tomtoto757/ecomm-ai-team/tree/main/skills/platform-integrations-infrastructure/finsilabs/security-compliance/data-retention-policies
Command: npx skills add https://github.com/tomtoto757/ecomm-ai-team --skill data-retention-policies-tomtoto757

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? E-commerce stores accumulate customer and order data indefinitely, creating GDPR compliance risk, growing storage costs, and audit gaps. This Skill helps you define a legally sound retention schedule and implement automated archival, anonymization, and purging across Shopify, WooCommerce, BigCommerce, and custom platforms. ## Core Features & Use Cases - Retention Schedule Definition: Document a per-category retention policy (orders 7 years, sessions 90 days, carts 30 days) aligned with tax law and GDPR data minimization. - Platform-Specific Configuration: Step-by-step setup for Shopify GDPR webhooks, WooCommerce WP-Cron cleanup jobs, BigCommerce API-based retention, and custom TypeScript cron jobs. - Order PII Anonymization: Anonymize customer PII on old orders while preserving financial records and tax-jurisdiction fields required for audits. - Use Case: A marketplace preparing for a SOC 2 audit uses this Skill to implement a nightly 2 AM UTC cron job that purges expired sessions in small batches, anonymizes 7-year-old orders, and writes append-only audit log entries as compliance evidence. ## Quick Start Ask the AI to implement a nightly data retention job for your e-commerce backend that purges sessions older than 90 days and anonymizes orders older than 7 years while keeping financial data intact.

Frequently Asked Questions about data-retention-policies

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement GDPR data retention for an e-commerce store?▼

Start by documenting a retention schedule agreed on by legal and engineering, then configure platform-specific enforcement. Shopify uses built-in GDPR webhooks and customer anonymization, WooCommerce uses WP-Cron cleanup jobs, and custom platforms use scheduled TypeScript cron jobs with batched deletes.

How long should I keep order data for tax compliance?▼

Order financial records must typically be retained for 7 years to satisfy US IRS and EU VAT requirements. After that period, anonymize the customer PII (name, email, address) while preserving amounts, tax figures, and payment method details for audits.

Does Shopify handle data retention automatically?▼

Shopify stores order data indefinitely by default but provides built-in GDPR webhooks (customers/data_request and customers/redact) and a manual customer anonymization action. Automated list cleanup requires email provider features like Klaviyo sunset automations.

How do I purge large database tables without locking them?▼

Use small batch sizes of 500 to 5000 rows with LIMIT on every DELETE or UPDATE, add a short sleep between batch iterations, and run jobs during low-traffic hours such as 2 AM UTC. This avoids table locks that impact live traffic.

What happens if a customer has an open dispute when a deletion request arrives?▼

Check for pending chargebacks, open orders, and active subscriptions before any purge, and implement a legal hold mechanism that blocks deletion. GDPR deletion requests must still be tracked against the 30-day statutory deadline with escalation reminders.

Why is my GDPR deletion incomplete across systems?▼

Customer data typically lives in multiple systems beyond the primary database, including search indexes, email platforms, analytics warehouses, and CDN caches. Maintain a registry of all systems storing personal data and use a saga-style checklist that logs completion per system for partial failure recovery.