{"slug":"crmlytics","name":"CRMlytics – WooCommerce CRM & Customer Analytics","description":"Discover the gold mine that's your data. A WooCommerce CRM powered by machine learning to predict what's next and spot churn before they leave.","author":"ahriad","active_installs":0,"version":"1.0.2","wp_org_url":"https://wordpress.org/plugins/crmlytics/","is_closed":false,"cleanup":{"has_uninstall_hook":true,"drops_tables_on_uninstall":true,"deletes_options_on_uninstall":false},"tables":[{"table_name":"crmlytics_contact_tag_mapping","full_table_name":"wp_crmlytics_contact_tag_mapping","description":"Stores crmlytics contact tag mapping data created by this plugin.","detection_method":"static","confidence":"medium","columns":[{"name":"id","type":"BIGINT(20) UNSIGNED","nullable":true,"primary_key":true},{"name":"contact_id","type":"BIGINT(20) UNSIGNED","nullable":false,"primary_key":false},{"name":"tag_id","type":"SMALLINT(5) UNSIGNED","nullable":false,"primary_key":false},{"name":"source","type":"ENUM('manual','auto')","nullable":true,"primary_key":false},{"name":"created_at","type":"DATETIME","nullable":true,"primary_key":false}],"create_sql":"CREATE TABLE wp_crmlytics_contact_tag_mapping ( id BIGINT(20) UNSIGNED AUTO_INCREMENT PRIMARY KEY, contact_id BIGINT(20) UNSIGNED NOT NULL, tag_id SMALLINT(5) UNSIGNED NOT NULL, source ENUM('manual','auto') DEFAULT 'manual', created_at DATETIME, UNIQUE KEY contact_tag (contact_id, tag_id), INDEX idx_contact_id (contact_id), INDEX idx_tag_id (tag_id) ) $charset_collate;\"; dbDelta($sql);"},{"table_name":"crmlytics_contact_tags","full_table_name":"wp_crmlytics_contact_tags","description":"Stores crmlytics contact tags data created by this plugin.","detection_method":"static","confidence":"medium","columns":[{"name":"id","type":"SMALLINT(5) UNSIGNED","nullable":true,"primary_key":true},{"name":"tag_name","type":"VARCHAR(100)","nullable":false,"primary_key":false},{"name":"tag_slug","type":"VARCHAR(100)","nullable":false,"primary_key":false},{"name":"tag_color","type":"VARCHAR(7)","nullable":true,"primary_key":false},{"name":"tag_description","type":"TEXT","nullable":true,"primary_key":false},{"name":"auto_apply","type":"TINYINT(1)","nullable":true,"primary_key":false},{"name":"prune_non_matching","type":"TINYINT(1)","nullable":true,"primary_key":false},{"name":"rules","type":"JSON","nullable":true,"primary_key":false},{"name":"customer_count","type":"INT(10) UNSIGNED","nullable":true,"primary_key":false},{"name":"created_at","type":"DATETIME","nullable":true,"primary_key":false}],"create_sql":"CREATE TABLE wp_crmlytics_contact_tags ( id SMALLINT(5) UNSIGNED AUTO_INCREMENT PRIMARY KEY, tag_name VARCHAR(100) NOT NULL, tag_slug VARCHAR(100) NOT NULL, tag_color VARCHAR(7) DEFAULT '#0073aa', tag_description TEXT, auto_apply TINYINT(1) DEFAULT 0, prune_non_matching TINYINT(1) DEFAULT 0, rules JSON, customer_count INT(10) UNSIGNED DEFAULT 0, created_at DATETIME, UNIQUE KEY tag_slug (tag_slug) ) $charset_collate;\"; dbDelta($sql);"},{"table_name":"crmlytics_contact_timeline","full_table_name":"wp_crmlytics_contact_timeline","description":"Stores crmlytics contact timeline data created by this plugin.","detection_method":"static","confidence":"medium","columns":[{"name":"id","type":"BIGINT(20) UNSIGNED","nullable":true,"primary_key":true},{"name":"contact_id","type":"BIGINT(20) UNSIGNED","nullable":false,"primary_key":false},{"name":"event_type","type":"VARCHAR(50)","nullable":false,"primary_key":false},{"name":"event_title","type":"VARCHAR(255)","nullable":true,"primary_key":false},{"name":"event_data","type":"JSON","nullable":true,"primary_key":false},{"name":"event_description","type":"TEXT","nullable":true,"primary_key":false},{"name":"created_by","type":"BIGINT(20) UNSIGNED","nullable":true,"primary_key":false},{"name":"event_date","type":"DATETIME","nullable":false,"primary_key":false},{"name":"created_at","type":"DATETIME","nullable":true,"primary_key":false},{"name":"updated_at","type":"DATETIME","nullable":true,"primary_key":false}],"create_sql":"CREATE TABLE wp_crmlytics_contact_timeline ( id BIGINT(20) UNSIGNED AUTO_INCREMENT PRIMARY KEY, contact_id BIGINT(20) UNSIGNED NOT NULL, event_type VARCHAR(50) NOT NULL, event_title VARCHAR(255) DEFAULT '', event_data JSON, event_description TEXT, created_by BIGINT(20) UNSIGNED DEFAULT 0, event_date DATETIME NOT NULL, created_at DATETIME, updated_at DATETIME, INDEX idx_contact_id (contact_id), INDEX idx_event_type (event_type), INDEX idx_event_date (event_date), INDEX idx_contact_event_date (contact_id, event_date), INDEX idx_contact_type_date (contact_id, event_type, event_date), INDEX idx_created_by (created_by) ) $charset_collate;\"; dbDelta($sql);"},{"table_name":"crmlytics_contacts","full_table_name":"wp_crmlytics_contacts","description":"Stores crmlytics contacts data created by this plugin.","detection_method":"static","confidence":"medium","columns":[{"name":"id","type":"BIGINT(20) UNSIGNED","nullable":true,"primary_key":true},{"name":"wc_customer_id","type":"BIGINT(20) UNSIGNED","nullable":false,"primary_key":false},{"name":"email","type":"VARCHAR(100)","nullable":false,"primary_key":false},{"name":"first_name","type":"VARCHAR(100)","nullable":true,"primary_key":false},{"name":"last_name","type":"VARCHAR(100)","nullable":true,"primary_key":false},{"name":"phone","type":"VARCHAR(20)","nullable":true,"primary_key":false},{"name":"billing_company","type":"VARCHAR(100)","nullable":true,"primary_key":false},{"name":"billing_address_1","type":"TEXT","nullable":true,"primary_key":false},{"name":"billing_address_2","type":"TEXT","nullable":true,"primary_key":false},{"name":"billing_city","type":"VARCHAR(100)","nullable":true,"primary_key":false},{"name":"billing_state","type":"VARCHAR(100)","nullable":true,"primary_key":false},{"name":"billing_postcode","type":"VARCHAR(20)","nullable":true,"primary_key":false},{"name":"billing_country","type":"VARCHAR(10)","nullable":true,"primary_key":false},{"name":"shipping_address_1","type":"TEXT","nullable":true,"primary_key":false},{"name":"shipping_address_2","type":"TEXT","nullable":true,"primary_key":false},{"name":"shipping_city","type":"VARCHAR(100)","nullable":true,"primary_key":false},{"name":"shipping_state","type":"VARCHAR(100)","nullable":true,"primary_key":false},{"name":"shipping_postcode","type":"VARCHAR(20)","nullable":true,"primary_key":false},{"name":"shipping_country","type":"VARCHAR(10)","nullable":true,"primary_key":false},{"name":"created_at","type":"DATETIME","nullable":true,"primary_key":false},{"name":"updated_at","type":"DATETIME","nullable":true,"primary_key":false}],"create_sql":"CREATE TABLE wp_crmlytics_contacts ( id BIGINT(20) UNSIGNED AUTO_INCREMENT PRIMARY KEY, wc_customer_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, email VARCHAR(100) NOT NULL, first_name VARCHAR(100), last_name VARCHAR(100), phone VARCHAR(20), billing_company VARCHAR(100), billing_address_1 TEXT, billing_address_2 TEXT, billing_city VARCHAR(100), billing_state VARCHAR(100), billing_postcode VARCHAR(20), billing_country VARCHAR(10), shipping_address_1 TEXT, shipping_address_2 TEXT, shipping_city VARCHAR(100), shipping_state VARCHAR(100), shipping_postcode VARCHAR(20), shipping_country VARCHAR(10), created_at DATETIME, updated_at DATETIME, INDEX idx_email (email), INDEX idx_wc_customer_id (wc_customer_id) ) $charset_collate;\"; dbDelta($sql);"},{"table_name":"crmlytics_custom_field_values","full_table_name":"wp_crmlytics_custom_field_values","description":"Stores crmlytics custom field values data created by this plugin.","detection_method":"static","confidence":"medium","columns":[{"name":"id","type":"BIGINT(20) UNSIGNED","nullable":true,"primary_key":true},{"name":"contact_id","type":"BIGINT(20) UNSIGNED","nullable":false,"primary_key":false},{"name":"field_id","type":"BIGINT(20) UNSIGNED","nullable":false,"primary_key":false},{"name":"field_value","type":"TEXT","nullable":true,"primary_key":false},{"name":"created_at","type":"DATETIME","nullable":true,"primary_key":false},{"name":"updated_at","type":"DATETIME","nullable":true,"primary_key":false}],"create_sql":"CREATE TABLE wp_crmlytics_custom_field_values ( id BIGINT(20) UNSIGNED AUTO_INCREMENT PRIMARY KEY, contact_id BIGINT(20) UNSIGNED NOT NULL, field_id BIGINT(20) UNSIGNED NOT NULL, field_value TEXT, created_at DATETIME, updated_at DATETIME, INDEX idx_contact_id (contact_id), INDEX idx_field_id (field_id), UNIQUE KEY contact_field (contact_id, field_id) ) $charset_collate;\"; dbDelta($sql);"},{"table_name":"crmlytics_custom_fields","full_table_name":"wp_crmlytics_custom_fields","description":"Stores crmlytics custom fields data created by this plugin.","detection_method":"static","confidence":"medium","columns":[{"name":"id","type":"BIGINT(20) UNSIGNED","nullable":true,"primary_key":true},{"name":"field_name","type":"VARCHAR(255)","nullable":false,"primary_key":false},{"name":"field_label","type":"VARCHAR(255)","nullable":false,"primary_key":false},{"name":"field_type","type":"ENUM('text','textarea','number','yes_no','phone','url','date')","nullable":true,"primary_key":false},{"name":"field_options","type":"JSON","nullable":true,"primary_key":false},{"name":"is_required","type":"TINYINT(1)","nullable":true,"primary_key":false},{"name":"sort_order","type":"INT(10)","nullable":true,"primary_key":false},{"name":"is_active","type":"TINYINT(1)","nullable":true,"primary_key":false},{"name":"created_at","type":"DATETIME","nullable":true,"primary_key":false},{"name":"updated_at","type":"DATETIME","nullable":true,"primary_key":false}],"create_sql":"CREATE TABLE wp_crmlytics_custom_fields ( id BIGINT(20) UNSIGNED AUTO_INCREMENT PRIMARY KEY, field_name VARCHAR(255) NOT NULL, field_label VARCHAR(255) NOT NULL, field_type ENUM('text','textarea','number','yes_no','phone','url','date') DEFAULT 'text', field_options JSON, is_required TINYINT(1) DEFAULT 0, sort_order INT(10) DEFAULT 0, is_active TINYINT(1) DEFAULT 1, created_at DATETIME, updated_at DATETIME, UNIQUE KEY field_name (field_name) ) $charset_collate;\"; dbDelta($sql);"},{"table_name":"crmlytics_customer_products","full_table_name":"wp_crmlytics_customer_products","description":"Stores product records and related data.","detection_method":"static","confidence":"medium","columns":[{"name":"id","type":"BIGINT(20) UNSIGNED","nullable":true,"primary_key":true},{"name":"contact_id","type":"BIGINT(20) UNSIGNED","nullable":false,"primary_key":false},{"name":"product_id","type":"BIGINT(20) UNSIGNED","nullable":false,"primary_key":false},{"name":"product_name","type":"VARCHAR(255)","nullable":true,"primary_key":false},{"name":"quantity_purchased","type":"INT(10)","nullable":true,"primary_key":false},{"name":"total_spent","type":"DECIMAL(10,2)","nullable":true,"primary_key":false},{"name":"first_purchased","type":"DATETIME","nullable":true,"primary_key":false},{"name":"last_purchased","type":"DATETIME","nullable":true,"primary_key":false},{"name":"order_count","type":"INT(10)","nullable":true,"primary_key":false}],"create_sql":"CREATE TABLE wp_crmlytics_customer_products ( id BIGINT(20) UNSIGNED AUTO_INCREMENT PRIMARY KEY, contact_id BIGINT(20) UNSIGNED NOT NULL, product_id BIGINT(20) UNSIGNED NOT NULL, product_name VARCHAR(255), quantity_purchased INT(10) DEFAULT 0, total_spent DECIMAL(10,2) DEFAULT 0.00, first_purchased DATETIME, last_purchased DATETIME, order_count INT(10) DEFAULT 0, UNIQUE KEY contact_product (contact_id, product_id), INDEX idx_contact_id (contact_id), INDEX idx_product_id (product_id) ) $charset_collate;\"; dbDelta($sql);"},{"table_name":"crmlytics_customers","full_table_name":"wp_crmlytics_customers","description":"Stores crmlytics customers data created by this plugin.","detection_method":"static","confidence":"medium","columns":[{"name":"id","type":"BIGINT(20) UNSIGNED","nullable":true,"primary_key":true},{"name":"contact_id","type":"BIGINT(20) UNSIGNED","nullable":false,"primary_key":false},{"name":"total_orders","type":"INT(10) UNSIGNED","nullable":true,"primary_key":false},{"name":"total_spent","type":"DECIMAL(10,2)","nullable":true,"primary_key":false},{"name":"avg_order_value","type":"DECIMAL(10,2)","nullable":true,"primary_key":false},{"name":"first_order_date","type":"DATETIME","nullable":true,"primary_key":false},{"name":"last_order_date","type":"DATETIME","nullable":true,"primary_key":false},{"name":"health_score","type":"INT(3)","nullable":true,"primary_key":false},{"name":"churn_risk","type":"INT(3)","nullable":true,"primary_key":false},{"name":"rfm_score","type":"VARCHAR(3)","nullable":true,"primary_key":false}],"create_sql":"CREATE TABLE wp_crmlytics_customers ( id BIGINT(20) UNSIGNED AUTO_INCREMENT PRIMARY KEY, contact_id BIGINT(20) UNSIGNED NOT NULL, total_orders INT(10) UNSIGNED DEFAULT 0, total_spent DECIMAL(10,2) DEFAULT 0.00, avg_order_value DECIMAL(10,2) DEFAULT 0.00, first_order_date DATETIME, last_order_date DATETIME, health_score INT(3) DEFAULT 0, churn_risk INT(3) DEFAULT 0, rfm_score VARCHAR(3) DEFAULT '000', UNIQUE KEY contact_customer (contact_id), INDEX idx_total_spent (total_spent), INDEX idx_last_order (last_order_date), INDEX idx_health_score (health_score), INDEX idx_rfm_score (rfm_score) ) $charset_collate;\"; dbDelta($sql);"},{"table_name":"crmlytics_email_campaigns","full_table_name":"wp_crmlytics_email_campaigns","description":"Stores crmlytics email campaigns data created by this plugin.","detection_method":"static","confidence":"medium","columns":[{"name":"id","type":"BIGINT(20) UNSIGNED","nullable":true,"primary_key":true},{"name":"campaign_name","type":"VARCHAR(255)","nullable":false,"primary_key":false},{"name":"campaign_type","type":"ENUM('manual','automated')","nullable":true,"primary_key":false},{"name":"target_type","type":"ENUM('all','tags','segment')","nullable":true,"primary_key":false},{"name":"target_tags","type":"JSON","nullable":true,"primary_key":false},{"name":"target_segment_id","type":"BIGINT(20) UNSIGNED","nullable":true,"primary_key":false},{"name":"subject","type":"VARCHAR(255)","nullable":true,"primary_key":false},{"name":"preheader","type":"VARCHAR(255)","nullable":true,"primary_key":false},{"name":"body","type":"LONGTEXT","nullable":true,"primary_key":false},{"name":"template","type":"VARCHAR(50)","nullable":true,"primary_key":false},{"name":"utm_source","type":"VARCHAR(50)","nullable":true,"primary_key":false},{"name":"utm_medium","type":"VARCHAR(50)","nullable":true,"primary_key":false},{"name":"utm_campaign","type":"VARCHAR(100)","nullable":true,"primary_key":false},{"name":"recipient_count","type":"INT(10)","nullable":true,"primary_key":false},{"name":"sent_count","type":"INT(10)","nullable":true,"primary_key":false},{"name":"failed_count","type":"INT(10)","nullable":true,"primary_key":false},{"name":"click_count","type":"INT(10)","nullable":true,"primary_key":false},{"name":"status","type":"ENUM('draft','scheduled','sending','sent','paused')","nullable":true,"primary_key":false},{"name":"scheduled_at","type":"DATETIME","nullable":true,"primary_key":false},{"name":"sent_at","type":"DATETIME","nullable":true,"primary_key":false},{"name":"created_at","type":"DATETIME","nullable":true,"primary_key":false},{"name":"updated_at","type":"DATETIME","nullable":true,"primary_key":false}],"create_sql":"CREATE TABLE wp_crmlytics_email_campaigns ( id BIGINT(20) UNSIGNED AUTO_INCREMENT PRIMARY KEY, campaign_name VARCHAR(255) NOT NULL, campaign_type ENUM('manual','automated') DEFAULT 'manual', target_type ENUM('all','tags','segment') DEFAULT 'all', target_tags JSON, target_segment_id BIGINT(20) UNSIGNED, subject VARCHAR(255), preheader VARCHAR(255), body LONGTEXT, template VARCHAR(50) DEFAULT 'basic', utm_source VARCHAR(50) DEFAULT 'crmlytics', utm_medium VARCHAR(50) DEFAULT 'email', utm_campaign VARCHAR(100), recipient_count INT(10) DEFAULT 0, sent_count INT(10) DEFAULT 0, failed_count INT(10) DEFAULT 0, click_count INT(10) DEFAULT 0, status ENUM('draft','scheduled','sending','sent','paused') DEFAULT 'draft', scheduled_at DATETIME, sent_at DATETIME, created_at DATETIME, updated_at DATETIME ) $charset_collate;\"; dbDelta($sql);"},{"table_name":"crmlytics_email_tracking","full_table_name":"wp_crmlytics_email_tracking","description":"Stores crmlytics email tracking data created by this plugin.","detection_method":"static","confidence":"medium","columns":[{"name":"id","type":"BIGINT(20) UNSIGNED","nullable":true,"primary_key":true},{"name":"campaign_id","type":"BIGINT(20) UNSIGNED","nullable":false,"primary_key":false},{"name":"contact_id","type":"BIGINT(20) UNSIGNED","nullable":false,"primary_key":false},{"name":"email_to","type":"VARCHAR(255)","nullable":false,"primary_key":false},{"name":"subject","type":"VARCHAR(255)","nullable":true,"primary_key":false},{"name":"sent_at","type":"DATETIME","nullable":true,"primary_key":false},{"name":"clicked_at","type":"DATETIME","nullable":true,"primary_key":false}],"create_sql":"CREATE TABLE wp_crmlytics_email_tracking ( id BIGINT(20) UNSIGNED AUTO_INCREMENT PRIMARY KEY, campaign_id BIGINT(20) UNSIGNED NOT NULL, contact_id BIGINT(20) UNSIGNED NOT NULL, email_to VARCHAR(255) NOT NULL, subject VARCHAR(255), sent_at DATETIME, clicked_at DATETIME, INDEX idx_campaign_id (campaign_id), INDEX idx_contact_id (contact_id) ) $charset_collate;\"; dbDelta($sql);"},{"table_name":"crmlytics_segments","full_table_name":"wp_crmlytics_segments","description":"Stores crmlytics segments data created by this plugin.","detection_method":"static","confidence":"medium","columns":[{"name":"id","type":"SMALLINT(5) UNSIGNED","nullable":true,"primary_key":true},{"name":"segment_name","type":"VARCHAR(100)","nullable":false,"primary_key":false},{"name":"segment_slug","type":"VARCHAR(100)","nullable":false,"primary_key":false},{"name":"rules","type":"JSON","nullable":true,"primary_key":false},{"name":"created_at","type":"DATETIME","nullable":true,"primary_key":false},{"name":"updated_at","type":"DATETIME","nullable":true,"primary_key":false}],"create_sql":"CREATE TABLE wp_crmlytics_segments ( id SMALLINT(5) UNSIGNED AUTO_INCREMENT PRIMARY KEY, segment_name VARCHAR(100) NOT NULL, segment_slug VARCHAR(100) NOT NULL, rules JSON, created_at DATETIME, updated_at DATETIME, UNIQUE KEY segment_slug (segment_slug) ) $charset_collate;\"; dbDelta($sql);"}],"table_count":11}