{"table_name":"cintel_customer_clv","full_table_name":"wp_cintel_customer_clv","description":"Stores cintel customer clv data created by this plugin.","detection_method":"static","confidence":"medium","create_sql":"CREATE TABLE wp_cintel_customer_clv ( customer_id BIGINT UNSIGNED NOT NULL, email VARCHAR(255) DEFAULT '', first_order_date DATE DEFAULT NULL, last_order_date DATE DEFAULT NULL, total_orders INT UNSIGNED DEFAULT 0, total_spent DECIMAL(15,4) DEFAULT 0, avg_order_value DECIMAL(15,4) DEFAULT 0, avg_days_between_orders DECIMAL(10,2) DEFAULT 0, predicted_clv DECIMAL(15,4) DEFAULT 0, recency_score TINYINT UNSIGNED DEFAULT 0, frequency_score TINYINT UNSIGNED DEFAULT 0, monetary_score TINYINT UNSIGNED DEFAULT 0, rfm_segment VARCHAR(50) DEFAULT '', churn_risk VARCHAR(10) DEFAULT 'low', days_since_last_order INT UNSIGNED DEFAULT 0, expected_next_order_date DATE DEFAULT NULL, acquisition_source VARCHAR(255) DEFAULT '', last_calculated DATETIME DEFAULT NULL, PRIMARY KEY (customer_id), KEY idx_segment (rfm_segment), KEY idx_churn (churn_risk), KEY idx_clv (predicted_clv) ) $charset_collate; CREATE TABLE wp_cintel_customer_cohorts ( cohort_month VARCHAR(7) NOT NULL, month_number INT UNSIGNED NOT NULL, active_customers INT UNSIGNED DEFAULT 0, total_revenue DECIMAL(15,4) DEFAULT 0, retained_pct DECIMAL(8,4) DEFAULT 0, PRIMARY KEY (cohort_month, month_number) ) $charset_collate;\"; require_once ABSPATH . 'wp-admin/includes/upgrade.php'; dbDelta( $sql );","columns":[{"name":"customer_id","type":"BIGINT UNSIGNED","nullable":false,"primary_key":false},{"name":"email","type":"VARCHAR(255)","nullable":true,"primary_key":false},{"name":"first_order_date","type":"DATE","nullable":true,"primary_key":false},{"name":"last_order_date","type":"DATE","nullable":true,"primary_key":false},{"name":"total_orders","type":"INT UNSIGNED","nullable":true,"primary_key":false},{"name":"total_spent","type":"DECIMAL(15,4)","nullable":true,"primary_key":false},{"name":"avg_order_value","type":"DECIMAL(15,4)","nullable":true,"primary_key":false},{"name":"avg_days_between_orders","type":"DECIMAL(10,2)","nullable":true,"primary_key":false},{"name":"predicted_clv","type":"DECIMAL(15,4)","nullable":true,"primary_key":false},{"name":"recency_score","type":"TINYINT UNSIGNED","nullable":true,"primary_key":false},{"name":"frequency_score","type":"TINYINT UNSIGNED","nullable":true,"primary_key":false},{"name":"monetary_score","type":"TINYINT UNSIGNED","nullable":true,"primary_key":false},{"name":"rfm_segment","type":"VARCHAR(50)","nullable":true,"primary_key":false},{"name":"churn_risk","type":"VARCHAR(10)","nullable":true,"primary_key":false},{"name":"days_since_last_order","type":"INT UNSIGNED","nullable":true,"primary_key":false},{"name":"expected_next_order_date","type":"DATE","nullable":true,"primary_key":false},{"name":"acquisition_source","type":"VARCHAR(255)","nullable":true,"primary_key":false},{"name":"last_calculated","type":"DATETIME","nullable":true,"primary_key":false},{"name":"month_number","type":"INT UNSIGNED","nullable":false,"primary_key":false},{"name":"active_customers","type":"INT UNSIGNED","nullable":true,"primary_key":false},{"name":"total_revenue","type":"DECIMAL(15,4)","nullable":true,"primary_key":false},{"name":"retained_pct","type":"DECIMAL(8,4)","nullable":true,"primary_key":false}],"plugin":{"slug":"customer-intelligence-for-woocommerce","name":"Customer Intelligence for WooCommerce","active_installs":0,"version":"1.0.0","wp_org_url":"https://wordpress.org/plugins/customer-intelligence-for-woocommerce/"}}