webrlvr/agent_toolcall/intent_group_schema.json
2025-06-11 17:30:06 +08:00

454 lines
149 KiB
JSON

[
{
"intent_group_name": "Product Catalog Management",
"description": "Covers creating, reading, updating, and deleting products and their attributes (name, price, status, SKU, etc.).",
"intent_examples": [
"Enter a new product: Jacob Empowering Wind Jacket, white in color, priced at $144.45.",
"Adjust the price of Augusta Pullover Jacket-S-Orange by an increase of 34.",
"Change the status to disabled for the product 'Cora Parachute Pant'.",
"Collect all attributes for the 'Hera Pullover Hoodie-M-Green' product.",
"Obtain the ID information for all products where the name is 'Hero Hoodie' and the type is 'Configurable Product'.",
"Activate the status for products named 'Celeste Sports Bra' with the color specified as Purple.",
"Exhibit all the products.",
"Inspect the complete details of the product specified by SKU MSH01-32-Black.",
"Perform the 'Change status_Disable' action on the product 'Frankie Sweatshirt'.",
"Get the count of products with Type='Simple Product' and Status='Enable'.",
"List all price data for the product that has the SKU MSH01-32-Black."
],
"tables": [
{
"table_name": "catalog_product_entity",
"description": "The core table for all products, defining their basic type, SKU, and unique ID.",
"schema": "CREATE TABLE `catalog_product_entity` (\n `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',\n `attribute_set_id` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Attribute Set ID',\n `type_id` varchar(32) NOT NULL DEFAULT 'simple' COMMENT 'Type ID',\n `sku` varchar(64) NOT NULL COMMENT 'SKU',\n `has_options` smallint(6) NOT NULL DEFAULT 0 COMMENT 'Has Options',\n `required_options` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Required Options',\n `created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'Creation Time',\n `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'Update Time',\n PRIMARY KEY (`entity_id`),\n KEY `CATALOG_PRODUCT_ENTITY_ATTRIBUTE_SET_ID` (`attribute_set_id`),\n KEY `CATALOG_PRODUCT_ENTITY_SKU` (`sku`)\n) ENGINE=InnoDB AUTO_INCREMENT=2051 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Catalog Product Table';"
},
{
"table_name": "catalog_product_entity_varchar",
"description": "EAV table storing variable-length string attributes for products, such as name.",
"schema": "CREATE TABLE `catalog_product_entity_varchar` (\n `value_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Value ID',\n `attribute_id` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Attribute ID',\n `store_id` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Store ID',\n `entity_id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT 'Entity ID',\n `value` varchar(255) DEFAULT NULL COMMENT 'Value',\n PRIMARY KEY (`value_id`),\n UNIQUE KEY `CATALOG_PRODUCT_ENTITY_VARCHAR_ENTITY_ID_ATTRIBUTE_ID_STORE_ID` (`entity_id`,`attribute_id`,`store_id`),\n KEY `CATALOG_PRODUCT_ENTITY_VARCHAR_ATTRIBUTE_ID` (`attribute_id`),\n KEY `CATALOG_PRODUCT_ENTITY_VARCHAR_STORE_ID` (`store_id`),\n CONSTRAINT `CATALOG_PRODUCT_ENTITY_VARCHAR_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE CASCADE,\n CONSTRAINT `CAT_PRD_ENTT_VCHR_ATTR_ID_EAV_ATTR_ATTR_ID` FOREIGN KEY (`attribute_id`) REFERENCES `eav_attribute` (`attribute_id`) ON DELETE CASCADE,\n CONSTRAINT `CAT_PRD_ENTT_VCHR_ENTT_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE\n) ENGINE=InnoDB AUTO_INCREMENT=8445 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Catalog Product Varchar Attribute Backend Table';"
},
{
"table_name": "catalog_product_entity_decimal",
"description": "EAV table storing decimal value attributes for products, such as price and weight.",
"schema": "CREATE TABLE `catalog_product_entity_decimal` (\n `value_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Value ID',\n `attribute_id` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Attribute ID',\n `store_id` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Store ID',\n `entity_id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT 'Entity ID',\n `value` decimal(20,6) DEFAULT NULL COMMENT 'Value',\n PRIMARY KEY (`value_id`),\n UNIQUE KEY `CATALOG_PRODUCT_ENTITY_DECIMAL_ENTITY_ID_ATTRIBUTE_ID_STORE_ID` (`entity_id`,`attribute_id`,`store_id`),\n KEY `CATALOG_PRODUCT_ENTITY_DECIMAL_STORE_ID` (`store_id`),\n KEY `CATALOG_PRODUCT_ENTITY_DECIMAL_ATTRIBUTE_ID` (`attribute_id`),\n CONSTRAINT `CATALOG_PRODUCT_ENTITY_DECIMAL_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE CASCADE,\n CONSTRAINT `CAT_PRD_ENTT_DEC_ATTR_ID_EAV_ATTR_ATTR_ID` FOREIGN KEY (`attribute_id`) REFERENCES `eav_attribute` (`attribute_id`) ON DELETE CASCADE,\n CONSTRAINT `CAT_PRD_ENTT_DEC_ENTT_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE\n) ENGINE=InnoDB AUTO_INCREMENT=3914 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Catalog Product Decimal Attribute Backend Table';"
},
{
"table_name": "catalog_product_entity_int",
"description": "EAV table storing integer attributes for products, such as status and visibility.",
"schema": "CREATE TABLE `catalog_product_entity_int` (\n `value_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Value ID',\n `attribute_id` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Attribute ID',\n `store_id` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Store ID',\n `entity_id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT 'Entity ID',\n `value` int(11) DEFAULT NULL COMMENT 'Value',\n PRIMARY KEY (`value_id`),\n UNIQUE KEY `CATALOG_PRODUCT_ENTITY_INT_ENTITY_ID_ATTRIBUTE_ID_STORE_ID` (`entity_id`,`attribute_id`,`store_id`),\n KEY `CATALOG_PRODUCT_ENTITY_INT_ATTRIBUTE_ID` (`attribute_id`),\n KEY `CATALOG_PRODUCT_ENTITY_INT_STORE_ID` (`store_id`),\n KEY `CATALOG_PRODUCT_ENTITY_INT_ATTRIBUTE_ID_STORE_ID_VALUE` (`attribute_id`,`store_id`,`value`),\n CONSTRAINT `CATALOG_PRODUCT_ENTITY_INT_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE CASCADE,\n CONSTRAINT `CAT_PRD_ENTT_INT_ATTR_ID_EAV_ATTR_ATTR_ID` FOREIGN KEY (`attribute_id`) REFERENCES `eav_attribute` (`attribute_id`) ON DELETE CASCADE,\n CONSTRAINT `CAT_PRD_ENTT_INT_ENTT_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE\n) ENGINE=InnoDB AUTO_INCREMENT=25930 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Catalog Product Integer Attribute Backend Table';"
},
{
"table_name": "catalog_product_entity_text",
"description": "EAV table for long text attributes for products, such as description.",
"schema": "CREATE TABLE `catalog_product_entity_text` (\n `value_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Value ID',\n `attribute_id` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Attribute ID',\n `store_id` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Store ID',\n `entity_id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT 'Entity ID',\n `value` mediumtext DEFAULT NULL COMMENT 'Value',\n PRIMARY KEY (`value_id`),\n UNIQUE KEY `CATALOG_PRODUCT_ENTITY_TEXT_ENTITY_ID_ATTRIBUTE_ID_STORE_ID` (`entity_id`,`attribute_id`,`store_id`),\n KEY `CATALOG_PRODUCT_ENTITY_TEXT_ATTRIBUTE_ID` (`attribute_id`),\n KEY `CATALOG_PRODUCT_ENTITY_TEXT_STORE_ID` (`store_id`),\n CONSTRAINT `CATALOG_PRODUCT_ENTITY_TEXT_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE CASCADE,\n CONSTRAINT `CAT_PRD_ENTT_TEXT_ATTR_ID_EAV_ATTR_ATTR_ID` FOREIGN KEY (`attribute_id`) REFERENCES `eav_attribute` (`attribute_id`) ON DELETE CASCADE,\n CONSTRAINT `CAT_PRD_ENTT_TEXT_ENTT_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE\n) ENGINE=InnoDB AUTO_INCREMENT=2815 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Catalog Product Text Attribute Backend Table';"
},
{
"table_name": "catalog_category_product",
"description": "Linkage table connecting products to the categories they belong to.",
"schema": "CREATE TABLE `catalog_category_product` (\n `entity_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',\n `category_id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT 'Category ID',\n `product_id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT 'Product ID',\n `position` int(11) NOT NULL DEFAULT 0 COMMENT 'Position',\n PRIMARY KEY (`entity_id`,`category_id`,`product_id`),\n UNIQUE KEY `CATALOG_CATEGORY_PRODUCT_CATEGORY_ID_PRODUCT_ID` (`category_id`,`product_id`),\n KEY `CATALOG_CATEGORY_PRODUCT_PRODUCT_ID` (`product_id`),\n CONSTRAINT `CAT_CTGR_PRD_CTGR_ID_CAT_CTGR_ENTT_ENTT_ID` FOREIGN KEY (`category_id`) REFERENCES `catalog_category_entity` (`entity_id`) ON DELETE CASCADE,\n CONSTRAINT `CAT_CTGR_PRD_PRD_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`product_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE\n) ENGINE=InnoDB AUTO_INCREMENT=5166 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Catalog Product To Category Linkage Table';"
},
{
"table_name": "catalog_category_entity",
"description": "Core table for product categories, storing the hierarchical tree structure.",
"schema": "CREATE TABLE `catalog_category_entity` (\n `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',\n `attribute_set_id` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Attribute Set ID',\n `parent_id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT 'Parent Category ID',\n `created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'Creation Time',\n `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'Update Time',\n `path` varchar(255) NOT NULL COMMENT 'Tree Path',\n `position` int(11) NOT NULL COMMENT 'Position',\n `level` int(11) NOT NULL DEFAULT 0 COMMENT 'Tree Level',\n `children_count` int(11) NOT NULL COMMENT 'Child Count',\n PRIMARY KEY (`entity_id`),\n KEY `CATALOG_CATEGORY_ENTITY_LEVEL` (`level`),\n KEY `CATALOG_CATEGORY_ENTITY_PATH` (`path`)\n) ENGINE=InnoDB AUTO_INCREMENT=41 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Catalog Category Table';"
},
{
"table_name": "eav_attribute",
"description": "Defines all attributes that can be assigned to EAV entities (products, categories, customers).",
"schema": "CREATE TABLE `eav_attribute` (\n `attribute_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Attribute ID',\n `entity_type_id` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Entity Type ID',\n `attribute_code` varchar(255) NOT NULL COMMENT 'Attribute Code',\n `attribute_model` varchar(255) DEFAULT NULL COMMENT 'Attribute Model',\n `backend_model` varchar(255) DEFAULT NULL COMMENT 'Backend Model',\n `backend_type` varchar(8) NOT NULL DEFAULT 'static' COMMENT 'Backend Type',\n `backend_table` varchar(255) DEFAULT NULL COMMENT 'Backend Table',\n `frontend_model` varchar(255) DEFAULT NULL COMMENT 'Frontend Model',\n `frontend_input` varchar(50) DEFAULT NULL COMMENT 'Frontend Input',\n `frontend_label` varchar(255) DEFAULT NULL COMMENT 'Frontend Label',\n `frontend_class` varchar(255) DEFAULT NULL COMMENT 'Frontend Class',\n `source_model` varchar(255) DEFAULT NULL COMMENT 'Source Model',\n `is_required` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Defines Is Required',\n `is_user_defined` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Defines Is User Defined',\n `default_value` text DEFAULT NULL COMMENT 'Default Value',\n `is_unique` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Defines Is Unique',\n `note` varchar(255) DEFAULT NULL COMMENT 'Note',\n PRIMARY KEY (`attribute_id`),\n UNIQUE KEY `EAV_ATTRIBUTE_ENTITY_TYPE_ID_ATTRIBUTE_CODE` (`entity_type_id`,`attribute_code`),\n KEY `EAV_ATTRIBUTE_FRONTEND_INPUT_ENTITY_TYPE_ID_IS_USER_DEFINED` (`frontend_input`,`entity_type_id`,`is_user_defined`),\n CONSTRAINT `EAV_ATTRIBUTE_ENTITY_TYPE_ID_EAV_ENTITY_TYPE_ENTITY_TYPE_ID` FOREIGN KEY (`entity_type_id`) REFERENCES `eav_entity_type` (`entity_type_id`) ON DELETE CASCADE\n) ENGINE=InnoDB AUTO_INCREMENT=157 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Eav Attribute';"
},
{
"table_name": "eav_attribute_option",
"description": "Stores the option IDs for attributes that have a selection type (e.g., dropdown, multiselect).",
"schema": "CREATE TABLE `eav_attribute_option` (\n `option_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Option ID',\n `attribute_id` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Attribute ID',\n `sort_order` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Sort Order',\n PRIMARY KEY (`option_id`),\n KEY `EAV_ATTRIBUTE_OPTION_ATTRIBUTE_ID` (`attribute_id`),\n CONSTRAINT `EAV_ATTRIBUTE_OPTION_ATTRIBUTE_ID_EAV_ATTRIBUTE_ATTRIBUTE_ID` FOREIGN KEY (`attribute_id`) REFERENCES `eav_attribute` (`attribute_id`) ON DELETE CASCADE\n) ENGINE=InnoDB AUTO_INCREMENT=212 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Eav Attribute Option';"
},
{
"table_name": "eav_attribute_option_value",
"description": "Stores the actual display values for each attribute option, potentially different per store view.",
"schema": "CREATE TABLE `eav_attribute_option_value` (\n `value_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Value ID',\n `option_id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT 'Option ID',\n `store_id` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Store ID',\n `value` varchar(255) DEFAULT NULL COMMENT 'Value',\n PRIMARY KEY (`value_id`),\n KEY `EAV_ATTRIBUTE_OPTION_VALUE_OPTION_ID` (`option_id`),\n KEY `EAV_ATTRIBUTE_OPTION_VALUE_STORE_ID` (`store_id`),\n CONSTRAINT `EAV_ATTRIBUTE_OPTION_VALUE_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE CASCADE,\n CONSTRAINT `EAV_ATTR_OPT_VAL_OPT_ID_EAV_ATTR_OPT_OPT_ID` FOREIGN KEY (`option_id`) REFERENCES `eav_attribute_option` (`option_id`) ON DELETE CASCADE\n) ENGINE=InnoDB AUTO_INCREMENT=239 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Eav Attribute Option Value';"
},
{
"table_name": "eav_entity_type",
"description": "Defines the different entity types that use the EAV model, such as 'catalog_product'.",
"schema": "CREATE TABLE `eav_entity_type` (\n `entity_type_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity Type ID',\n `entity_type_code` varchar(50) NOT NULL COMMENT 'Entity Type Code',\n `entity_model` varchar(255) NOT NULL COMMENT 'Entity Model',\n `attribute_model` varchar(255) DEFAULT NULL COMMENT 'Attribute Model',\n `entity_table` varchar(255) DEFAULT NULL COMMENT 'Entity Table',\n `value_table_prefix` varchar(255) DEFAULT NULL COMMENT 'Value Table Prefix',\n `entity_id_field` varchar(255) DEFAULT NULL COMMENT 'Entity ID Field',\n `is_data_sharing` smallint(5) unsigned NOT NULL DEFAULT 1 COMMENT 'Defines Is Data Sharing',\n `data_sharing_key` varchar(100) DEFAULT 'default' COMMENT 'Data Sharing Key',\n `default_attribute_set_id` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Default Attribute Set ID',\n `increment_model` varchar(255) DEFAULT NULL COMMENT 'Increment Model',\n `increment_per_store` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Increment Per Store',\n `increment_pad_length` smallint(5) unsigned NOT NULL DEFAULT 8 COMMENT 'Increment Pad Length',\n `increment_pad_char` varchar(1) NOT NULL DEFAULT '0' COMMENT 'Increment Pad Char',\n `additional_attribute_table` varchar(255) DEFAULT NULL COMMENT 'Additional Attribute Table',\n `entity_attribute_collection` varchar(255) DEFAULT NULL COMMENT 'Entity Attribute Collection',\n PRIMARY KEY (`entity_type_id`),\n KEY `EAV_ENTITY_TYPE_ENTITY_TYPE_CODE` (`entity_type_code`)\n) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Eav Entity Type';"
},
{
"table_name": "catalog_eav_attribute",
"description": "Stores additional EAV settings specific to product attributes.",
"schema": "CREATE TABLE `catalog_eav_attribute` (\n `attribute_id` smallint(5) unsigned NOT NULL COMMENT 'Attribute ID',\n `frontend_input_renderer` varchar(255) DEFAULT NULL COMMENT 'Frontend Input Renderer',\n `is_global` smallint(5) unsigned NOT NULL DEFAULT 1 COMMENT 'Is Global',\n `is_visible` smallint(5) unsigned NOT NULL DEFAULT 1 COMMENT 'Is Visible',\n `is_searchable` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Is Searchable',\n `is_filterable` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Is Filterable',\n `is_comparable` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Is Comparable',\n `is_visible_on_front` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Is Visible On Front',\n `is_html_allowed_on_front` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Is HTML Allowed On Front',\n `is_used_for_price_rules` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Is Used For Price Rules',\n `is_filterable_in_search` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Is Filterable In Search',\n `used_in_product_listing` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Is Used In Product Listing',\n `used_for_sort_by` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Is Used For Sorting',\n `apply_to` varchar(255) DEFAULT NULL COMMENT 'Apply To',\n `is_visible_in_advanced_search` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Is Visible In Advanced Search',\n `position` int(11) NOT NULL DEFAULT 0 COMMENT 'Position',\n `is_wysiwyg_enabled` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Is WYSIWYG Enabled',\n `is_used_for_promo_rules` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Is Used For Promo Rules',\n `is_required_in_admin_store` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Is Required In Admin Store',\n `is_used_in_grid` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Is Used in Grid',\n `is_visible_in_grid` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Is Visible in Grid',\n `is_filterable_in_grid` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Is Filterable in Grid',\n `search_weight` float NOT NULL DEFAULT 1 COMMENT 'Search Weight',\n `is_pagebuilder_enabled` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Is PageBuilder Enabled',\n `additional_data` text DEFAULT NULL COMMENT 'Additional swatch attributes data',\n PRIMARY KEY (`attribute_id`),\n KEY `CATALOG_EAV_ATTRIBUTE_USED_FOR_SORT_BY` (`used_for_sort_by`),\n KEY `CATALOG_EAV_ATTRIBUTE_USED_IN_PRODUCT_LISTING` (`used_in_product_listing`),\n CONSTRAINT `CATALOG_EAV_ATTRIBUTE_ATTRIBUTE_ID_EAV_ATTRIBUTE_ATTRIBUTE_ID` FOREIGN KEY (`attribute_id`) REFERENCES `eav_attribute` (`attribute_id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Catalog EAV Attribute Table';"
},
{
"table_name": "store",
"description": "Defines individual store views, typically for different languages or presentations.",
"schema": "CREATE TABLE `store` (\n `store_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Store ID',\n `code` varchar(32) DEFAULT NULL COMMENT 'Code',\n `website_id` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Website ID',\n `group_id` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Group ID',\n `name` varchar(255) NOT NULL COMMENT 'Store Name',\n `sort_order` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Store Sort Order',\n `is_active` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Store Activity',\n PRIMARY KEY (`store_id`),\n UNIQUE KEY `STORE_CODE` (`code`),\n KEY `STORE_WEBSITE_ID` (`website_id`),\n KEY `STORE_IS_ACTIVE_SORT_ORDER` (`is_active`,`sort_order`),\n KEY `STORE_GROUP_ID` (`group_id`),\n CONSTRAINT `STORE_GROUP_ID_STORE_GROUP_GROUP_ID` FOREIGN KEY (`group_id`) REFERENCES `store_group` (`group_id`) ON DELETE CASCADE,\n CONSTRAINT `STORE_WEBSITE_ID_STORE_WEBSITE_WEBSITE_ID` FOREIGN KEY (`website_id`) REFERENCES `store_website` (`website_id`) ON DELETE CASCADE\n) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Stores';"
},
{
"table_name": "store_website",
"description": "Defines websites, the highest level in the store hierarchy, which can have separate customers and pricing.",
"schema": "CREATE TABLE `store_website` (\n `website_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Website ID',\n `code` varchar(32) DEFAULT NULL COMMENT 'Code',\n `name` varchar(64) DEFAULT NULL COMMENT 'Website Name',\n `sort_order` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Sort Order',\n `default_group_id` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Default Group ID',\n `is_default` smallint(5) unsigned DEFAULT 0 COMMENT 'Defines Is Website Default',\n PRIMARY KEY (`website_id`),\n UNIQUE KEY `STORE_WEBSITE_CODE` (`code`),\n KEY `STORE_WEBSITE_SORT_ORDER` (`sort_order`),\n KEY `STORE_WEBSITE_DEFAULT_GROUP_ID` (`default_group_id`)\n) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Websites';"
}
]
},
{
"intent_group_name": "Inventory Management",
"description": "Covers updating and querying product stock quantities.",
"intent_examples": [
"Now that 141 of Orestes Yoga Pant -33-Green are in, please update the inventory.",
"Mark all Zoltan Gym Tee items out of stock.",
"Update the attribute of all Typhon Performance Fleece-lined Jacket to in stock.",
"What is the current stock level for SKU '24-MB01'?",
"List all products with fewer than 10 items in stock.",
"Set the quantity of 'Aero-Tee' to 500.",
"Is the 'Summit Watch' in stock?",
"Decrease the stock of 'Yoga Mat' by 5 units.",
"Detail the Price for products that have only 3 units in stock.",
"Now that 139 of Nona Fitness Tank-M-Blue are in, please update the inventory."
],
"tables": [
{
"table_name": "cataloginventory_stock_item",
"description": "Manages stock information for each product, including quantity and in-stock status.",
"schema": "CREATE TABLE `cataloginventory_stock_item` (\n `item_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Item ID',\n `product_id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT 'Product ID',\n `stock_id` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Stock ID',\n `qty` decimal(12,4) DEFAULT NULL COMMENT 'Qty',\n `min_qty` decimal(12,4) NOT NULL DEFAULT 0.0000 COMMENT 'Min Qty',\n `use_config_min_qty` smallint(5) unsigned NOT NULL DEFAULT 1 COMMENT 'Use Config Min Qty',\n `is_qty_decimal` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Is Qty Decimal',\n `backorders` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Backorders',\n `use_config_backorders` smallint(5) unsigned NOT NULL DEFAULT 1 COMMENT 'Use Config Backorders',\n `min_sale_qty` decimal(12,4) NOT NULL DEFAULT 1.0000 COMMENT 'Min Sale Qty',\n `use_config_min_sale_qty` smallint(5) unsigned NOT NULL DEFAULT 1 COMMENT 'Use Config Min Sale Qty',\n `max_sale_qty` decimal(12,4) NOT NULL DEFAULT 0.0000 COMMENT 'Max Sale Qty',\n `use_config_max_sale_qty` smallint(5) unsigned NOT NULL DEFAULT 1 COMMENT 'Use Config Max Sale Qty',\n `is_in_stock` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Is In Stock',\n `low_stock_date` timestamp NULL DEFAULT NULL COMMENT 'Low Stock Date',\n `notify_stock_qty` decimal(12,4) DEFAULT NULL COMMENT 'Notify Stock Qty',\n `use_config_notify_stock_qty` smallint(5) unsigned NOT NULL DEFAULT 1 COMMENT 'Use Config Notify Stock Qty',\n `manage_stock` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Manage Stock',\n `use_config_manage_stock` smallint(5) unsigned NOT NULL DEFAULT 1 COMMENT 'Use Config Manage Stock',\n `stock_status_changed_auto` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Stock Status Changed Automatically',\n `use_config_qty_increments` smallint(5) unsigned NOT NULL DEFAULT 1 COMMENT 'Use Config Qty Increments',\n `qty_increments` decimal(12,4) NOT NULL DEFAULT 0.0000 COMMENT 'Qty Increments',\n `use_config_enable_qty_inc` smallint(5) unsigned NOT NULL DEFAULT 1 COMMENT 'Use Config Enable Qty Increments',\n `enable_qty_increments` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Enable Qty Increments',\n `is_decimal_divided` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Is Divided into Multiple Boxes for Shipping',\n `website_id` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Website ID',\n PRIMARY KEY (`item_id`),\n UNIQUE KEY `CATALOGINVENTORY_STOCK_ITEM_PRODUCT_ID_STOCK_ID` (`product_id`,`stock_id`),\n KEY `CATALOGINVENTORY_STOCK_ITEM_WEBSITE_ID` (`website_id`),\n KEY `CATALOGINVENTORY_STOCK_ITEM_WEBSITE_ID_PRODUCT_ID` (`website_id`,`product_id`),\n KEY `CATALOGINVENTORY_STOCK_ITEM_STOCK_ID` (`stock_id`),\n CONSTRAINT `CATINV_STOCK_ITEM_PRD_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`product_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE,\n CONSTRAINT `CATINV_STOCK_ITEM_STOCK_ID_CATINV_STOCK_STOCK_ID` FOREIGN KEY (`stock_id`) REFERENCES `cataloginventory_stock` (`stock_id`) ON DELETE CASCADE\n) ENGINE=InnoDB AUTO_INCREMENT=2051 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Cataloginventory Stock Item';"
},
{
"table_name": "catalog_product_entity",
"description": "The core table for all products, used to link inventory items back to a product SKU.",
"schema": "CREATE TABLE `catalog_product_entity` (\n `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',\n `attribute_set_id` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Attribute Set ID',\n `type_id` varchar(32) NOT NULL DEFAULT 'simple' COMMENT 'Type ID',\n `sku` varchar(64) NOT NULL COMMENT 'SKU',\n `has_options` smallint(6) NOT NULL DEFAULT 0 COMMENT 'Has Options',\n `required_options` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Required Options',\n `created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'Creation Time',\n `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'Update Time',\n PRIMARY KEY (`entity_id`),\n KEY `CATALOG_PRODUCT_ENTITY_ATTRIBUTE_SET_ID` (`attribute_set_id`),\n KEY `CATALOG_PRODUCT_ENTITY_SKU` (`sku`)\n) ENGINE=InnoDB AUTO_INCREMENT=2051 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Catalog Product Table';"
},
{
"table_name": "cataloginventory_stock",
"description": "Defines different stocks or sources of inventory.",
"schema": "CREATE TABLE `cataloginventory_stock` (\n `stock_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Stock ID',\n `website_id` smallint(5) unsigned NOT NULL COMMENT 'Website ID',\n `stock_name` varchar(255) DEFAULT NULL COMMENT 'Stock Name',\n PRIMARY KEY (`stock_id`),\n KEY `CATALOGINVENTORY_STOCK_WEBSITE_ID` (`website_id`)\n) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Cataloginventory Stock';"
}
]
},
{
"intent_group_name": "Customer Management",
"description": "Covers creating, reading, and updating customer information, including addresses, groups, and subscriptions.",
"intent_examples": [
"Insert a customer record with the details: First Name: Elizabeth, Last Name: Moore, Email: elizabeth.moore@yahoo.com.",
"Perform the action of assigning the 'Retailer' customer group to the customer named Ethan Garcia.",
"Unsubscribe customers in Hawaii from the newsletter.",
"List all customer phone numbers in the state of Arizona.",
"Collect the ID information for every customer in the ZIP code 84101.",
"Locate customers categorized under Group: General.",
"Retrieve the country information for the customer with the email samantha.nguyen@gmail.com.",
"Please provide the 'State/Province' information for all customers with a ZIP of 89109.",
"Search for customers who have been with us from January 1, 2023, to May 30, 2023.",
"Perform the action 'Unsubscribe from Newsletter' for the customer whose phone is 5107819902.",
"Add a customer profile for Nova Walker with the email address nova.walker@me.com."
],
"tables": [
{
"table_name": "customer_entity",
"description": "The core table for customer accounts, storing email, name, group, and address IDs.",
"schema": "CREATE TABLE `customer_entity` (\n `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',\n `website_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Website ID',\n `email` varchar(255) DEFAULT NULL COMMENT 'Email',\n `group_id` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Group ID',\n `increment_id` varchar(50) DEFAULT NULL COMMENT 'Increment ID',\n `store_id` smallint(5) unsigned DEFAULT 0 COMMENT 'Store ID',\n `created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'Created At',\n `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'Updated At',\n `is_active` smallint(5) unsigned NOT NULL DEFAULT 1 COMMENT 'Is Active',\n `disable_auto_group_change` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Disable automatic group change based on VAT ID',\n `created_in` varchar(255) DEFAULT NULL COMMENT 'Created From',\n `prefix` varchar(40) DEFAULT NULL COMMENT 'Name Prefix',\n `firstname` varchar(255) DEFAULT NULL COMMENT 'First Name',\n `middlename` varchar(255) DEFAULT NULL COMMENT 'Middle Name/Initial',\n `lastname` varchar(255) DEFAULT NULL COMMENT 'Last Name',\n `suffix` varchar(40) DEFAULT NULL COMMENT 'Name Suffix',\n `dob` date DEFAULT NULL COMMENT 'Date of Birth',\n `password_hash` varchar(128) DEFAULT NULL COMMENT 'Password_hash',\n `rp_token` varchar(128) DEFAULT NULL COMMENT 'Reset password token',\n `rp_token_created_at` datetime DEFAULT NULL COMMENT 'Reset password token creation time',\n `default_billing` int(10) unsigned DEFAULT NULL COMMENT 'Default Billing Address',\n `default_shipping` int(10) unsigned DEFAULT NULL COMMENT 'Default Shipping Address',\n `taxvat` varchar(50) DEFAULT NULL COMMENT 'Tax/VAT Number',\n `confirmation` varchar(64) DEFAULT NULL COMMENT 'Is Confirmed',\n `gender` smallint(5) unsigned DEFAULT NULL COMMENT 'Gender',\n `failures_num` smallint(6) DEFAULT 0 COMMENT 'Failure Number',\n `first_failure` timestamp NULL DEFAULT NULL COMMENT 'First Failure',\n `lock_expires` timestamp NULL DEFAULT NULL COMMENT 'Lock Expiration Date',\n `session_cutoff` timestamp NULL DEFAULT NULL COMMENT 'Session Cutoff Time',\n PRIMARY KEY (`entity_id`),\n UNIQUE KEY `CUSTOMER_ENTITY_EMAIL_WEBSITE_ID` (`email`,`website_id`),\n KEY `CUSTOMER_ENTITY_STORE_ID` (`store_id`),\n KEY `CUSTOMER_ENTITY_WEBSITE_ID` (`website_id`),\n KEY `CUSTOMER_ENTITY_FIRSTNAME` (`firstname`),\n KEY `CUSTOMER_ENTITY_LASTNAME` (`lastname`),\n CONSTRAINT `CUSTOMER_ENTITY_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE SET NULL,\n CONSTRAINT `CUSTOMER_ENTITY_WEBSITE_ID_STORE_WEBSITE_WEBSITE_ID` FOREIGN KEY (`website_id`) REFERENCES `store_website` (`website_id`) ON DELETE SET NULL\n) ENGINE=InnoDB AUTO_INCREMENT=86 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Customer Entity';"
},
{
"table_name": "customer_address_entity",
"description": "Stores all saved addresses for customers.",
"schema": "CREATE TABLE `customer_address_entity` (\n `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',\n `increment_id` varchar(50) DEFAULT NULL COMMENT 'Increment ID',\n `parent_id` int(10) unsigned DEFAULT NULL COMMENT 'Parent ID',\n `created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'Created At',\n `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'Updated At',\n `is_active` smallint(5) unsigned NOT NULL DEFAULT 1 COMMENT 'Is Active',\n `city` varchar(255) NOT NULL COMMENT 'City',\n `company` varchar(255) DEFAULT NULL COMMENT 'Company',\n `country_id` varchar(255) NOT NULL COMMENT 'Country',\n `fax` varchar(255) DEFAULT NULL COMMENT 'Fax',\n `firstname` varchar(255) NOT NULL COMMENT 'First Name',\n `lastname` varchar(255) NOT NULL COMMENT 'Last Name',\n `middlename` varchar(255) DEFAULT NULL COMMENT 'Middle Name',\n `postcode` varchar(255) DEFAULT NULL COMMENT 'Zip/Postal Code',\n `prefix` varchar(40) DEFAULT NULL COMMENT 'Name Prefix',\n `region` varchar(255) DEFAULT NULL COMMENT 'State/Province',\n `region_id` int(10) unsigned DEFAULT NULL COMMENT 'State/Province',\n `street` text NOT NULL COMMENT 'Street Address',\n `suffix` varchar(40) DEFAULT NULL COMMENT 'Name Suffix',\n `telephone` varchar(255) NOT NULL COMMENT 'Phone Number',\n `vat_id` varchar(255) DEFAULT NULL COMMENT 'VAT number',\n `vat_is_valid` int(10) unsigned DEFAULT NULL COMMENT 'VAT number validity',\n `vat_request_date` varchar(255) DEFAULT NULL COMMENT 'VAT number validation request date',\n `vat_request_id` varchar(255) DEFAULT NULL COMMENT 'VAT number validation request ID',\n `vat_request_success` int(10) unsigned DEFAULT NULL COMMENT 'VAT number validation request success',\n PRIMARY KEY (`entity_id`),\n KEY `CUSTOMER_ADDRESS_ENTITY_PARENT_ID` (`parent_id`),\n CONSTRAINT `CUSTOMER_ADDRESS_ENTITY_PARENT_ID_CUSTOMER_ENTITY_ENTITY_ID` FOREIGN KEY (`parent_id`) REFERENCES `customer_entity` (`entity_id`) ON DELETE CASCADE\n) ENGINE=InnoDB AUTO_INCREMENT=71 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Customer Address Entity';"
},
{
"table_name": "customer_group",
"description": "Defines customer groups such as General, Retailer, or Wholesale.",
"schema": "CREATE TABLE `customer_group` (\n `customer_group_id` int(10) unsigned NOT NULL AUTO_INCREMENT,\n `customer_group_code` varchar(32) NOT NULL COMMENT 'Customer Group Code',\n `tax_class_id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT 'Tax Class ID',\n PRIMARY KEY (`customer_group_id`)\n) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Customer Group';"
},
{
"table_name": "customer_grid_flat",
"description": "A denormalized table for fast loading of the customer grid in the admin panel.",
"schema": "CREATE TABLE `customer_grid_flat` (\n `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity ID',\n `name` text DEFAULT NULL COMMENT 'Name',\n `email` varchar(255) DEFAULT NULL COMMENT 'Email',\n `group_id` int(11) DEFAULT NULL COMMENT 'Group_id',\n `created_at` timestamp NULL DEFAULT NULL COMMENT 'Created_at',\n `website_id` int(11) DEFAULT NULL COMMENT 'Website_id',\n `confirmation` varchar(255) DEFAULT NULL COMMENT 'Confirmation',\n `created_in` text DEFAULT NULL COMMENT 'Created_in',\n `dob` date DEFAULT NULL COMMENT 'Dob',\n `gender` int(11) DEFAULT NULL COMMENT 'Gender',\n `taxvat` varchar(255) DEFAULT NULL COMMENT 'Taxvat',\n `lock_expires` timestamp NULL DEFAULT NULL COMMENT 'Lock_expires',\n `shipping_full` text DEFAULT NULL COMMENT 'Shipping_full',\n `billing_full` text DEFAULT NULL COMMENT 'Billing_full',\n `billing_firstname` varchar(255) DEFAULT NULL COMMENT 'Billing_firstname',\n `billing_lastname` varchar(255) DEFAULT NULL COMMENT 'Billing_lastname',\n `billing_telephone` varchar(255) DEFAULT NULL COMMENT 'Billing_telephone',\n `billing_postcode` varchar(255) DEFAULT NULL COMMENT 'Billing_postcode',\n `billing_country_id` varchar(255) DEFAULT NULL COMMENT 'Billing_country_id',\n `billing_region` varchar(255) DEFAULT NULL COMMENT 'Billing_region',\n `billing_region_id` int(11) DEFAULT NULL COMMENT 'Billing_region_id',\n `billing_street` varchar(255) DEFAULT NULL COMMENT 'Billing_street',\n `billing_city` varchar(255) DEFAULT NULL COMMENT 'Billing_city',\n `billing_fax` varchar(255) DEFAULT NULL COMMENT 'Billing_fax',\n `billing_vat_id` varchar(255) DEFAULT NULL COMMENT 'Billing_vat_id',\n `billing_company` varchar(255) DEFAULT NULL COMMENT 'Billing_company',\n PRIMARY KEY (`entity_id`),\n KEY `CUSTOMER_GRID_FLAT_GROUP_ID` (`group_id`),\n KEY `CUSTOMER_GRID_FLAT_CREATED_AT` (`created_at`),\n KEY `CUSTOMER_GRID_FLAT_WEBSITE_ID` (`website_id`),\n KEY `CUSTOMER_GRID_FLAT_CONFIRMATION` (`confirmation`),\n KEY `CUSTOMER_GRID_FLAT_DOB` (`dob`),\n KEY `CUSTOMER_GRID_FLAT_GENDER` (`gender`),\n KEY `CUSTOMER_GRID_FLAT_BILLING_COUNTRY_ID` (`billing_country_id`),\n FULLTEXT KEY `FTI_8746F705702DD5F6D45B8C7CE7FE9F2F` (`name`,`email`,`created_in`,`taxvat`,`shipping_full`,`billing_full`,`billing_firstname`,`billing_lastname`,`billing_telephone`,`billing_postcode`,`billing_region`,`billing_city`,`billing_fax`,`billing_company`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='customer_grid_flat';"
},
{
"table_name": "directory_country",
"description": "Stores country information, including ISO codes.",
"schema": "CREATE TABLE `directory_country` (\n `country_id` varchar(2) NOT NULL COMMENT 'Country ID in ISO-2',\n `iso2_code` varchar(2) DEFAULT NULL COMMENT 'Country ISO-2 format',\n `iso3_code` varchar(3) DEFAULT NULL COMMENT 'Country ISO-3',\n PRIMARY KEY (`country_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Directory Country';"
},
{
"table_name": "directory_country_region",
"description": "Stores regions, states, or provinces for each country.",
"schema": "CREATE TABLE `directory_country_region` (\n `region_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Region ID',\n `country_id` varchar(4) NOT NULL DEFAULT '0' COMMENT 'Country ID in ISO-2',\n `code` varchar(32) DEFAULT NULL COMMENT 'Region code',\n `default_name` varchar(255) DEFAULT NULL COMMENT 'Region Name',\n PRIMARY KEY (`region_id`),\n KEY `DIRECTORY_COUNTRY_REGION_COUNTRY_ID` (`country_id`)\n) ENGINE=InnoDB AUTO_INCREMENT=1122 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Directory Country Region';"
},
{
"table_name": "store",
"description": "Defines individual store views, typically for different languages or presentations.",
"schema": "CREATE TABLE `store` (\n `store_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Store ID',\n `code` varchar(32) DEFAULT NULL COMMENT 'Code',\n `website_id` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Website ID',\n `group_id` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Group ID',\n `name` varchar(255) NOT NULL COMMENT 'Store Name',\n `sort_order` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Store Sort Order',\n `is_active` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Store Activity',\n PRIMARY KEY (`store_id`),\n UNIQUE KEY `STORE_CODE` (`code`),\n KEY `STORE_WEBSITE_ID` (`website_id`),\n KEY `STORE_IS_ACTIVE_SORT_ORDER` (`is_active`,`sort_order`),\n KEY `STORE_GROUP_ID` (`group_id`),\n CONSTRAINT `STORE_GROUP_ID_STORE_GROUP_GROUP_ID` FOREIGN KEY (`group_id`) REFERENCES `store_group` (`group_id`) ON DELETE CASCADE,\n CONSTRAINT `STORE_WEBSITE_ID_STORE_WEBSITE_WEBSITE_ID` FOREIGN KEY (`website_id`) REFERENCES `store_website` (`website_id`) ON DELETE CASCADE\n) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Stores';"
},
{
"table_name": "store_website",
"description": "Defines websites, the highest level in the store hierarchy, which can have separate customers and pricing.",
"schema": "CREATE TABLE `store_website` (\n `website_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Website ID',\n `code` varchar(32) DEFAULT NULL COMMENT 'Code',\n `name` varchar(64) DEFAULT NULL COMMENT 'Website Name',\n `sort_order` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Sort Order',\n `default_group_id` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Default Group ID',\n `is_default` smallint(5) unsigned DEFAULT 0 COMMENT 'Defines Is Website Default',\n PRIMARY KEY (`website_id`),\n UNIQUE KEY `STORE_WEBSITE_CODE` (`code`),\n KEY `STORE_WEBSITE_SORT_ORDER` (`sort_order`),\n KEY `STORE_WEBSITE_DEFAULT_GROUP_ID` (`default_group_id`)\n) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Websites';"
}
]
},
{
"intent_group_name": "Order & Transaction Management",
"description": "Covers querying orders, modifying order status (hold, cancel), updating addresses, and finding orders based on specific criteria.",
"intent_examples": [
"Execute a hold action on the order with ID 000000072.",
"Display orders with 'Bill-to Name' as Veronica Costello, sorted by total amount in descending order.",
"Update the address for order ID 000000022 to 267 Hemlock Avenue, Fayetteville, Arkansas, 91680.",
"Carry out the cancellation of the order that falls seventh from the latest in terms of date.",
"Search for orders with a grand total (base) ranging from 81.6 to 269.7.",
"Check the detailed information of the order with the second latest date.",
"Please find the billing name and order id of the newest pending order.",
"Show all pending orders and order them from earliest to latest date.",
"Get the 'Bill-to Name' details for the order identified by ID 000000174.",
"Perform the 'Unhold' action on the third through eighth orders with the smallest sales volumes.",
"Look up orders with a range of grand total purchases from 43.4 to 203.3, destined for Olivia Lee."
],
"tables": [
{
"table_name": "sales_order",
"description": "The core table for all placed orders, containing totals, status, customer info, and addresses.",
"schema": "CREATE TABLE `sales_order` (\n `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',\n `state` varchar(32) DEFAULT NULL COMMENT 'State',\n `status` varchar(32) DEFAULT NULL COMMENT 'Status',\n `coupon_code` varchar(255) DEFAULT NULL COMMENT 'Coupon Code',\n `protect_code` varchar(255) DEFAULT NULL COMMENT 'Protect Code',\n `shipping_description` varchar(255) DEFAULT NULL COMMENT 'Shipping Description',\n `is_virtual` smallint(5) unsigned DEFAULT NULL COMMENT 'Is Virtual',\n `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store ID',\n `customer_id` int(10) unsigned DEFAULT NULL COMMENT 'Customer ID',\n `base_discount_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Amount',\n `base_discount_canceled` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Canceled',\n `base_discount_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Invoiced',\n `base_discount_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Refunded',\n `base_grand_total` decimal(20,4) DEFAULT NULL COMMENT 'Base Grand Total',\n `base_shipping_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Amount',\n `base_shipping_canceled` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Canceled',\n `base_shipping_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Invoiced',\n `base_shipping_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Refunded',\n `base_shipping_tax_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Tax Amount',\n `base_shipping_tax_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Tax Refunded',\n `base_subtotal` decimal(20,4) DEFAULT NULL COMMENT 'Base Subtotal',\n `base_subtotal_canceled` decimal(20,4) DEFAULT NULL COMMENT 'Base Subtotal Canceled',\n `base_subtotal_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Base Subtotal Invoiced',\n `base_subtotal_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Subtotal Refunded',\n `base_tax_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Tax Amount',\n `base_tax_canceled` decimal(20,4) DEFAULT NULL COMMENT 'Base Tax Canceled',\n `base_tax_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Base Tax Invoiced',\n `base_tax_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Tax Refunded',\n `base_to_global_rate` decimal(20,4) DEFAULT NULL COMMENT 'Base To Global Rate',\n `base_to_order_rate` decimal(20,4) DEFAULT NULL COMMENT 'Base To Order Rate',\n `base_total_canceled` decimal(20,4) DEFAULT NULL COMMENT 'Base Total Canceled',\n `base_total_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Base Total Invoiced',\n `base_total_invoiced_cost` decimal(20,4) DEFAULT NULL COMMENT 'Base Total Invoiced Cost',\n `base_total_offline_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Total Offline Refunded',\n `base_total_online_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Total Online Refunded',\n `base_total_paid` decimal(20,4) DEFAULT NULL COMMENT 'Base Total Paid',\n `base_total_qty_ordered` decimal(12,4) DEFAULT NULL COMMENT 'Base Total Qty Ordered',\n `base_total_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Total Refunded',\n `discount_amount` decimal(20,4) DEFAULT NULL COMMENT 'Discount Amount',\n `discount_canceled` decimal(20,4) DEFAULT NULL COMMENT 'Discount Canceled',\n `discount_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Discount Invoiced',\n `discount_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Discount Refunded',\n `grand_total` decimal(20,4) DEFAULT NULL COMMENT 'Grand Total',\n `shipping_amount` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Amount',\n `shipping_canceled` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Canceled',\n `shipping_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Invoiced',\n `shipping_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Refunded',\n `shipping_tax_amount` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Tax Amount',\n `shipping_tax_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Tax Refunded',\n `store_to_base_rate` decimal(12,4) DEFAULT NULL COMMENT 'Store To Base Rate',\n `store_to_order_rate` decimal(12,4) DEFAULT NULL COMMENT 'Store To Order Rate',\n `subtotal` decimal(20,4) DEFAULT NULL COMMENT 'Subtotal',\n `subtotal_canceled` decimal(20,4) DEFAULT NULL COMMENT 'Subtotal Canceled',\n `subtotal_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Subtotal Invoiced',\n `subtotal_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Subtotal Refunded',\n `tax_amount` decimal(20,4) DEFAULT NULL COMMENT 'Tax Amount',\n `tax_canceled` decimal(20,4) DEFAULT NULL COMMENT 'Tax Canceled',\n `tax_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Tax Invoiced',\n `tax_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Tax Refunded',\n `total_canceled` decimal(20,4) DEFAULT NULL COMMENT 'Total Canceled',\n `total_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Total Invoiced',\n `total_offline_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Total Offline Refunded',\n `total_online_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Total Online Refunded',\n `total_paid` decimal(20,4) DEFAULT NULL COMMENT 'Total Paid',\n `total_qty_ordered` decimal(12,4) DEFAULT NULL COMMENT 'Total Qty Ordered',\n `total_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Total Refunded',\n `can_ship_partially` smallint(5) unsigned DEFAULT NULL COMMENT 'Can Ship Partially',\n `can_ship_partially_item` smallint(5) unsigned DEFAULT NULL COMMENT 'Can Ship Partially Item',\n `customer_is_guest` smallint(5) unsigned DEFAULT NULL COMMENT 'Customer Is Guest',\n `customer_note_notify` smallint(5) unsigned DEFAULT NULL COMMENT 'Customer Note Notify',\n `billing_address_id` int(11) DEFAULT NULL COMMENT 'Billing Address ID',\n `customer_group_id` int(11) DEFAULT NULL,\n `edit_increment` int(11) DEFAULT NULL COMMENT 'Edit Increment',\n `email_sent` smallint(5) unsigned DEFAULT NULL COMMENT 'Email Sent',\n `send_email` smallint(5) unsigned DEFAULT NULL COMMENT 'Send Email',\n `forced_shipment_with_invoice` smallint(5) unsigned DEFAULT NULL COMMENT 'Forced Do Shipment With Invoice',\n `payment_auth_expiration` int(11) DEFAULT NULL COMMENT 'Payment Authorization Expiration',\n `quote_address_id` int(11) DEFAULT NULL COMMENT 'Quote Address ID',\n `quote_id` int(11) DEFAULT NULL COMMENT 'Quote ID',\n `shipping_address_id` int(11) DEFAULT NULL COMMENT 'Shipping Address ID',\n `adjustment_negative` decimal(20,4) DEFAULT NULL COMMENT 'Adjustment Negative',\n `adjustment_positive` decimal(20,4) DEFAULT NULL COMMENT 'Adjustment Positive',\n `base_adjustment_negative` decimal(20,4) DEFAULT NULL COMMENT 'Base Adjustment Negative',\n `base_adjustment_positive` decimal(20,4) DEFAULT NULL COMMENT 'Base Adjustment Positive',\n `base_shipping_discount_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Discount Amount',\n `base_subtotal_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Base Subtotal Incl Tax',\n `base_total_due` decimal(20,4) DEFAULT NULL COMMENT 'Base Total Due',\n `payment_authorization_amount` decimal(20,4) DEFAULT NULL COMMENT 'Payment Authorization Amount',\n `shipping_discount_amount` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Discount Amount',\n `subtotal_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Subtotal Incl Tax',\n `total_due` decimal(20,4) DEFAULT NULL COMMENT 'Total Due',\n `weight` decimal(12,4) DEFAULT NULL COMMENT 'Weight',\n `customer_dob` datetime DEFAULT NULL COMMENT 'Customer Dob',\n `increment_id` varchar(50) DEFAULT NULL COMMENT 'Increment ID',\n `applied_rule_ids` varchar(128) DEFAULT NULL COMMENT 'Applied Rule Ids',\n `base_currency_code` varchar(3) DEFAULT NULL COMMENT 'Base Currency Code',\n `customer_email` varchar(128) DEFAULT NULL COMMENT 'Customer Email',\n `customer_firstname` varchar(128) DEFAULT NULL COMMENT 'Customer Firstname',\n `customer_lastname` varchar(128) DEFAULT NULL COMMENT 'Customer Lastname',\n `customer_middlename` varchar(128) DEFAULT NULL COMMENT 'Customer Middlename',\n `customer_prefix` varchar(32) DEFAULT NULL COMMENT 'Customer Prefix',\n `customer_suffix` varchar(32) DEFAULT NULL COMMENT 'Customer Suffix',\n `customer_taxvat` varchar(32) DEFAULT NULL COMMENT 'Customer Taxvat',\n `discount_description` varchar(255) DEFAULT NULL COMMENT 'Discount Description',\n `ext_customer_id` varchar(32) DEFAULT NULL COMMENT 'Ext Customer ID',\n `ext_order_id` varchar(32) DEFAULT NULL COMMENT 'Ext Order ID',\n `global_currency_code` varchar(3) DEFAULT NULL COMMENT 'Global Currency Code',\n `hold_before_state` varchar(32) DEFAULT NULL COMMENT 'Hold Before State',\n `hold_before_status` varchar(32) DEFAULT NULL COMMENT 'Hold Before Status',\n `order_currency_code` varchar(3) DEFAULT NULL COMMENT 'Order Currency Code',\n `original_increment_id` varchar(50) DEFAULT NULL COMMENT 'Original Increment ID',\n `relation_child_id` varchar(32) DEFAULT NULL COMMENT 'Relation Child ID',\n `relation_child_real_id` varchar(32) DEFAULT NULL COMMENT 'Relation Child Real ID',\n `relation_parent_id` varchar(32) DEFAULT NULL COMMENT 'Relation Parent ID',\n `relation_parent_real_id` varchar(32) DEFAULT NULL COMMENT 'Relation Parent Real ID',\n `remote_ip` varchar(45) DEFAULT NULL COMMENT 'Remote Ip',\n `shipping_method` varchar(120) DEFAULT NULL,\n `store_currency_code` varchar(3) DEFAULT NULL COMMENT 'Store Currency Code',\n `store_name` varchar(255) DEFAULT NULL COMMENT 'Store Name',\n `x_forwarded_for` varchar(255) DEFAULT NULL COMMENT 'X Forwarded For',\n `customer_note` text DEFAULT NULL COMMENT 'Customer Note',\n `created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'Created At',\n `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'Updated At',\n `total_item_count` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Total Item Count',\n `customer_gender` int(11) DEFAULT NULL COMMENT 'Customer Gender',\n `discount_tax_compensation_amount` decimal(20,4) DEFAULT NULL COMMENT 'Discount Tax Compensation Amount',\n `base_discount_tax_compensation_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Tax Compensation Amount',\n `shipping_discount_tax_compensation_amount` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Discount Tax Compensation Amount',\n `base_shipping_discount_tax_compensation_amnt` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Discount Tax Compensation Amount',\n `discount_tax_compensation_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Discount Tax Compensation Invoiced',\n `base_discount_tax_compensation_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Tax Compensation Invoiced',\n `discount_tax_compensation_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Discount Tax Compensation Refunded',\n `base_discount_tax_compensation_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Tax Compensation Refunded',\n `shipping_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Incl Tax',\n `base_shipping_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Incl Tax',\n `coupon_rule_name` varchar(255) DEFAULT NULL COMMENT 'Coupon Sales Rule Name',\n `gift_message_id` int(11) DEFAULT NULL COMMENT 'Gift Message ID',\n `paypal_ipn_customer_notified` int(11) DEFAULT 0 COMMENT 'Paypal Ipn Customer Notified',\n PRIMARY KEY (`entity_id`),\n UNIQUE KEY `SALES_ORDER_INCREMENT_ID_STORE_ID` (`increment_id`,`store_id`),\n KEY `SALES_ORDER_STATUS` (`status`),\n KEY `SALES_ORDER_STATE` (`state`),\n KEY `SALES_ORDER_STORE_ID` (`store_id`),\n KEY `SALES_ORDER_CREATED_AT` (`created_at`),\n KEY `SALES_ORDER_CUSTOMER_ID` (`customer_id`),\n KEY `SALES_ORDER_EXT_ORDER_ID` (`ext_order_id`),\n KEY `SALES_ORDER_QUOTE_ID` (`quote_id`),\n KEY `SALES_ORDER_UPDATED_AT` (`updated_at`),\n KEY `SALES_ORDER_SEND_EMAIL` (`send_email`),\n KEY `SALES_ORDER_EMAIL_SENT` (`email_sent`),\n CONSTRAINT `SALES_ORDER_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID` FOREIGN KEY (`customer_id`) REFERENCES `customer_entity` (`entity_id`) ON DELETE SET NULL,\n CONSTRAINT `SALES_ORDER_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE SET NULL\n) ENGINE=InnoDB AUTO_INCREMENT=309 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Sales Flat Order';"
},
{
"table_name": "sales_order_item",
"description": "Stores the individual items (products) within each order.",
"schema": "CREATE TABLE `sales_order_item` (\n `item_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Item ID',\n `order_id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT 'Order ID',\n `parent_item_id` int(10) unsigned DEFAULT NULL COMMENT 'Parent Item ID',\n `quote_item_id` int(10) unsigned DEFAULT NULL COMMENT 'Quote Item ID',\n `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store ID',\n `created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'Created At',\n `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'Updated At',\n `product_id` int(10) unsigned DEFAULT NULL COMMENT 'Product ID',\n `product_type` varchar(255) DEFAULT NULL COMMENT 'Product Type',\n `product_options` longtext DEFAULT NULL COMMENT 'Product Options',\n `weight` decimal(12,4) DEFAULT 0.0000 COMMENT 'Weight',\n `is_virtual` smallint(5) unsigned DEFAULT NULL COMMENT 'Is Virtual',\n `sku` varchar(255) DEFAULT NULL COMMENT 'Sku',\n `name` varchar(255) DEFAULT NULL COMMENT 'Name',\n `description` text DEFAULT NULL COMMENT 'Description',\n `applied_rule_ids` text DEFAULT NULL COMMENT 'Applied Rule Ids',\n `additional_data` text DEFAULT NULL COMMENT 'Additional Data',\n `is_qty_decimal` smallint(5) unsigned DEFAULT NULL COMMENT 'Is Qty Decimal',\n `no_discount` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'No Discount',\n `qty_backordered` decimal(12,4) DEFAULT 0.0000 COMMENT 'Qty Backordered',\n `qty_canceled` decimal(12,4) DEFAULT 0.0000 COMMENT 'Qty Canceled',\n `qty_invoiced` decimal(12,4) DEFAULT 0.0000 COMMENT 'Qty Invoiced',\n `qty_ordered` decimal(12,4) DEFAULT 0.0000 COMMENT 'Qty Ordered',\n `qty_refunded` decimal(12,4) DEFAULT 0.0000 COMMENT 'Qty Refunded',\n `qty_shipped` decimal(12,4) DEFAULT 0.0000 COMMENT 'Qty Shipped',\n `base_cost` decimal(12,4) DEFAULT 0.0000 COMMENT 'Base Cost',\n `price` decimal(12,4) NOT NULL DEFAULT 0.0000 COMMENT 'Price',\n `base_price` decimal(12,4) NOT NULL DEFAULT 0.0000 COMMENT 'Base Price',\n `original_price` decimal(12,4) DEFAULT NULL COMMENT 'Original Price',\n `base_original_price` decimal(12,4) DEFAULT NULL COMMENT 'Base Original Price',\n `tax_percent` decimal(12,4) DEFAULT 0.0000 COMMENT 'Tax Percent',\n `tax_amount` decimal(20,4) DEFAULT 0.0000 COMMENT 'Tax Amount',\n `base_tax_amount` decimal(20,4) DEFAULT 0.0000 COMMENT 'Base Tax Amount',\n `tax_invoiced` decimal(20,4) DEFAULT 0.0000 COMMENT 'Tax Invoiced',\n `base_tax_invoiced` decimal(20,4) DEFAULT 0.0000 COMMENT 'Base Tax Invoiced',\n `discount_percent` decimal(12,4) DEFAULT 0.0000 COMMENT 'Discount Percent',\n `discount_amount` decimal(20,4) DEFAULT 0.0000 COMMENT 'Discount Amount',\n `base_discount_amount` decimal(20,4) DEFAULT 0.0000 COMMENT 'Base Discount Amount',\n `discount_invoiced` decimal(20,4) DEFAULT 0.0000 COMMENT 'Discount Invoiced',\n `base_discount_invoiced` decimal(20,4) DEFAULT 0.0000 COMMENT 'Base Discount Invoiced',\n `amount_refunded` decimal(20,4) DEFAULT 0.0000 COMMENT 'Amount Refunded',\n `base_amount_refunded` decimal(20,4) DEFAULT 0.0000 COMMENT 'Base Amount Refunded',\n `row_total` decimal(20,4) NOT NULL DEFAULT 0.0000 COMMENT 'Row Total',\n `base_row_total` decimal(20,4) NOT NULL DEFAULT 0.0000 COMMENT 'Base Row Total',\n `row_invoiced` decimal(20,4) NOT NULL DEFAULT 0.0000 COMMENT 'Row Invoiced',\n `base_row_invoiced` decimal(20,4) NOT NULL DEFAULT 0.0000 COMMENT 'Base Row Invoiced',\n `row_weight` decimal(12,4) DEFAULT 0.0000 COMMENT 'Row Weight',\n `base_tax_before_discount` decimal(20,4) DEFAULT NULL COMMENT 'Base Tax Before Discount',\n `tax_before_discount` decimal(20,4) DEFAULT NULL COMMENT 'Tax Before Discount',\n `ext_order_item_id` varchar(255) DEFAULT NULL COMMENT 'Ext Order Item ID',\n `locked_do_invoice` smallint(5) unsigned DEFAULT NULL COMMENT 'Locked Do Invoice',\n `locked_do_ship` smallint(5) unsigned DEFAULT NULL COMMENT 'Locked Do Ship',\n `price_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Price Incl Tax',\n `base_price_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Base Price Incl Tax',\n `row_total_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Row Total Incl Tax',\n `base_row_total_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Base Row Total Incl Tax',\n `discount_tax_compensation_amount` decimal(20,4) DEFAULT NULL COMMENT 'Discount Tax Compensation Amount',\n `base_discount_tax_compensation_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Tax Compensation Amount',\n `discount_tax_compensation_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Discount Tax Compensation Invoiced',\n `base_discount_tax_compensation_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Tax Compensation Invoiced',\n `discount_tax_compensation_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Discount Tax Compensation Refunded',\n `base_discount_tax_compensation_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Tax Compensation Refunded',\n `tax_canceled` decimal(12,4) DEFAULT NULL COMMENT 'Tax Canceled',\n `discount_tax_compensation_canceled` decimal(20,4) DEFAULT NULL COMMENT 'Discount Tax Compensation Canceled',\n `tax_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Tax Refunded',\n `base_tax_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Tax Refunded',\n `discount_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Discount Refunded',\n `base_discount_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Refunded',\n `gift_message_id` int(11) DEFAULT NULL COMMENT 'Gift Message ID',\n `gift_message_available` int(11) DEFAULT NULL COMMENT 'Gift Message Available',\n `free_shipping` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Free Shipping',\n `weee_tax_applied` text DEFAULT NULL COMMENT 'Weee Tax Applied',\n `weee_tax_applied_amount` decimal(12,4) DEFAULT NULL COMMENT 'Weee Tax Applied Amount',\n `weee_tax_applied_row_amount` decimal(12,4) DEFAULT NULL COMMENT 'Weee Tax Applied Row Amount',\n `weee_tax_disposition` decimal(12,4) DEFAULT NULL COMMENT 'Weee Tax Disposition',\n `weee_tax_row_disposition` decimal(12,4) DEFAULT NULL COMMENT 'Weee Tax Row Disposition',\n `base_weee_tax_applied_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Weee Tax Applied Amount',\n `base_weee_tax_applied_row_amnt` decimal(12,4) DEFAULT NULL COMMENT 'Base Weee Tax Applied Row Amnt',\n `base_weee_tax_disposition` decimal(12,4) DEFAULT NULL COMMENT 'Base Weee Tax Disposition',\n `base_weee_tax_row_disposition` decimal(12,4) DEFAULT NULL COMMENT 'Base Weee Tax Row Disposition',\n PRIMARY KEY (`item_id`),\n KEY `SALES_ORDER_ITEM_ORDER_ID` (`order_id`),\n KEY `SALES_ORDER_ITEM_STORE_ID` (`store_id`),\n CONSTRAINT `SALES_ORDER_ITEM_ORDER_ID_SALES_ORDER_ENTITY_ID` FOREIGN KEY (`order_id`) REFERENCES `sales_order` (`entity_id`) ON DELETE CASCADE,\n CONSTRAINT `SALES_ORDER_ITEM_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE SET NULL\n) ENGINE=InnoDB AUTO_INCREMENT=1631 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Sales Flat Order Item';"
},
{
"table_name": "sales_order_address",
"description": "Stores the billing and shipping addresses for each order.",
"schema": "CREATE TABLE `sales_order_address` (\n `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',\n `parent_id` int(10) unsigned DEFAULT NULL COMMENT 'Parent ID',\n `customer_address_id` int(11) DEFAULT NULL COMMENT 'Customer Address ID',\n `quote_address_id` int(11) DEFAULT NULL COMMENT 'Quote Address ID',\n `region_id` int(11) DEFAULT NULL COMMENT 'Region ID',\n `customer_id` int(11) DEFAULT NULL COMMENT 'Customer ID',\n `fax` varchar(255) DEFAULT NULL COMMENT 'Fax',\n `region` varchar(255) DEFAULT NULL COMMENT 'Region',\n `postcode` varchar(255) DEFAULT NULL COMMENT 'Postcode',\n `lastname` varchar(255) DEFAULT NULL COMMENT 'Lastname',\n `street` varchar(255) DEFAULT NULL COMMENT 'Street',\n `city` varchar(255) DEFAULT NULL COMMENT 'City',\n `email` varchar(255) DEFAULT NULL COMMENT 'Email',\n `telephone` varchar(255) DEFAULT NULL COMMENT 'Phone Number',\n `country_id` varchar(2) DEFAULT NULL COMMENT 'Country ID',\n `firstname` varchar(255) DEFAULT NULL COMMENT 'Firstname',\n `address_type` varchar(255) DEFAULT NULL COMMENT 'Address Type',\n `prefix` varchar(255) DEFAULT NULL COMMENT 'Prefix',\n `middlename` varchar(255) DEFAULT NULL COMMENT 'Middlename',\n `suffix` varchar(255) DEFAULT NULL COMMENT 'Suffix',\n `company` varchar(255) DEFAULT NULL COMMENT 'Company',\n `vat_id` text DEFAULT NULL COMMENT 'Vat ID',\n `vat_is_valid` smallint(6) DEFAULT NULL COMMENT 'Vat Is Valid',\n `vat_request_id` text DEFAULT NULL COMMENT 'Vat Request ID',\n `vat_request_date` text DEFAULT NULL COMMENT 'Vat Request Date',\n `vat_request_success` smallint(6) DEFAULT NULL COMMENT 'Vat Request Success',\n PRIMARY KEY (`entity_id`),\n KEY `SALES_ORDER_ADDRESS_PARENT_ID` (`parent_id`),\n CONSTRAINT `SALES_ORDER_ADDRESS_PARENT_ID_SALES_ORDER_ENTITY_ID` FOREIGN KEY (`parent_id`) REFERENCES `sales_order` (`entity_id`) ON DELETE CASCADE\n) ENGINE=InnoDB AUTO_INCREMENT=617 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Sales Flat Order Address';"
},
{
"table_name": "sales_order_payment",
"description": "Contains payment information related to each order.",
"schema": "CREATE TABLE `sales_order_payment` (\n `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',\n `parent_id` int(10) unsigned NOT NULL COMMENT 'Parent ID',\n `base_shipping_captured` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Captured',\n `shipping_captured` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Captured',\n `amount_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Amount Refunded',\n `base_amount_paid` decimal(20,4) DEFAULT NULL COMMENT 'Base Amount Paid',\n `amount_canceled` decimal(20,4) DEFAULT NULL COMMENT 'Amount Canceled',\n `base_amount_authorized` decimal(20,4) DEFAULT NULL COMMENT 'Base Amount Authorized',\n `base_amount_paid_online` decimal(20,4) DEFAULT NULL COMMENT 'Base Amount Paid Online',\n `base_amount_refunded_online` decimal(20,4) DEFAULT NULL COMMENT 'Base Amount Refunded Online',\n `base_shipping_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Amount',\n `shipping_amount` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Amount',\n `amount_paid` decimal(20,4) DEFAULT NULL COMMENT 'Amount Paid',\n `amount_authorized` decimal(20,4) DEFAULT NULL COMMENT 'Amount Authorized',\n `base_amount_ordered` decimal(20,4) DEFAULT NULL COMMENT 'Base Amount Ordered',\n `base_shipping_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Refunded',\n `shipping_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Refunded',\n `base_amount_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Amount Refunded',\n `amount_ordered` decimal(20,4) DEFAULT NULL COMMENT 'Amount Ordered',\n `base_amount_canceled` decimal(20,4) DEFAULT NULL COMMENT 'Base Amount Canceled',\n `quote_payment_id` int(11) DEFAULT NULL COMMENT 'Quote Payment ID',\n `additional_data` text DEFAULT NULL COMMENT 'Additional Data',\n `cc_exp_month` varchar(12) DEFAULT NULL COMMENT 'Cc Exp Month',\n `cc_ss_start_year` varchar(12) DEFAULT NULL COMMENT 'Cc Ss Start Year',\n `echeck_bank_name` varchar(128) DEFAULT NULL COMMENT 'Echeck Bank Name',\n `method` varchar(128) DEFAULT NULL COMMENT 'Method',\n `cc_debug_request_body` varchar(32) DEFAULT NULL COMMENT 'Cc Debug Request Body',\n `cc_secure_verify` varchar(32) DEFAULT NULL COMMENT 'Cc Secure Verify',\n `protection_eligibility` varchar(32) DEFAULT NULL COMMENT 'Protection Eligibility',\n `cc_approval` varchar(32) DEFAULT NULL COMMENT 'Cc Approval',\n `cc_last_4` varchar(100) DEFAULT NULL COMMENT 'Cc Last 4',\n `cc_status_description` varchar(32) DEFAULT NULL COMMENT 'Cc Status Description',\n `echeck_type` varchar(32) DEFAULT NULL COMMENT 'Echeck Type',\n `cc_debug_response_serialized` varchar(32) DEFAULT NULL COMMENT 'Cc Debug Response Serialized',\n `cc_ss_start_month` varchar(128) DEFAULT NULL COMMENT 'Cc Ss Start Month',\n `echeck_account_type` varchar(255) DEFAULT NULL COMMENT 'Echeck Account Type',\n `last_trans_id` varchar(255) DEFAULT NULL COMMENT 'Last Trans ID',\n `cc_cid_status` varchar(32) DEFAULT NULL COMMENT 'Cc Cid Status',\n `cc_owner` varchar(128) DEFAULT NULL COMMENT 'Cc Owner',\n `cc_type` varchar(32) DEFAULT NULL COMMENT 'Cc Type',\n `po_number` varchar(32) DEFAULT NULL COMMENT 'Po Number',\n `cc_exp_year` varchar(4) DEFAULT NULL COMMENT 'Cc Exp Year',\n `cc_status` varchar(4) DEFAULT NULL COMMENT 'Cc Status',\n `echeck_routing_number` varchar(32) DEFAULT NULL COMMENT 'Echeck Routing Number',\n `account_status` varchar(32) DEFAULT NULL COMMENT 'Account Status',\n `anet_trans_method` varchar(32) DEFAULT NULL COMMENT 'Anet Trans Method',\n `cc_debug_response_body` varchar(32) DEFAULT NULL COMMENT 'Cc Debug Response Body',\n `cc_ss_issue` varchar(32) DEFAULT NULL COMMENT 'Cc Ss Issue',\n `echeck_account_name` varchar(32) DEFAULT NULL COMMENT 'Echeck Account Name',\n `cc_avs_status` varchar(32) DEFAULT NULL COMMENT 'Cc Avs Status',\n `cc_number_enc` varchar(128) DEFAULT NULL,\n `cc_trans_id` varchar(32) DEFAULT NULL COMMENT 'Cc Trans ID',\n `address_status` varchar(32) DEFAULT NULL COMMENT 'Address Status',\n `additional_information` text DEFAULT NULL COMMENT 'Additional Information',\n PRIMARY KEY (`entity_id`),\n KEY `SALES_ORDER_PAYMENT_PARENT_ID` (`parent_id`),\n CONSTRAINT `SALES_ORDER_PAYMENT_PARENT_ID_SALES_ORDER_ENTITY_ID` FOREIGN KEY (`parent_id`) REFERENCES `sales_order` (`entity_id`) ON DELETE CASCADE\n) ENGINE=InnoDB AUTO_INCREMENT=309 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Sales Flat Order Payment';"
},
{
"table_name": "sales_order_grid",
"description": "A denormalized table providing fast access to order data for the admin order grid.",
"schema": "CREATE TABLE `sales_order_grid` (\n `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity ID',\n `status` varchar(32) DEFAULT NULL COMMENT 'Status',\n `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store ID',\n `store_name` varchar(255) DEFAULT NULL COMMENT 'Store Name',\n `customer_id` int(10) unsigned DEFAULT NULL COMMENT 'Customer ID',\n `base_grand_total` decimal(20,4) DEFAULT NULL COMMENT 'Base Grand Total',\n `base_total_paid` decimal(20,4) DEFAULT NULL COMMENT 'Base Total Paid',\n `grand_total` decimal(20,4) DEFAULT NULL COMMENT 'Grand Total',\n `total_paid` decimal(20,4) DEFAULT NULL COMMENT 'Total Paid',\n `increment_id` varchar(50) DEFAULT NULL COMMENT 'Increment ID',\n `base_currency_code` varchar(3) DEFAULT NULL COMMENT 'Base Currency Code',\n `order_currency_code` varchar(255) DEFAULT NULL COMMENT 'Order Currency Code',\n `shipping_name` varchar(255) DEFAULT NULL COMMENT 'Shipping Name',\n `billing_name` varchar(255) DEFAULT NULL COMMENT 'Billing Name',\n `created_at` timestamp NULL DEFAULT NULL COMMENT 'Created At',\n `updated_at` timestamp NULL DEFAULT NULL COMMENT 'Updated At',\n `billing_address` varchar(255) DEFAULT NULL COMMENT 'Billing Address',\n `shipping_address` varchar(255) DEFAULT NULL COMMENT 'Shipping Address',\n `shipping_information` varchar(255) DEFAULT NULL COMMENT 'Shipping Method Name',\n `customer_email` varchar(255) DEFAULT NULL COMMENT 'Customer Email',\n `customer_group` varchar(255) DEFAULT NULL COMMENT 'Customer Group',\n `subtotal` decimal(20,4) DEFAULT NULL COMMENT 'Subtotal',\n `shipping_and_handling` decimal(20,4) DEFAULT NULL COMMENT 'Shipping and handling amount',\n `customer_name` varchar(255) DEFAULT NULL COMMENT 'Customer Name',\n `payment_method` varchar(255) DEFAULT NULL COMMENT 'Payment Method',\n `total_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Total Refunded',\n `pickup_location_code` varchar(255) DEFAULT NULL COMMENT 'Pickup Location Code',\n PRIMARY KEY (`entity_id`),\n UNIQUE KEY `SALES_ORDER_GRID_INCREMENT_ID_STORE_ID` (`increment_id`,`store_id`),\n KEY `SALES_ORDER_GRID_STATUS` (`status`),\n KEY `SALES_ORDER_GRID_STORE_ID` (`store_id`),\n KEY `SALES_ORDER_GRID_BASE_GRAND_TOTAL` (`base_grand_total`),\n KEY `SALES_ORDER_GRID_BASE_TOTAL_PAID` (`base_total_paid`),\n KEY `SALES_ORDER_GRID_GRAND_TOTAL` (`grand_total`),\n KEY `SALES_ORDER_GRID_TOTAL_PAID` (`total_paid`),\n KEY `SALES_ORDER_GRID_SHIPPING_NAME` (`shipping_name`),\n KEY `SALES_ORDER_GRID_BILLING_NAME` (`billing_name`),\n KEY `SALES_ORDER_GRID_CREATED_AT` (`created_at`),\n KEY `SALES_ORDER_GRID_CUSTOMER_ID` (`customer_id`),\n KEY `SALES_ORDER_GRID_UPDATED_AT` (`updated_at`),\n KEY `SALES_ORDER_GRID_PICKUP_LOCATION_CODE` (`pickup_location_code`),\n FULLTEXT KEY `FTI_65B9E9925EC58F0C7C2E2F6379C233E7` (`increment_id`,`billing_name`,`shipping_name`,`shipping_address`,`billing_address`,`customer_name`,`customer_email`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Sales Flat Order Grid';"
},
{
"table_name": "sales_order_status",
"description": "Defines the available order statuses (e.g., 'Pending', 'Processing').",
"schema": "CREATE TABLE `sales_order_status` (\n `status` varchar(32) NOT NULL COMMENT 'Status',\n `label` varchar(128) NOT NULL COMMENT 'Label',\n PRIMARY KEY (`status`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Sales Order Status Table';"
},
{
"table_name": "sales_order_status_state",
"description": "Maps order statuses to order states (e.g., 'processing' status maps to 'processing' state).",
"schema": "CREATE TABLE `sales_order_status_state` (\n `status` varchar(32) NOT NULL COMMENT 'Status',\n `state` varchar(32) NOT NULL COMMENT 'Label',\n `is_default` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Is Default',\n `visible_on_front` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Visible on front',\n PRIMARY KEY (`status`,`state`),\n CONSTRAINT `SALES_ORDER_STATUS_STATE_STATUS_SALES_ORDER_STATUS_STATUS` FOREIGN KEY (`status`) REFERENCES `sales_order_status` (`status`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Sales Order Status Table';"
},
{
"table_name": "customer_entity",
"description": "The core table for customer accounts, used to link orders to customers.",
"schema": "CREATE TABLE `customer_entity` (\n `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',\n `website_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Website ID',\n `email` varchar(255) DEFAULT NULL COMMENT 'Email',\n `group_id` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Group ID',\n `increment_id` varchar(50) DEFAULT NULL COMMENT 'Increment ID',\n `store_id` smallint(5) unsigned DEFAULT 0 COMMENT 'Store ID',\n `created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'Created At',\n `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'Updated At',\n `is_active` smallint(5) unsigned NOT NULL DEFAULT 1 COMMENT 'Is Active',\n `disable_auto_group_change` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Disable automatic group change based on VAT ID',\n `created_in` varchar(255) DEFAULT NULL COMMENT 'Created From',\n `prefix` varchar(40) DEFAULT NULL COMMENT 'Name Prefix',\n `firstname` varchar(255) DEFAULT NULL COMMENT 'First Name',\n `middlename` varchar(255) DEFAULT NULL COMMENT 'Middle Name/Initial',\n `lastname` varchar(255) DEFAULT NULL COMMENT 'Last Name',\n `suffix` varchar(40) DEFAULT NULL COMMENT 'Name Suffix',\n `dob` date DEFAULT NULL COMMENT 'Date of Birth',\n `password_hash` varchar(128) DEFAULT NULL COMMENT 'Password_hash',\n `rp_token` varchar(128) DEFAULT NULL COMMENT 'Reset password token',\n `rp_token_created_at` datetime DEFAULT NULL COMMENT 'Reset password token creation time',\n `default_billing` int(10) unsigned DEFAULT NULL COMMENT 'Default Billing Address',\n `default_shipping` int(10) unsigned DEFAULT NULL COMMENT 'Default Shipping Address',\n `taxvat` varchar(50) DEFAULT NULL COMMENT 'Tax/VAT Number',\n `confirmation` varchar(64) DEFAULT NULL COMMENT 'Is Confirmed',\n `gender` smallint(5) unsigned DEFAULT NULL COMMENT 'Gender',\n `failures_num` smallint(6) DEFAULT 0 COMMENT 'Failure Number',\n `first_failure` timestamp NULL DEFAULT NULL COMMENT 'First Failure',\n `lock_expires` timestamp NULL DEFAULT NULL COMMENT 'Lock Expiration Date',\n `session_cutoff` timestamp NULL DEFAULT NULL COMMENT 'Session Cutoff Time',\n PRIMARY KEY (`entity_id`),\n UNIQUE KEY `CUSTOMER_ENTITY_EMAIL_WEBSITE_ID` (`email`,`website_id`),\n KEY `CUSTOMER_ENTITY_STORE_ID` (`store_id`),\n KEY `CUSTOMER_ENTITY_WEBSITE_ID` (`website_id`),\n KEY `CUSTOMER_ENTITY_FIRSTNAME` (`firstname`),\n KEY `CUSTOMER_ENTITY_LASTNAME` (`lastname`),\n CONSTRAINT `CUSTOMER_ENTITY_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE SET NULL,\n CONSTRAINT `CUSTOMER_ENTITY_WEBSITE_ID_STORE_WEBSITE_WEBSITE_ID` FOREIGN KEY (`website_id`) REFERENCES `store_website` (`website_id`) ON DELETE SET NULL\n) ENGINE=InnoDB AUTO_INCREMENT=86 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Customer Entity';"
},
{
"table_name": "directory_country",
"description": "Stores country information for addresses.",
"schema": "CREATE TABLE `directory_country` (\n `country_id` varchar(2) NOT NULL COMMENT 'Country ID in ISO-2',\n `iso2_code` varchar(2) DEFAULT NULL COMMENT 'Country ISO-2 format',\n `iso3_code` varchar(3) DEFAULT NULL COMMENT 'Country ISO-3',\n PRIMARY KEY (`country_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Directory Country';"
},
{
"table_name": "directory_country_region",
"description": "Stores regions, states, or provinces for addresses.",
"schema": "CREATE TABLE `directory_country_region` (\n `region_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Region ID',\n `country_id` varchar(4) NOT NULL DEFAULT '0' COMMENT 'Country ID in ISO-2',\n `code` varchar(32) DEFAULT NULL COMMENT 'Region code',\n `default_name` varchar(255) DEFAULT NULL COMMENT 'Region Name',\n PRIMARY KEY (`region_id`),\n KEY `DIRECTORY_COUNTRY_REGION_COUNTRY_ID` (`country_id`)\n) ENGINE=InnoDB AUTO_INCREMENT=1122 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Directory Country Region';"
},
{
"table_name": "store",
"description": "Defines individual store views, used to scope orders.",
"schema": "CREATE TABLE `store` (\n `store_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Store ID',\n `code` varchar(32) DEFAULT NULL COMMENT 'Code',\n `website_id` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Website ID',\n `group_id` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Group ID',\n `name` varchar(255) NOT NULL COMMENT 'Store Name',\n `sort_order` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Store Sort Order',\n `is_active` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Store Activity',\n PRIMARY KEY (`store_id`),\n UNIQUE KEY `STORE_CODE` (`code`),\n KEY `STORE_WEBSITE_ID` (`website_id`),\n KEY `STORE_IS_ACTIVE_SORT_ORDER` (`is_active`,`sort_order`),\n KEY `STORE_GROUP_ID` (`group_id`),\n CONSTRAINT `STORE_GROUP_ID_STORE_GROUP_GROUP_ID` FOREIGN KEY (`group_id`) REFERENCES `store_group` (`group_id`) ON DELETE CASCADE,\n CONSTRAINT `STORE_WEBSITE_ID_STORE_WEBSITE_WEBSITE_ID` FOREIGN KEY (`website_id`) REFERENCES `store_website` (`website_id`) ON DELETE CASCADE\n) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Stores';"
}
]
},
{
"intent_group_name": "Order Fulfillment",
"description": "Covers creating and querying invoices, shipments, and credit memos.",
"intent_examples": [
"Proceed with printing invoices for the orders addressed to Brian Smith within the period from 02/01/2022 to 05/31/2023.",
"Generate packing slips for orders that are complete and have a base grand total between 29.5 and 275.6.",
"Print shipping labels for order ID 000000261.",
"Carry out the action of printing credit memos for orders specified as complete and billed to Alex Johnson.",
"Print the first credit memo for the earliest order with status 'Canceled' and ship-to name 'Alexander Thomas'.",
"Carry out the 'Print Credit Memos' action on the final 1 to 3 Orders, with Grand Totals between 58.7 and 232.0.",
"Create an invoice for order 000000150.",
"Ship the items for order 000000151 and notify the customer.",
"Issue a full refund for order 000000152.",
"List all uninvoiced orders from the last week.",
"Unfold the entire collection of invoices."
],
"tables": [
{
"table_name": "sales_invoice",
"description": "Stores all generated invoices for orders.",
"schema": "CREATE TABLE `sales_invoice` (\n `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',\n `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store ID',\n `base_grand_total` decimal(20,4) DEFAULT NULL COMMENT 'Base Grand Total',\n `shipping_tax_amount` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Tax Amount',\n `tax_amount` decimal(20,4) DEFAULT NULL COMMENT 'Tax Amount',\n `base_tax_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Tax Amount',\n `store_to_order_rate` decimal(20,4) DEFAULT NULL COMMENT 'Store To Order Rate',\n `base_shipping_tax_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Tax Amount',\n `base_discount_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Amount',\n `base_to_order_rate` decimal(20,4) DEFAULT NULL COMMENT 'Base To Order Rate',\n `grand_total` decimal(20,4) DEFAULT NULL COMMENT 'Grand Total',\n `shipping_amount` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Amount',\n `subtotal_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Subtotal Incl Tax',\n `base_subtotal_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Base Subtotal Incl Tax',\n `store_to_base_rate` decimal(20,4) DEFAULT NULL COMMENT 'Store To Base Rate',\n `base_shipping_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Amount',\n `total_qty` decimal(12,4) DEFAULT NULL COMMENT 'Total Qty',\n `base_to_global_rate` decimal(20,4) DEFAULT NULL COMMENT 'Base To Global Rate',\n `subtotal` decimal(20,4) DEFAULT NULL COMMENT 'Subtotal',\n `base_subtotal` decimal(20,4) DEFAULT NULL COMMENT 'Base Subtotal',\n `discount_amount` decimal(20,4) DEFAULT NULL COMMENT 'Discount Amount',\n `billing_address_id` int(11) DEFAULT NULL COMMENT 'Billing Address ID',\n `is_used_for_refund` smallint(5) unsigned DEFAULT NULL COMMENT 'Is Used For Refund',\n `order_id` int(10) unsigned NOT NULL COMMENT 'Order ID',\n `email_sent` smallint(5) unsigned DEFAULT NULL COMMENT 'Email Sent',\n `send_email` smallint(5) unsigned DEFAULT NULL COMMENT 'Send Email',\n `can_void_flag` smallint(5) unsigned DEFAULT NULL COMMENT 'Can Void Flag',\n `state` int(11) DEFAULT NULL COMMENT 'State',\n `shipping_address_id` int(11) DEFAULT NULL COMMENT 'Shipping Address ID',\n `store_currency_code` varchar(3) DEFAULT NULL COMMENT 'Store Currency Code',\n `transaction_id` varchar(255) DEFAULT NULL COMMENT 'Transaction ID',\n `order_currency_code` varchar(3) DEFAULT NULL COMMENT 'Order Currency Code',\n `base_currency_code` varchar(3) DEFAULT NULL COMMENT 'Base Currency Code',\n `global_currency_code` varchar(3) DEFAULT NULL COMMENT 'Global Currency Code',\n `increment_id` varchar(50) DEFAULT NULL COMMENT 'Increment ID',\n `created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'Created At',\n `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'Updated At',\n `discount_tax_compensation_amount` decimal(20,4) DEFAULT NULL COMMENT 'Discount Tax Compensation Amount',\n `base_discount_tax_compensation_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Tax Compensation Amount',\n `shipping_discount_tax_compensation_amount` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Discount Tax Compensation Amount',\n `base_shipping_discount_tax_compensation_amnt` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Discount Tax Compensation Amount',\n `shipping_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Incl Tax',\n `base_shipping_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Incl Tax',\n `base_total_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Total Refunded',\n `discount_description` varchar(255) DEFAULT NULL COMMENT 'Discount Description',\n `customer_note` text DEFAULT NULL COMMENT 'Customer Note',\n `customer_note_notify` smallint(5) unsigned DEFAULT NULL COMMENT 'Customer Note Notify',\n PRIMARY KEY (`entity_id`),\n UNIQUE KEY `SALES_INVOICE_INCREMENT_ID_STORE_ID` (`increment_id`,`store_id`),\n KEY `SALES_INVOICE_STORE_ID` (`store_id`),\n KEY `SALES_INVOICE_GRAND_TOTAL` (`grand_total`),\n KEY `SALES_INVOICE_ORDER_ID` (`order_id`),\n KEY `SALES_INVOICE_STATE` (`state`),\n KEY `SALES_INVOICE_CREATED_AT` (`created_at`),\n KEY `SALES_INVOICE_UPDATED_AT` (`updated_at`),\n KEY `SALES_INVOICE_SEND_EMAIL` (`send_email`),\n KEY `SALES_INVOICE_EMAIL_SENT` (`email_sent`),\n CONSTRAINT `SALES_INVOICE_ORDER_ID_SALES_ORDER_ENTITY_ID` FOREIGN KEY (`order_id`) REFERENCES `sales_order` (`entity_id`) ON DELETE CASCADE,\n CONSTRAINT `SALES_INVOICE_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE SET NULL\n) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Sales Flat Invoice';"
},
{
"table_name": "sales_invoice_item",
"description": "Stores the individual line items for each invoice.",
"schema": "CREATE TABLE `sales_invoice_item` (\n `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',\n `parent_id` int(10) unsigned NOT NULL COMMENT 'Parent ID',\n `base_price` decimal(12,4) DEFAULT NULL COMMENT 'Base Price',\n `tax_amount` decimal(12,4) DEFAULT NULL COMMENT 'Tax Amount',\n `base_row_total` decimal(20,4) DEFAULT NULL COMMENT 'Base Row Total',\n `discount_amount` decimal(12,4) DEFAULT NULL COMMENT 'Discount Amount',\n `row_total` decimal(20,4) DEFAULT NULL COMMENT 'Row Total',\n `base_discount_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Discount Amount',\n `price_incl_tax` decimal(12,4) DEFAULT NULL COMMENT 'Price Incl Tax',\n `base_tax_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Tax Amount',\n `base_price_incl_tax` decimal(12,4) DEFAULT NULL COMMENT 'Base Price Incl Tax',\n `qty` decimal(12,4) DEFAULT NULL COMMENT 'Qty',\n `base_cost` decimal(12,4) DEFAULT NULL COMMENT 'Base Cost',\n `price` decimal(12,4) DEFAULT NULL COMMENT 'Price',\n `base_row_total_incl_tax` decimal(12,4) DEFAULT NULL COMMENT 'Base Row Total Incl Tax',\n `row_total_incl_tax` decimal(12,4) DEFAULT NULL COMMENT 'Row Total Incl Tax',\n `product_id` int(11) DEFAULT NULL COMMENT 'Product ID',\n `order_item_id` int(11) DEFAULT NULL COMMENT 'Order Item ID',\n `additional_data` text DEFAULT NULL COMMENT 'Additional Data',\n `description` text DEFAULT NULL COMMENT 'Description',\n `sku` varchar(255) DEFAULT NULL COMMENT 'Sku',\n `name` varchar(255) DEFAULT NULL COMMENT 'Name',\n `discount_tax_compensation_amount` decimal(12,4) DEFAULT NULL COMMENT 'Discount Tax Compensation Amount',\n `base_discount_tax_compensation_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Discount Tax Compensation Amount',\n `tax_ratio` text DEFAULT NULL COMMENT 'Ratio of tax invoiced over tax of the order item',\n `weee_tax_applied` text DEFAULT NULL COMMENT 'Weee Tax Applied',\n `weee_tax_applied_amount` decimal(12,4) DEFAULT NULL COMMENT 'Weee Tax Applied Amount',\n `weee_tax_applied_row_amount` decimal(12,4) DEFAULT NULL COMMENT 'Weee Tax Applied Row Amount',\n `weee_tax_disposition` decimal(12,4) DEFAULT NULL COMMENT 'Weee Tax Disposition',\n `weee_tax_row_disposition` decimal(12,4) DEFAULT NULL COMMENT 'Weee Tax Row Disposition',\n `base_weee_tax_applied_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Weee Tax Applied Amount',\n `base_weee_tax_applied_row_amnt` decimal(12,4) DEFAULT NULL COMMENT 'Base Weee Tax Applied Row Amnt',\n `base_weee_tax_disposition` decimal(12,4) DEFAULT NULL COMMENT 'Base Weee Tax Disposition',\n `base_weee_tax_row_disposition` decimal(12,4) DEFAULT NULL COMMENT 'Base Weee Tax Row Disposition',\n PRIMARY KEY (`entity_id`),\n KEY `SALES_INVOICE_ITEM_PARENT_ID` (`parent_id`),\n CONSTRAINT `SALES_INVOICE_ITEM_PARENT_ID_SALES_INVOICE_ENTITY_ID` FOREIGN KEY (`parent_id`) REFERENCES `sales_invoice` (`entity_id`) ON DELETE CASCADE\n) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Sales Flat Invoice Item';"
},
{
"table_name": "sales_shipment",
"description": "Stores shipment records for orders, including tracking information.",
"schema": "CREATE TABLE `sales_shipment` (\n `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',\n `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store ID',\n `total_weight` decimal(12,4) DEFAULT NULL COMMENT 'Total Weight',\n `total_qty` decimal(12,4) DEFAULT NULL COMMENT 'Total Qty',\n `email_sent` smallint(5) unsigned DEFAULT NULL COMMENT 'Email Sent',\n `send_email` smallint(5) unsigned DEFAULT NULL COMMENT 'Send Email',\n `order_id` int(10) unsigned NOT NULL COMMENT 'Order ID',\n `customer_id` int(11) DEFAULT NULL COMMENT 'Customer ID',\n `shipping_address_id` int(11) DEFAULT NULL COMMENT 'Shipping Address ID',\n `billing_address_id` int(11) DEFAULT NULL COMMENT 'Billing Address ID',\n `shipment_status` int(11) DEFAULT NULL COMMENT 'Shipment Status',\n `increment_id` varchar(50) DEFAULT NULL COMMENT 'Increment ID',\n `created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'Created At',\n `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'Updated At',\n `packages` text DEFAULT NULL COMMENT 'Packed Products in Packages',\n `shipping_label` mediumblob DEFAULT NULL COMMENT 'Shipping Label Content',\n `customer_note` text DEFAULT NULL COMMENT 'Customer Note',\n `customer_note_notify` smallint(5) unsigned DEFAULT NULL COMMENT 'Customer Note Notify',\n PRIMARY KEY (`entity_id`),\n UNIQUE KEY `SALES_SHIPMENT_INCREMENT_ID_STORE_ID` (`increment_id`,`store_id`),\n KEY `SALES_SHIPMENT_STORE_ID` (`store_id`),\n KEY `SALES_SHIPMENT_TOTAL_QTY` (`total_qty`),\n KEY `SALES_SHIPMENT_ORDER_ID` (`order_id`),\n KEY `SALES_SHIPMENT_CREATED_AT` (`created_at`),\n KEY `SALES_SHIPMENT_UPDATED_AT` (`updated_at`),\n KEY `SALES_SHIPMENT_SEND_EMAIL` (`send_email`),\n KEY `SALES_SHIPMENT_EMAIL_SENT` (`email_sent`),\n CONSTRAINT `SALES_SHIPMENT_ORDER_ID_SALES_ORDER_ENTITY_ID` FOREIGN KEY (`order_id`) REFERENCES `sales_order` (`entity_id`) ON DELETE CASCADE,\n CONSTRAINT `SALES_SHIPMENT_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE SET NULL\n) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Sales Flat Shipment';"
},
{
"table_name": "sales_shipment_item",
"description": "Stores the individual line items for each shipment.",
"schema": "CREATE TABLE `sales_shipment_item` (\n `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',\n `parent_id` int(10) unsigned NOT NULL COMMENT 'Parent ID',\n `row_total` decimal(20,4) DEFAULT NULL COMMENT 'Row Total',\n `price` decimal(20,4) DEFAULT NULL COMMENT 'Price',\n `weight` decimal(12,4) DEFAULT NULL COMMENT 'Weight',\n `qty` decimal(12,4) DEFAULT NULL COMMENT 'Qty',\n `product_id` int(11) DEFAULT NULL COMMENT 'Product ID',\n `order_item_id` int(11) DEFAULT NULL COMMENT 'Order Item ID',\n `additional_data` text DEFAULT NULL COMMENT 'Additional Data',\n `description` text DEFAULT NULL COMMENT 'Description',\n `name` varchar(255) DEFAULT NULL COMMENT 'Name',\n `sku` varchar(255) DEFAULT NULL COMMENT 'Sku',\n PRIMARY KEY (`entity_id`),\n KEY `SALES_SHIPMENT_ITEM_PARENT_ID` (`parent_id`),\n CONSTRAINT `SALES_SHIPMENT_ITEM_PARENT_ID_SALES_SHIPMENT_ENTITY_ID` FOREIGN KEY (`parent_id`) REFERENCES `sales_shipment` (`entity_id`) ON DELETE CASCADE\n) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Sales Flat Shipment Item';"
},
{
"table_name": "sales_creditmemo_grid",
"description": "A denormalized table for fast loading of credit memos (refunds) in the admin panel.",
"schema": "CREATE TABLE `sales_creditmemo_grid` (\n `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity ID',\n `increment_id` varchar(50) DEFAULT NULL COMMENT 'Increment ID',\n `created_at` timestamp NULL DEFAULT NULL COMMENT 'Created At',\n `updated_at` timestamp NULL DEFAULT NULL COMMENT 'Updated At',\n `order_id` int(10) unsigned NOT NULL COMMENT 'Order ID',\n `order_increment_id` varchar(50) DEFAULT NULL COMMENT 'Order Increment ID',\n `order_created_at` timestamp NULL DEFAULT NULL COMMENT 'Order Created At',\n `billing_name` varchar(255) DEFAULT NULL COMMENT 'Billing Name',\n `state` int(11) DEFAULT NULL COMMENT 'Status',\n `base_grand_total` decimal(20,4) DEFAULT NULL COMMENT 'Base Grand Total',\n `order_status` varchar(32) DEFAULT NULL COMMENT 'Order Status',\n `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store ID',\n `billing_address` varchar(255) DEFAULT NULL COMMENT 'Billing Address',\n `shipping_address` varchar(255) DEFAULT NULL COMMENT 'Shipping Address',\n `customer_name` varchar(128) NOT NULL COMMENT 'Customer Name',\n `customer_email` varchar(128) DEFAULT NULL COMMENT 'Customer Email',\n `customer_group_id` smallint(6) DEFAULT NULL COMMENT 'Customer Group ID',\n `payment_method` varchar(32) DEFAULT NULL COMMENT 'Payment Method',\n `shipping_information` varchar(255) DEFAULT NULL COMMENT 'Shipping Method Name',\n `subtotal` decimal(20,4) DEFAULT NULL COMMENT 'Subtotal',\n `shipping_and_handling` decimal(20,4) DEFAULT NULL COMMENT 'Shipping and handling amount',\n `adjustment_positive` decimal(20,4) DEFAULT NULL COMMENT 'Adjustment Positive',\n `adjustment_negative` decimal(20,4) DEFAULT NULL COMMENT 'Adjustment Negative',\n `order_base_grand_total` decimal(20,4) DEFAULT NULL COMMENT 'Order Grand Total',\n PRIMARY KEY (`entity_id`),\n UNIQUE KEY `SALES_CREDITMEMO_GRID_INCREMENT_ID_STORE_ID` (`increment_id`,`store_id`),\n KEY `SALES_CREDITMEMO_GRID_ORDER_INCREMENT_ID` (`order_increment_id`),\n KEY `SALES_CREDITMEMO_GRID_CREATED_AT` (`created_at`),\n KEY `SALES_CREDITMEMO_GRID_UPDATED_AT` (`updated_at`),\n KEY `SALES_CREDITMEMO_GRID_ORDER_CREATED_AT` (`order_created_at`),\n KEY `SALES_CREDITMEMO_GRID_STATE` (`state`),\n KEY `SALES_CREDITMEMO_GRID_BILLING_NAME` (`billing_name`),\n KEY `SALES_CREDITMEMO_GRID_ORDER_STATUS` (`order_status`),\n KEY `SALES_CREDITMEMO_GRID_BASE_GRAND_TOTAL` (`base_grand_total`),\n KEY `SALES_CREDITMEMO_GRID_STORE_ID` (`store_id`),\n KEY `SALES_CREDITMEMO_GRID_ORDER_BASE_GRAND_TOTAL` (`order_base_grand_total`),\n KEY `SALES_CREDITMEMO_GRID_ORDER_ID` (`order_id`),\n FULLTEXT KEY `FTI_32B7BA885941A8254EE84AE650ABDC86` (`increment_id`,`order_increment_id`,`billing_name`,`billing_address`,`shipping_address`,`customer_name`,`customer_email`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Sales Flat Creditmemo Grid';"
},
{
"table_name": "sales_order",
"description": "The core order table, linked to fulfillment documents like invoices and shipments.",
"schema": "CREATE TABLE `sales_order` (\n `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',\n `state` varchar(32) DEFAULT NULL COMMENT 'State',\n `status` varchar(32) DEFAULT NULL COMMENT 'Status',\n `coupon_code` varchar(255) DEFAULT NULL COMMENT 'Coupon Code',\n `protect_code` varchar(255) DEFAULT NULL COMMENT 'Protect Code',\n `shipping_description` varchar(255) DEFAULT NULL COMMENT 'Shipping Description',\n `is_virtual` smallint(5) unsigned DEFAULT NULL COMMENT 'Is Virtual',\n `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store ID',\n `customer_id` int(10) unsigned DEFAULT NULL COMMENT 'Customer ID',\n `base_discount_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Amount',\n `base_discount_canceled` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Canceled',\n `base_discount_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Invoiced',\n `base_discount_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Refunded',\n `base_grand_total` decimal(20,4) DEFAULT NULL COMMENT 'Base Grand Total',\n `base_shipping_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Amount',\n `base_shipping_canceled` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Canceled',\n `base_shipping_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Invoiced',\n `base_shipping_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Refunded',\n `base_shipping_tax_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Tax Amount',\n `base_shipping_tax_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Tax Refunded',\n `base_subtotal` decimal(20,4) DEFAULT NULL COMMENT 'Base Subtotal',\n `base_subtotal_canceled` decimal(20,4) DEFAULT NULL COMMENT 'Base Subtotal Canceled',\n `base_subtotal_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Base Subtotal Invoiced',\n `base_subtotal_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Subtotal Refunded',\n `base_tax_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Tax Amount',\n `base_tax_canceled` decimal(20,4) DEFAULT NULL COMMENT 'Base Tax Canceled',\n `base_tax_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Base Tax Invoiced',\n `base_tax_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Tax Refunded',\n `base_to_global_rate` decimal(20,4) DEFAULT NULL COMMENT 'Base To Global Rate',\n `base_to_order_rate` decimal(20,4) DEFAULT NULL COMMENT 'Base To Order Rate',\n `base_total_canceled` decimal(20,4) DEFAULT NULL COMMENT 'Base Total Canceled',\n `base_total_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Base Total Invoiced',\n `base_total_invoiced_cost` decimal(20,4) DEFAULT NULL COMMENT 'Base Total Invoiced Cost',\n `base_total_offline_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Total Offline Refunded',\n `base_total_online_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Total Online Refunded',\n `base_total_paid` decimal(20,4) DEFAULT NULL COMMENT 'Base Total Paid',\n `base_total_qty_ordered` decimal(12,4) DEFAULT NULL COMMENT 'Base Total Qty Ordered',\n `base_total_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Total Refunded',\n `discount_amount` decimal(20,4) DEFAULT NULL COMMENT 'Discount Amount',\n `discount_canceled` decimal(20,4) DEFAULT NULL COMMENT 'Discount Canceled',\n `discount_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Discount Invoiced',\n `discount_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Discount Refunded',\n `grand_total` decimal(20,4) DEFAULT NULL COMMENT 'Grand Total',\n `shipping_amount` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Amount',\n `shipping_canceled` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Canceled',\n `shipping_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Invoiced',\n `shipping_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Refunded',\n `shipping_tax_amount` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Tax Amount',\n `shipping_tax_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Tax Refunded',\n `store_to_base_rate` decimal(12,4) DEFAULT NULL COMMENT 'Store To Base Rate',\n `store_to_order_rate` decimal(12,4) DEFAULT NULL COMMENT 'Store To Order Rate',\n `subtotal` decimal(20,4) DEFAULT NULL COMMENT 'Subtotal',\n `subtotal_canceled` decimal(20,4) DEFAULT NULL COMMENT 'Subtotal Canceled',\n `subtotal_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Subtotal Invoiced',\n `subtotal_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Subtotal Refunded',\n `tax_amount` decimal(20,4) DEFAULT NULL COMMENT 'Tax Amount',\n `tax_canceled` decimal(20,4) DEFAULT NULL COMMENT 'Tax Canceled',\n `tax_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Tax Invoiced',\n `tax_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Tax Refunded',\n `total_canceled` decimal(20,4) DEFAULT NULL COMMENT 'Total Canceled',\n `total_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Total Invoiced',\n `total_offline_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Total Offline Refunded',\n `total_online_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Total Online Refunded',\n `total_paid` decimal(20,4) DEFAULT NULL COMMENT 'Total Paid',\n `total_qty_ordered` decimal(12,4) DEFAULT NULL COMMENT 'Total Qty Ordered',\n `total_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Total Refunded',\n `can_ship_partially` smallint(5) unsigned DEFAULT NULL COMMENT 'Can Ship Partially',\n `can_ship_partially_item` smallint(5) unsigned DEFAULT NULL COMMENT 'Can Ship Partially Item',\n `customer_is_guest` smallint(5) unsigned DEFAULT NULL COMMENT 'Customer Is Guest',\n `customer_note_notify` smallint(5) unsigned DEFAULT NULL COMMENT 'Customer Note Notify',\n `billing_address_id` int(11) DEFAULT NULL COMMENT 'Billing Address ID',\n `customer_group_id` int(11) DEFAULT NULL,\n `edit_increment` int(11) DEFAULT NULL COMMENT 'Edit Increment',\n `email_sent` smallint(5) unsigned DEFAULT NULL COMMENT 'Email Sent',\n `send_email` smallint(5) unsigned DEFAULT NULL COMMENT 'Send Email',\n `forced_shipment_with_invoice` smallint(5) unsigned DEFAULT NULL COMMENT 'Forced Do Shipment With Invoice',\n `payment_auth_expiration` int(11) DEFAULT NULL COMMENT 'Payment Authorization Expiration',\n `quote_address_id` int(11) DEFAULT NULL COMMENT 'Quote Address ID',\n `quote_id` int(11) DEFAULT NULL COMMENT 'Quote ID',\n `shipping_address_id` int(11) DEFAULT NULL COMMENT 'Shipping Address ID',\n `adjustment_negative` decimal(20,4) DEFAULT NULL COMMENT 'Adjustment Negative',\n `adjustment_positive` decimal(20,4) DEFAULT NULL COMMENT 'Adjustment Positive',\n `base_adjustment_negative` decimal(20,4) DEFAULT NULL COMMENT 'Base Adjustment Negative',\n `base_adjustment_positive` decimal(20,4) DEFAULT NULL COMMENT 'Base Adjustment Positive',\n `base_shipping_discount_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Discount Amount',\n `base_subtotal_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Base Subtotal Incl Tax',\n `base_total_due` decimal(20,4) DEFAULT NULL COMMENT 'Base Total Due',\n `payment_authorization_amount` decimal(20,4) DEFAULT NULL COMMENT 'Payment Authorization Amount',\n `shipping_discount_amount` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Discount Amount',\n `subtotal_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Subtotal Incl Tax',\n `total_due` decimal(20,4) DEFAULT NULL COMMENT 'Total Due',\n `weight` decimal(12,4) DEFAULT NULL COMMENT 'Weight',\n `customer_dob` datetime DEFAULT NULL COMMENT 'Customer Dob',\n `increment_id` varchar(50) DEFAULT NULL COMMENT 'Increment ID',\n `applied_rule_ids` varchar(128) DEFAULT NULL COMMENT 'Applied Rule Ids',\n `base_currency_code` varchar(3) DEFAULT NULL COMMENT 'Base Currency Code',\n `customer_email` varchar(128) DEFAULT NULL COMMENT 'Customer Email',\n `customer_firstname` varchar(128) DEFAULT NULL COMMENT 'Customer Firstname',\n `customer_lastname` varchar(128) DEFAULT NULL COMMENT 'Customer Lastname',\n `customer_middlename` varchar(128) DEFAULT NULL COMMENT 'Customer Middlename',\n `customer_prefix` varchar(32) DEFAULT NULL COMMENT 'Customer Prefix',\n `customer_suffix` varchar(32) DEFAULT NULL COMMENT 'Customer Suffix',\n `customer_taxvat` varchar(32) DEFAULT NULL COMMENT 'Customer Taxvat',\n `discount_description` varchar(255) DEFAULT NULL COMMENT 'Discount Description',\n `ext_customer_id` varchar(32) DEFAULT NULL COMMENT 'Ext Customer ID',\n `ext_order_id` varchar(32) DEFAULT NULL COMMENT 'Ext Order ID',\n `global_currency_code` varchar(3) DEFAULT NULL COMMENT 'Global Currency Code',\n `hold_before_state` varchar(32) DEFAULT NULL COMMENT 'Hold Before State',\n `hold_before_status` varchar(32) DEFAULT NULL COMMENT 'Hold Before Status',\n `order_currency_code` varchar(3) DEFAULT NULL COMMENT 'Order Currency Code',\n `original_increment_id` varchar(50) DEFAULT NULL COMMENT 'Original Increment ID',\n `relation_child_id` varchar(32) DEFAULT NULL COMMENT 'Relation Child ID',\n `relation_child_real_id` varchar(32) DEFAULT NULL COMMENT 'Relation Child Real ID',\n `relation_parent_id` varchar(32) DEFAULT NULL COMMENT 'Relation Parent ID',\n `relation_parent_real_id` varchar(32) DEFAULT NULL COMMENT 'Relation Parent Real ID',\n `remote_ip` varchar(45) DEFAULT NULL COMMENT 'Remote Ip',\n `shipping_method` varchar(120) DEFAULT NULL,\n `store_currency_code` varchar(3) DEFAULT NULL COMMENT 'Store Currency Code',\n `store_name` varchar(255) DEFAULT NULL COMMENT 'Store Name',\n `x_forwarded_for` varchar(255) DEFAULT NULL COMMENT 'X Forwarded For',\n `customer_note` text DEFAULT NULL COMMENT 'Customer Note',\n `created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'Created At',\n `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'Updated At',\n `total_item_count` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Total Item Count',\n `customer_gender` int(11) DEFAULT NULL COMMENT 'Customer Gender',\n `discount_tax_compensation_amount` decimal(20,4) DEFAULT NULL COMMENT 'Discount Tax Compensation Amount',\n `base_discount_tax_compensation_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Tax Compensation Amount',\n `shipping_discount_tax_compensation_amount` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Discount Tax Compensation Amount',\n `base_shipping_discount_tax_compensation_amnt` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Discount Tax Compensation Amount',\n `discount_tax_compensation_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Discount Tax Compensation Invoiced',\n `base_discount_tax_compensation_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Tax Compensation Invoiced',\n `discount_tax_compensation_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Discount Tax Compensation Refunded',\n `base_discount_tax_compensation_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Tax Compensation Refunded',\n `shipping_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Incl Tax',\n `base_shipping_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Incl Tax',\n `coupon_rule_name` varchar(255) DEFAULT NULL COMMENT 'Coupon Sales Rule Name',\n `gift_message_id` int(11) DEFAULT NULL COMMENT 'Gift Message ID',\n `paypal_ipn_customer_notified` int(11) DEFAULT 0 COMMENT 'Paypal Ipn Customer Notified',\n PRIMARY KEY (`entity_id`),\n UNIQUE KEY `SALES_ORDER_INCREMENT_ID_STORE_ID` (`increment_id`,`store_id`),\n KEY `SALES_ORDER_STATUS` (`status`),\n KEY `SALES_ORDER_STATE` (`state`),\n KEY `SALES_ORDER_STORE_ID` (`store_id`),\n KEY `SALES_ORDER_CREATED_AT` (`created_at`),\n KEY `SALES_ORDER_CUSTOMER_ID` (`customer_id`),\n KEY `SALES_ORDER_EXT_ORDER_ID` (`ext_order_id`),\n KEY `SALES_ORDER_QUOTE_ID` (`quote_id`),\n KEY `SALES_ORDER_UPDATED_AT` (`updated_at`),\n KEY `SALES_ORDER_SEND_EMAIL` (`send_email`),\n KEY `SALES_ORDER_EMAIL_SENT` (`email_sent`),\n CONSTRAINT `SALES_ORDER_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID` FOREIGN KEY (`customer_id`) REFERENCES `customer_entity` (`entity_id`) ON DELETE SET NULL,\n CONSTRAINT `SALES_ORDER_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE SET NULL\n) ENGINE=InnoDB AUTO_INCREMENT=309 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Sales Flat Order';"
},
{
"table_name": "sequence_invoice_1",
"description": "Sequence table to generate unique increment IDs for invoices in store 1.",
"schema": "CREATE TABLE `sequence_invoice_1` (\n `sequence_value` int(10) unsigned NOT NULL AUTO_INCREMENT,\n PRIMARY KEY (`sequence_value`)\n) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;"
},
{
"table_name": "sequence_shipment_1",
"description": "Sequence table to generate unique increment IDs for shipments in store 1.",
"schema": "CREATE TABLE `sequence_shipment_1` (\n `sequence_value` int(10) unsigned NOT NULL AUTO_INCREMENT,\n PRIMARY KEY (`sequence_value`)\n) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;"
},
{
"table_name": "sales_sequence_meta",
"description": "Metadata for sales entity sequences, defining which sequence table to use.",
"schema": "CREATE TABLE `sales_sequence_meta` (\n `meta_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `entity_type` varchar(32) NOT NULL COMMENT 'Prefix',\n `store_id` smallint(5) unsigned NOT NULL COMMENT 'Store ID',\n `sequence_table` varchar(64) NOT NULL COMMENT 'table for sequence',\n PRIMARY KEY (`meta_id`),\n UNIQUE KEY `SALES_SEQUENCE_META_ENTITY_TYPE_STORE_ID` (`entity_type`,`store_id`)\n) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='sales_sequence_meta';"
},
{
"table_name": "sales_sequence_profile",
"description": "Defines the pattern (prefix, suffix, etc.) for generating sales entity increment IDs.",
"schema": "CREATE TABLE `sales_sequence_profile` (\n `profile_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `meta_id` int(10) unsigned NOT NULL COMMENT 'Meta_id',\n `prefix` varchar(32) DEFAULT NULL COMMENT 'Prefix',\n `suffix` varchar(32) DEFAULT NULL COMMENT 'Suffix',\n `start_value` int(10) unsigned NOT NULL DEFAULT 1 COMMENT 'Start value for sequence',\n `step` int(10) unsigned NOT NULL DEFAULT 1 COMMENT 'Step for sequence',\n `max_value` int(10) unsigned NOT NULL COMMENT 'MaxValue for sequence',\n `warning_value` int(10) unsigned NOT NULL COMMENT 'WarningValue for sequence',\n `is_active` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'isActive flag',\n PRIMARY KEY (`profile_id`),\n UNIQUE KEY `SALES_SEQUENCE_PROFILE_META_ID_PREFIX_SUFFIX` (`meta_id`,`prefix`,`suffix`),\n CONSTRAINT `SALES_SEQUENCE_PROFILE_META_ID_SALES_SEQUENCE_META_META_ID` FOREIGN KEY (`meta_id`) REFERENCES `sales_sequence_meta` (`meta_id`) ON DELETE CASCADE\n) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='sales_sequence_profile';"
},
{
"table_name": "store",
"description": "Defines individual store views, used to scope fulfillment documents.",
"schema": "CREATE TABLE `store` (\n `store_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Store ID',\n `code` varchar(32) DEFAULT NULL COMMENT 'Code',\n `website_id` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Website ID',\n `group_id` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Group ID',\n `name` varchar(255) NOT NULL COMMENT 'Store Name',\n `sort_order` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Store Sort Order',\n `is_active` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Store Activity',\n PRIMARY KEY (`store_id`),\n UNIQUE KEY `STORE_CODE` (`code`),\n KEY `STORE_WEBSITE_ID` (`website_id`),\n KEY `STORE_IS_ACTIVE_SORT_ORDER` (`is_active`,`sort_order`),\n KEY `STORE_GROUP_ID` (`group_id`),\n CONSTRAINT `STORE_GROUP_ID_STORE_GROUP_GROUP_ID` FOREIGN KEY (`group_id`) REFERENCES `store_group` (`group_id`) ON DELETE CASCADE,\n CONSTRAINT `STORE_WEBSITE_ID_STORE_WEBSITE_WEBSITE_ID` FOREIGN KEY (`website_id`) REFERENCES `store_website` (`website_id`) ON DELETE CASCADE\n) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Stores';"
}
]
},
{
"intent_group_name": "Review & Rating Management",
"description": "Covers querying, creating, and updating the status and content of customer reviews and ratings.",
"intent_examples": [
"Search for reviews with the nickname 'Mike' and no review provided.",
"Modify the status to Pending for reviews that are rated as zero.",
"Set the status to 'Approved' for reviews described as 'soft'.",
"Can you provide the count of reviews that have the nickname 'Shon' and are rated 'perfectly'?",
"Find reviews from Gerald with the comment 'broke'.",
"Change the status of the review for 'Jovan' to approved.",
"How many reviews are there with the nickname 'Shon' and an approved status?",
"Look up reviews with a status of pending for the 'Taurus Elements Shell' product.",
"Change the Review's status to Pending, where the nickname is 'Manual'.",
"Find all reviews with a status of approved for the 'Zing Jump Rope' product.",
"List all 'product reviews' for review."
],
"tables": [
{
"table_name": "review",
"description": "Core table for reviews, linking a product to a review status.",
"schema": "CREATE TABLE `review` (\n `review_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Review ID',\n `created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'Review create date',\n `entity_id` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Entity ID',\n `entity_pk_value` int(10) unsigned NOT NULL DEFAULT 0 COMMENT 'Product ID',\n `status_id` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Status code',\n PRIMARY KEY (`review_id`),\n KEY `REVIEW_ENTITY_ID` (`entity_id`),\n KEY `REVIEW_STATUS_ID` (`status_id`),\n KEY `REVIEW_ENTITY_PK_VALUE` (`entity_pk_value`),\n CONSTRAINT `REVIEW_ENTITY_ID_REVIEW_ENTITY_ENTITY_ID` FOREIGN KEY (`entity_id`) REFERENCES `review_entity` (`entity_id`) ON DELETE CASCADE,\n CONSTRAINT `REVIEW_STATUS_ID_REVIEW_STATUS_STATUS_ID` FOREIGN KEY (`status_id`) REFERENCES `review_status` (`status_id`) ON DELETE NO ACTION\n) ENGINE=InnoDB AUTO_INCREMENT=354 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Review base information';"
},
{
"table_name": "review_detail",
"description": "Stores the detailed content of a review, including title, text, and nickname.",
"schema": "CREATE TABLE `review_detail` (\n `detail_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Review detail ID',\n `review_id` bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT 'Review ID',\n `store_id` smallint(5) unsigned DEFAULT 0 COMMENT 'Store ID',\n `title` varchar(255) NOT NULL COMMENT 'Title',\n `detail` text NOT NULL COMMENT 'Detail description',\n `nickname` varchar(128) NOT NULL COMMENT 'User nickname',\n `customer_id` int(10) unsigned DEFAULT NULL COMMENT 'Customer ID',\n PRIMARY KEY (`detail_id`),\n KEY `REVIEW_DETAIL_REVIEW_ID` (`review_id`),\n KEY `REVIEW_DETAIL_STORE_ID` (`store_id`),\n KEY `REVIEW_DETAIL_CUSTOMER_ID` (`customer_id`),\n CONSTRAINT `REVIEW_DETAIL_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID` FOREIGN KEY (`customer_id`) REFERENCES `customer_entity` (`entity_id`) ON DELETE SET NULL,\n CONSTRAINT `REVIEW_DETAIL_REVIEW_ID_REVIEW_REVIEW_ID` FOREIGN KEY (`review_id`) REFERENCES `review` (`review_id`) ON DELETE CASCADE,\n CONSTRAINT `REVIEW_DETAIL_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE SET NULL\n) ENGINE=InnoDB AUTO_INCREMENT=354 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Review detail information';"
},
{
"table_name": "review_status",
"description": "Defines the possible statuses for a review (e.g., 'Pending', 'Approved').",
"schema": "CREATE TABLE `review_status` (\n `status_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Status ID',\n `status_code` varchar(32) NOT NULL COMMENT 'Status code',\n PRIMARY KEY (`status_id`)\n) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Review statuses';"
},
{
"table_name": "rating",
"description": "Defines rating criteria, such as 'Quality', 'Price', etc.",
"schema": "CREATE TABLE `rating` (\n `rating_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Rating ID',\n `entity_id` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Entity ID',\n `rating_code` varchar(64) NOT NULL COMMENT 'Rating Code',\n `position` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Rating Position On Storefront',\n `is_active` smallint(6) NOT NULL DEFAULT 1 COMMENT 'Rating is active.',\n PRIMARY KEY (`rating_id`),\n UNIQUE KEY `RATING_RATING_CODE` (`rating_code`),\n KEY `RATING_ENTITY_ID` (`entity_id`),\n CONSTRAINT `RATING_ENTITY_ID_RATING_ENTITY_ENTITY_ID` FOREIGN KEY (`entity_id`) REFERENCES `rating_entity` (`entity_id`) ON DELETE CASCADE\n) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Ratings';"
},
{
"table_name": "rating_option",
"description": "Defines the options available for a rating (e.g., 1 to 5 stars).",
"schema": "CREATE TABLE `rating_option` (\n `option_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Rating Option ID',\n `rating_id` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Rating ID',\n `code` varchar(32) NOT NULL COMMENT 'Rating Option Code',\n `value` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Rating Option Value',\n `position` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Ration option position on Storefront',\n PRIMARY KEY (`option_id`),\n KEY `RATING_OPTION_RATING_ID` (`rating_id`),\n CONSTRAINT `RATING_OPTION_RATING_ID_RATING_RATING_ID` FOREIGN KEY (`rating_id`) REFERENCES `rating` (`rating_id`) ON DELETE CASCADE\n) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Rating options';"
},
{
"table_name": "rating_option_vote",
"description": "Stores each individual vote cast by a customer for a specific rating on a product.",
"schema": "CREATE TABLE `rating_option_vote` (\n `vote_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Vote ID',\n `option_id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT 'Vote option ID',\n `remote_ip` varchar(16) NOT NULL COMMENT 'Customer IP',\n `remote_ip_long` bigint(20) NOT NULL DEFAULT 0 COMMENT 'Customer IP converted to long integer format',\n `customer_id` int(10) unsigned DEFAULT 0 COMMENT 'Customer ID',\n `entity_pk_value` bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT 'Product ID',\n `rating_id` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Rating ID',\n `review_id` bigint(20) unsigned DEFAULT NULL COMMENT 'Review ID',\n `percent` smallint(6) NOT NULL DEFAULT 0 COMMENT 'Percent amount',\n `value` smallint(6) NOT NULL DEFAULT 0 COMMENT 'Vote option value',\n PRIMARY KEY (`vote_id`),\n KEY `RATING_OPTION_VOTE_REVIEW_ID_REVIEW_REVIEW_ID` (`review_id`),\n KEY `RATING_OPTION_VOTE_OPTION_ID` (`option_id`),\n CONSTRAINT `RATING_OPTION_VOTE_OPTION_ID_RATING_OPTION_OPTION_ID` FOREIGN KEY (`option_id`) REFERENCES `rating_option` (`option_id`) ON DELETE CASCADE,\n CONSTRAINT `RATING_OPTION_VOTE_REVIEW_ID_REVIEW_REVIEW_ID` FOREIGN KEY (`review_id`) REFERENCES `review` (`review_id`) ON DELETE CASCADE\n) ENGINE=InnoDB AUTO_INCREMENT=354 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Rating option values';"
},
{
"table_name": "catalog_product_entity",
"description": "The core product table, used to link reviews to a specific product.",
"schema": "CREATE TABLE `catalog_product_entity` (\n `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',\n `attribute_set_id` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Attribute Set ID',\n `type_id` varchar(32) NOT NULL DEFAULT 'simple' COMMENT 'Type ID',\n `sku` varchar(64) NOT NULL COMMENT 'SKU',\n `has_options` smallint(6) NOT NULL DEFAULT 0 COMMENT 'Has Options',\n `required_options` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Required Options',\n `created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'Creation Time',\n `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'Update Time',\n PRIMARY KEY (`entity_id`),\n KEY `CATALOG_PRODUCT_ENTITY_ATTRIBUTE_SET_ID` (`attribute_set_id`),\n KEY `CATALOG_PRODUCT_ENTITY_SKU` (`sku`)\n) ENGINE=InnoDB AUTO_INCREMENT=2051 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Catalog Product Table';"
},
{
"table_name": "store",
"description": "Defines individual store views, used to scope reviews.",
"schema": "CREATE TABLE `store` (\n `store_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Store ID',\n `code` varchar(32) DEFAULT NULL COMMENT 'Code',\n `website_id` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Website ID',\n `group_id` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Group ID',\n `name` varchar(255) NOT NULL COMMENT 'Store Name',\n `sort_order` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Store Sort Order',\n `is_active` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Store Activity',\n PRIMARY KEY (`store_id`),\n UNIQUE KEY `STORE_CODE` (`code`),\n KEY `STORE_WEBSITE_ID` (`website_id`),\n KEY `STORE_IS_ACTIVE_SORT_ORDER` (`is_active`,`sort_order`),\n KEY `STORE_GROUP_ID` (`group_id`),\n CONSTRAINT `STORE_GROUP_ID_STORE_GROUP_GROUP_ID` FOREIGN KEY (`group_id`) REFERENCES `store_group` (`group_id`) ON DELETE CASCADE,\n CONSTRAINT `STORE_WEBSITE_ID_STORE_WEBSITE_WEBSITE_ID` FOREIGN KEY (`website_id`) REFERENCES `store_website` (`website_id`) ON DELETE CASCADE\n) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Stores';"
}
]
},
{
"intent_group_name": "Reporting & Analytics",
"description": "Covers generating sales reports, bestseller lists, and order statistics.",
"intent_examples": [
"Identify the customer(s) who have finished the third highest number of orders in the entire history.",
"Which are the top 5 items with the highest sales in June 2022?",
"Please generate an order report over the last 33 days up to 11/03/2022.",
"Obtain the pricing details from the bestseller report covering the range of 04/28/2022 to 10/31/2022.",
"Determine the 1 product types with the best sales performance in September 2022.",
"Displays the monthly count of successful orders for from January to May 2022.",
"Discover the brands that appear most often within the top search queries.",
"Identify the top-2 highest-selling products during June 2022.",
"Compare the payment difference of the last 4 cancelled orders and completed orders.",
"Fetch 'Order Quantity' from the report on best-selling products between October 1st and 31st, 2022.",
"List the order total reports."
],
"tables": [
{
"table_name": "sales_bestsellers_aggregated_daily",
"description": "Aggregated daily data for bestselling products.",
"schema": "CREATE TABLE `sales_bestsellers_aggregated_daily` (\n `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `period` date DEFAULT NULL COMMENT 'Period',\n `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store ID',\n `product_id` int(10) unsigned DEFAULT NULL COMMENT 'Product ID',\n `product_name` varchar(255) DEFAULT NULL COMMENT 'Product Name',\n `product_price` decimal(12,4) NOT NULL DEFAULT 0.0000 COMMENT 'Product Price',\n `qty_ordered` decimal(12,4) NOT NULL DEFAULT 0.0000 COMMENT 'Qty Ordered',\n `rating_pos` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Rating Pos',\n PRIMARY KEY (`id`),\n UNIQUE KEY `SALES_BESTSELLERS_AGGREGATED_DAILY_PERIOD_STORE_ID_PRODUCT_ID` (`period`,`store_id`,`product_id`),\n KEY `SALES_BESTSELLERS_AGGREGATED_DAILY_STORE_ID` (`store_id`),\n KEY `SALES_BESTSELLERS_AGGREGATED_DAILY_PRODUCT_ID` (`product_id`),\n CONSTRAINT `SALES_BESTSELLERS_AGGREGATED_DAILY_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE CASCADE\n) ENGINE=InnoDB AUTO_INCREMENT=1141 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Sales Bestsellers Aggregated Daily';"
},
{
"table_name": "sales_bestsellers_aggregated_monthly",
"description": "Aggregated monthly data for bestselling products.",
"schema": "CREATE TABLE `sales_bestsellers_aggregated_monthly` (\n `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `period` date DEFAULT NULL COMMENT 'Period',\n `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store ID',\n `product_id` int(10) unsigned DEFAULT NULL COMMENT 'Product ID',\n `product_name` varchar(255) DEFAULT NULL COMMENT 'Product Name',\n `product_price` decimal(12,4) NOT NULL DEFAULT 0.0000 COMMENT 'Product Price',\n `qty_ordered` decimal(12,4) NOT NULL DEFAULT 0.0000 COMMENT 'Qty Ordered',\n `rating_pos` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Rating Pos',\n PRIMARY KEY (`id`),\n UNIQUE KEY `SALES_BESTSELLERS_AGGREGATED_MONTHLY_PERIOD_STORE_ID_PRODUCT_ID` (`period`,`store_id`,`product_id`),\n KEY `SALES_BESTSELLERS_AGGREGATED_MONTHLY_STORE_ID` (`store_id`),\n KEY `SALES_BESTSELLERS_AGGREGATED_MONTHLY_PRODUCT_ID` (`product_id`),\n CONSTRAINT `SALES_BESTSELLERS_AGGREGATED_MONTHLY_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE CASCADE\n) ENGINE=InnoDB AUTO_INCREMENT=1060 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Sales Bestsellers Aggregated Monthly';"
},
{
"table_name": "sales_bestsellers_aggregated_yearly",
"description": "Aggregated yearly data for bestselling products.",
"schema": "CREATE TABLE `sales_bestsellers_aggregated_yearly` (\n `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `period` date DEFAULT NULL COMMENT 'Period',\n `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store ID',\n `product_id` int(10) unsigned DEFAULT NULL COMMENT 'Product ID',\n `product_name` varchar(255) DEFAULT NULL COMMENT 'Product Name',\n `product_price` decimal(12,4) NOT NULL DEFAULT 0.0000 COMMENT 'Product Price',\n `qty_ordered` decimal(12,4) NOT NULL DEFAULT 0.0000 COMMENT 'Qty Ordered',\n `rating_pos` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Rating Pos',\n PRIMARY KEY (`id`),\n UNIQUE KEY `SALES_BESTSELLERS_AGGREGATED_YEARLY_PERIOD_STORE_ID_PRODUCT_ID` (`period`,`store_id`,`product_id`),\n KEY `SALES_BESTSELLERS_AGGREGATED_YEARLY_STORE_ID` (`store_id`),\n KEY `SALES_BESTSELLERS_AGGREGATED_YEARLY_PRODUCT_ID` (`product_id`),\n CONSTRAINT `SALES_BESTSELLERS_AGGREGATED_YEARLY_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE CASCADE\n) ENGINE=InnoDB AUTO_INCREMENT=1060 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Sales Bestsellers Aggregated Yearly';"
},
{
"table_name": "sales_order_aggregated_created",
"description": "Aggregated sales data based on order creation date.",
"schema": "CREATE TABLE `sales_order_aggregated_created` (\n `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',\n `period` date DEFAULT NULL COMMENT 'Period',\n `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store ID',\n `order_status` varchar(50) NOT NULL COMMENT 'Order Status',\n `orders_count` int(11) NOT NULL DEFAULT 0 COMMENT 'Orders Count',\n `total_qty_ordered` decimal(12,4) NOT NULL DEFAULT 0.0000 COMMENT 'Total Qty Ordered',\n `total_qty_invoiced` decimal(12,4) NOT NULL DEFAULT 0.0000 COMMENT 'Total Qty Invoiced',\n `total_income_amount` decimal(20,4) NOT NULL DEFAULT 0.0000 COMMENT 'Total Income Amount',\n `total_revenue_amount` decimal(20,4) NOT NULL DEFAULT 0.0000 COMMENT 'Total Revenue Amount',\n `total_profit_amount` decimal(20,4) NOT NULL DEFAULT 0.0000 COMMENT 'Total Profit Amount',\n `total_invoiced_amount` decimal(20,4) NOT NULL DEFAULT 0.0000 COMMENT 'Total Invoiced Amount',\n `total_canceled_amount` decimal(20,4) NOT NULL DEFAULT 0.0000 COMMENT 'Total Canceled Amount',\n `total_paid_amount` decimal(20,4) NOT NULL DEFAULT 0.0000 COMMENT 'Total Paid Amount',\n `total_refunded_amount` decimal(20,4) NOT NULL DEFAULT 0.0000 COMMENT 'Total Refunded Amount',\n `total_tax_amount` decimal(20,4) NOT NULL DEFAULT 0.0000 COMMENT 'Total Tax Amount',\n `total_tax_amount_actual` decimal(20,4) NOT NULL DEFAULT 0.0000 COMMENT 'Total Tax Amount Actual',\n `total_shipping_amount` decimal(20,4) NOT NULL DEFAULT 0.0000 COMMENT 'Total Shipping Amount',\n `total_shipping_amount_actual` decimal(20,4) NOT NULL DEFAULT 0.0000 COMMENT 'Total Shipping Amount Actual',\n `total_discount_amount` decimal(20,4) NOT NULL DEFAULT 0.0000 COMMENT 'Total Discount Amount',\n `total_discount_amount_actual` decimal(20,4) NOT NULL DEFAULT 0.0000 COMMENT 'Total Discount Amount Actual',\n PRIMARY KEY (`id`),\n UNIQUE KEY `SALES_ORDER_AGGREGATED_CREATED_PERIOD_STORE_ID_ORDER_STATUS` (`period`,`store_id`,`order_status`),\n KEY `SALES_ORDER_AGGREGATED_CREATED_STORE_ID` (`store_id`),\n CONSTRAINT `SALES_ORDER_AGGREGATED_CREATED_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE SET NULL\n) ENGINE=InnoDB AUTO_INCREMENT=814 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Sales Order Aggregated Created';"
},
{
"table_name": "sales_order",
"description": "The core order table, used for direct calculation when aggregated data is insufficient.",
"schema": "CREATE TABLE `sales_order` (\n `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',\n `state` varchar(32) DEFAULT NULL COMMENT 'State',\n `status` varchar(32) DEFAULT NULL COMMENT 'Status',\n `coupon_code` varchar(255) DEFAULT NULL COMMENT 'Coupon Code',\n `protect_code` varchar(255) DEFAULT NULL COMMENT 'Protect Code',\n `shipping_description` varchar(255) DEFAULT NULL COMMENT 'Shipping Description',\n `is_virtual` smallint(5) unsigned DEFAULT NULL COMMENT 'Is Virtual',\n `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store ID',\n `customer_id` int(10) unsigned DEFAULT NULL COMMENT 'Customer ID',\n `base_discount_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Amount',\n `base_discount_canceled` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Canceled',\n `base_discount_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Invoiced',\n `base_discount_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Refunded',\n `base_grand_total` decimal(20,4) DEFAULT NULL COMMENT 'Base Grand Total',\n `base_shipping_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Amount',\n `base_shipping_canceled` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Canceled',\n `base_shipping_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Invoiced',\n `base_shipping_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Refunded',\n `base_shipping_tax_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Tax Amount',\n `base_shipping_tax_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Tax Refunded',\n `base_subtotal` decimal(20,4) DEFAULT NULL COMMENT 'Base Subtotal',\n `base_subtotal_canceled` decimal(20,4) DEFAULT NULL COMMENT 'Base Subtotal Canceled',\n `base_subtotal_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Base Subtotal Invoiced',\n `base_subtotal_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Subtotal Refunded',\n `base_tax_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Tax Amount',\n `base_tax_canceled` decimal(20,4) DEFAULT NULL COMMENT 'Base Tax Canceled',\n `base_tax_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Base Tax Invoiced',\n `base_tax_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Tax Refunded',\n `base_to_global_rate` decimal(20,4) DEFAULT NULL COMMENT 'Base To Global Rate',\n `base_to_order_rate` decimal(20,4) DEFAULT NULL COMMENT 'Base To Order Rate',\n `base_total_canceled` decimal(20,4) DEFAULT NULL COMMENT 'Base Total Canceled',\n `base_total_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Base Total Invoiced',\n `base_total_invoiced_cost` decimal(20,4) DEFAULT NULL COMMENT 'Base Total Invoiced Cost',\n `base_total_offline_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Total Offline Refunded',\n `base_total_online_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Total Online Refunded',\n `base_total_paid` decimal(20,4) DEFAULT NULL COMMENT 'Base Total Paid',\n `base_total_qty_ordered` decimal(12,4) DEFAULT NULL COMMENT 'Base Total Qty Ordered',\n `base_total_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Total Refunded',\n `discount_amount` decimal(20,4) DEFAULT NULL COMMENT 'Discount Amount',\n `discount_canceled` decimal(20,4) DEFAULT NULL COMMENT 'Discount Canceled',\n `discount_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Discount Invoiced',\n `discount_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Discount Refunded',\n `grand_total` decimal(20,4) DEFAULT NULL COMMENT 'Grand Total',\n `shipping_amount` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Amount',\n `shipping_canceled` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Canceled',\n `shipping_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Invoiced',\n `shipping_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Refunded',\n `shipping_tax_amount` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Tax Amount',\n `shipping_tax_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Tax Refunded',\n `store_to_base_rate` decimal(12,4) DEFAULT NULL COMMENT 'Store To Base Rate',\n `store_to_order_rate` decimal(12,4) DEFAULT NULL COMMENT 'Store To Order Rate',\n `subtotal` decimal(20,4) DEFAULT NULL COMMENT 'Subtotal',\n `subtotal_canceled` decimal(20,4) DEFAULT NULL COMMENT 'Subtotal Canceled',\n `subtotal_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Subtotal Invoiced',\n `subtotal_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Subtotal Refunded',\n `tax_amount` decimal(20,4) DEFAULT NULL COMMENT 'Tax Amount',\n `tax_canceled` decimal(20,4) DEFAULT NULL COMMENT 'Tax Canceled',\n `tax_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Tax Invoiced',\n `tax_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Tax Refunded',\n `total_canceled` decimal(20,4) DEFAULT NULL COMMENT 'Total Canceled',\n `total_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Total Invoiced',\n `total_offline_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Total Offline Refunded',\n `total_online_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Total Online Refunded',\n `total_paid` decimal(20,4) DEFAULT NULL COMMENT 'Total Paid',\n `total_qty_ordered` decimal(12,4) DEFAULT NULL COMMENT 'Total Qty Ordered',\n `total_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Total Refunded',\n `can_ship_partially` smallint(5) unsigned DEFAULT NULL COMMENT 'Can Ship Partially',\n `can_ship_partially_item` smallint(5) unsigned DEFAULT NULL COMMENT 'Can Ship Partially Item',\n `customer_is_guest` smallint(5) unsigned DEFAULT NULL COMMENT 'Customer Is Guest',\n `customer_note_notify` smallint(5) unsigned DEFAULT NULL COMMENT 'Customer Note Notify',\n `billing_address_id` int(11) DEFAULT NULL COMMENT 'Billing Address ID',\n `customer_group_id` int(11) DEFAULT NULL,\n `edit_increment` int(11) DEFAULT NULL COMMENT 'Edit Increment',\n `email_sent` smallint(5) unsigned DEFAULT NULL COMMENT 'Email Sent',\n `send_email` smallint(5) unsigned DEFAULT NULL COMMENT 'Send Email',\n `forced_shipment_with_invoice` smallint(5) unsigned DEFAULT NULL COMMENT 'Forced Do Shipment With Invoice',\n `payment_auth_expiration` int(11) DEFAULT NULL COMMENT 'Payment Authorization Expiration',\n `quote_address_id` int(11) DEFAULT NULL COMMENT 'Quote Address ID',\n `quote_id` int(11) DEFAULT NULL COMMENT 'Quote ID',\n `shipping_address_id` int(11) DEFAULT NULL COMMENT 'Shipping Address ID',\n `adjustment_negative` decimal(20,4) DEFAULT NULL COMMENT 'Adjustment Negative',\n `adjustment_positive` decimal(20,4) DEFAULT NULL COMMENT 'Adjustment Positive',\n `base_adjustment_negative` decimal(20,4) DEFAULT NULL COMMENT 'Base Adjustment Negative',\n `base_adjustment_positive` decimal(20,4) DEFAULT NULL COMMENT 'Base Adjustment Positive',\n `base_shipping_discount_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Discount Amount',\n `base_subtotal_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Base Subtotal Incl Tax',\n `base_total_due` decimal(20,4) DEFAULT NULL COMMENT 'Base Total Due',\n `payment_authorization_amount` decimal(20,4) DEFAULT NULL COMMENT 'Payment Authorization Amount',\n `shipping_discount_amount` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Discount Amount',\n `subtotal_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Subtotal Incl Tax',\n `total_due` decimal(20,4) DEFAULT NULL COMMENT 'Total Due',\n `weight` decimal(12,4) DEFAULT NULL COMMENT 'Weight',\n `customer_dob` datetime DEFAULT NULL COMMENT 'Customer Dob',\n `increment_id` varchar(50) DEFAULT NULL COMMENT 'Increment ID',\n `applied_rule_ids` varchar(128) DEFAULT NULL COMMENT 'Applied Rule Ids',\n `base_currency_code` varchar(3) DEFAULT NULL COMMENT 'Base Currency Code',\n `customer_email` varchar(128) DEFAULT NULL COMMENT 'Customer Email',\n `customer_firstname` varchar(128) DEFAULT NULL COMMENT 'Customer Firstname',\n `customer_lastname` varchar(128) DEFAULT NULL COMMENT 'Customer Lastname',\n `customer_middlename` varchar(128) DEFAULT NULL COMMENT 'Customer Middlename',\n `customer_prefix` varchar(32) DEFAULT NULL COMMENT 'Customer Prefix',\n `customer_suffix` varchar(32) DEFAULT NULL COMMENT 'Customer Suffix',\n `customer_taxvat` varchar(32) DEFAULT NULL COMMENT 'Customer Taxvat',\n `discount_description` varchar(255) DEFAULT NULL COMMENT 'Discount Description',\n `ext_customer_id` varchar(32) DEFAULT NULL COMMENT 'Ext Customer ID',\n `ext_order_id` varchar(32) DEFAULT NULL COMMENT 'Ext Order ID',\n `global_currency_code` varchar(3) DEFAULT NULL COMMENT 'Global Currency Code',\n `hold_before_state` varchar(32) DEFAULT NULL COMMENT 'Hold Before State',\n `hold_before_status` varchar(32) DEFAULT NULL COMMENT 'Hold Before Status',\n `order_currency_code` varchar(3) DEFAULT NULL COMMENT 'Order Currency Code',\n `original_increment_id` varchar(50) DEFAULT NULL COMMENT 'Original Increment ID',\n `relation_child_id` varchar(32) DEFAULT NULL COMMENT 'Relation Child ID',\n `relation_child_real_id` varchar(32) DEFAULT NULL COMMENT 'Relation Child Real ID',\n `relation_parent_id` varchar(32) DEFAULT NULL COMMENT 'Relation Parent ID',\n `relation_parent_real_id` varchar(32) DEFAULT NULL COMMENT 'Relation Parent Real ID',\n `remote_ip` varchar(45) DEFAULT NULL COMMENT 'Remote Ip',\n `shipping_method` varchar(120) DEFAULT NULL,\n `store_currency_code` varchar(3) DEFAULT NULL COMMENT 'Store Currency Code',\n `store_name` varchar(255) DEFAULT NULL COMMENT 'Store Name',\n `x_forwarded_for` varchar(255) DEFAULT NULL COMMENT 'X Forwarded For',\n `customer_note` text DEFAULT NULL COMMENT 'Customer Note',\n `created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'Created At',\n `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'Updated At',\n `total_item_count` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Total Item Count',\n `customer_gender` int(11) DEFAULT NULL COMMENT 'Customer Gender',\n `discount_tax_compensation_amount` decimal(20,4) DEFAULT NULL COMMENT 'Discount Tax Compensation Amount',\n `base_discount_tax_compensation_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Tax Compensation Amount',\n `shipping_discount_tax_compensation_amount` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Discount Tax Compensation Amount',\n `base_shipping_discount_tax_compensation_amnt` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Discount Tax Compensation Amount',\n `discount_tax_compensation_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Discount Tax Compensation Invoiced',\n `base_discount_tax_compensation_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Tax Compensation Invoiced',\n `discount_tax_compensation_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Discount Tax Compensation Refunded',\n `base_discount_tax_compensation_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Tax Compensation Refunded',\n `shipping_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Incl Tax',\n `base_shipping_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Incl Tax',\n `coupon_rule_name` varchar(255) DEFAULT NULL COMMENT 'Coupon Sales Rule Name',\n `gift_message_id` int(11) DEFAULT NULL COMMENT 'Gift Message ID',\n `paypal_ipn_customer_notified` int(11) DEFAULT 0 COMMENT 'Paypal Ipn Customer Notified',\n PRIMARY KEY (`entity_id`),\n UNIQUE KEY `SALES_ORDER_INCREMENT_ID_STORE_ID` (`increment_id`,`store_id`),\n KEY `SALES_ORDER_STATUS` (`status`),\n KEY `SALES_ORDER_STATE` (`state`),\n KEY `SALES_ORDER_STORE_ID` (`store_id`),\n KEY `SALES_ORDER_CREATED_AT` (`created_at`),\n KEY `SALES_ORDER_CUSTOMER_ID` (`customer_id`),\n KEY `SALES_ORDER_EXT_ORDER_ID` (`ext_order_id`),\n KEY `SALES_ORDER_QUOTE_ID` (`quote_id`),\n KEY `SALES_ORDER_UPDATED_AT` (`updated_at`),\n KEY `SALES_ORDER_SEND_EMAIL` (`send_email`),\n KEY `SALES_ORDER_EMAIL_SENT` (`email_sent`),\n CONSTRAINT `SALES_ORDER_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID` FOREIGN KEY (`customer_id`) REFERENCES `customer_entity` (`entity_id`) ON DELETE SET NULL,\n CONSTRAINT `SALES_ORDER_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE SET NULL\n) ENGINE=InnoDB AUTO_INCREMENT=309 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Sales Flat Order';"
},
{
"table_name": "sales_order_item",
"description": "Stores the individual items (products) within each order, crucial for sales calculations.",
"schema": "CREATE TABLE `sales_order_item` (\n `item_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Item ID',\n `order_id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT 'Order ID',\n `parent_item_id` int(10) unsigned DEFAULT NULL COMMENT 'Parent Item ID',\n `quote_item_id` int(10) unsigned DEFAULT NULL COMMENT 'Quote Item ID',\n `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store ID',\n `created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'Created At',\n `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'Updated At',\n `product_id` int(10) unsigned DEFAULT NULL COMMENT 'Product ID',\n `product_type` varchar(255) DEFAULT NULL COMMENT 'Product Type',\n `product_options` longtext DEFAULT NULL COMMENT 'Product Options',\n `weight` decimal(12,4) DEFAULT 0.0000 COMMENT 'Weight',\n `is_virtual` smallint(5) unsigned DEFAULT NULL COMMENT 'Is Virtual',\n `sku` varchar(255) DEFAULT NULL COMMENT 'Sku',\n `name` varchar(255) DEFAULT NULL COMMENT 'Name',\n `description` text DEFAULT NULL COMMENT 'Description',\n `applied_rule_ids` text DEFAULT NULL COMMENT 'Applied Rule Ids',\n `additional_data` text DEFAULT NULL COMMENT 'Additional Data',\n `is_qty_decimal` smallint(5) unsigned DEFAULT NULL COMMENT 'Is Qty Decimal',\n `no_discount` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'No Discount',\n `qty_backordered` decimal(12,4) DEFAULT 0.0000 COMMENT 'Qty Backordered',\n `qty_canceled` decimal(12,4) DEFAULT 0.0000 COMMENT 'Qty Canceled',\n `qty_invoiced` decimal(12,4) DEFAULT 0.0000 COMMENT 'Qty Invoiced',\n `qty_ordered` decimal(12,4) DEFAULT 0.0000 COMMENT 'Qty Ordered',\n `qty_refunded` decimal(12,4) DEFAULT 0.0000 COMMENT 'Qty Refunded',\n `qty_shipped` decimal(12,4) DEFAULT 0.0000 COMMENT 'Qty Shipped',\n `base_cost` decimal(12,4) DEFAULT 0.0000 COMMENT 'Base Cost',\n `price` decimal(12,4) NOT NULL DEFAULT 0.0000 COMMENT 'Price',\n `base_price` decimal(12,4) NOT NULL DEFAULT 0.0000 COMMENT 'Base Price',\n `original_price` decimal(12,4) DEFAULT NULL COMMENT 'Original Price',\n `base_original_price` decimal(12,4) DEFAULT NULL COMMENT 'Base Original Price',\n `tax_percent` decimal(12,4) DEFAULT 0.0000 COMMENT 'Tax Percent',\n `tax_amount` decimal(20,4) DEFAULT 0.0000 COMMENT 'Tax Amount',\n `base_tax_amount` decimal(20,4) DEFAULT 0.0000 COMMENT 'Base Tax Amount',\n `tax_invoiced` decimal(20,4) DEFAULT 0.0000 COMMENT 'Tax Invoiced',\n `base_tax_invoiced` decimal(20,4) DEFAULT 0.0000 COMMENT 'Base Tax Invoiced',\n `discount_percent` decimal(12,4) DEFAULT 0.0000 COMMENT 'Discount Percent',\n `discount_amount` decimal(20,4) DEFAULT 0.0000 COMMENT 'Discount Amount',\n `base_discount_amount` decimal(20,4) DEFAULT 0.0000 COMMENT 'Base Discount Amount',\n `discount_invoiced` decimal(20,4) DEFAULT 0.0000 COMMENT 'Discount Invoiced',\n `base_discount_invoiced` decimal(20,4) DEFAULT 0.0000 COMMENT 'Base Discount Invoiced',\n `amount_refunded` decimal(20,4) DEFAULT 0.0000 COMMENT 'Amount Refunded',\n `base_amount_refunded` decimal(20,4) DEFAULT 0.0000 COMMENT 'Base Amount Refunded',\n `row_total` decimal(20,4) NOT NULL DEFAULT 0.0000 COMMENT 'Row Total',\n `base_row_total` decimal(20,4) NOT NULL DEFAULT 0.0000 COMMENT 'Base Row Total',\n `row_invoiced` decimal(20,4) NOT NULL DEFAULT 0.0000 COMMENT 'Row Invoiced',\n `base_row_invoiced` decimal(20,4) NOT NULL DEFAULT 0.0000 COMMENT 'Base Row Invoiced',\n `row_weight` decimal(12,4) DEFAULT 0.0000 COMMENT 'Row Weight',\n `base_tax_before_discount` decimal(20,4) DEFAULT NULL COMMENT 'Base Tax Before Discount',\n `tax_before_discount` decimal(20,4) DEFAULT NULL COMMENT 'Tax Before Discount',\n `ext_order_item_id` varchar(255) DEFAULT NULL COMMENT 'Ext Order Item ID',\n `locked_do_invoice` smallint(5) unsigned DEFAULT NULL COMMENT 'Locked Do Invoice',\n `locked_do_ship` smallint(5) unsigned DEFAULT NULL COMMENT 'Locked Do Ship',\n `price_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Price Incl Tax',\n `base_price_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Base Price Incl Tax',\n `row_total_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Row Total Incl Tax',\n `base_row_total_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Base Row Total Incl Tax',\n `discount_tax_compensation_amount` decimal(20,4) DEFAULT NULL COMMENT 'Discount Tax Compensation Amount',\n `base_discount_tax_compensation_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Tax Compensation Amount',\n `discount_tax_compensation_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Discount Tax Compensation Invoiced',\n `base_discount_tax_compensation_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Tax Compensation Invoiced',\n `discount_tax_compensation_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Discount Tax Compensation Refunded',\n `base_discount_tax_compensation_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Tax Compensation Refunded',\n `tax_canceled` decimal(12,4) DEFAULT NULL COMMENT 'Tax Canceled',\n `discount_tax_compensation_canceled` decimal(20,4) DEFAULT NULL COMMENT 'Discount Tax Compensation Canceled',\n `tax_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Tax Refunded',\n `base_tax_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Tax Refunded',\n `discount_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Discount Refunded',\n `base_discount_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Refunded',\n `gift_message_id` int(11) DEFAULT NULL COMMENT 'Gift Message ID',\n `gift_message_available` int(11) DEFAULT NULL COMMENT 'Gift Message Available',\n `free_shipping` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Free Shipping',\n `weee_tax_applied` text DEFAULT NULL COMMENT 'Weee Tax Applied',\n `weee_tax_applied_amount` decimal(12,4) DEFAULT NULL COMMENT 'Weee Tax Applied Amount',\n `weee_tax_applied_row_amount` decimal(12,4) DEFAULT NULL COMMENT 'Weee Tax Applied Row Amount',\n `weee_tax_disposition` decimal(12,4) DEFAULT NULL COMMENT 'Weee Tax Disposition',\n `weee_tax_row_disposition` decimal(12,4) DEFAULT NULL COMMENT 'Weee Tax Row Disposition',\n `base_weee_tax_applied_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Weee Tax Applied Amount',\n `base_weee_tax_applied_row_amnt` decimal(12,4) DEFAULT NULL COMMENT 'Base Weee Tax Applied Row Amnt',\n `base_weee_tax_disposition` decimal(12,4) DEFAULT NULL COMMENT 'Base Weee Tax Disposition',\n `base_weee_tax_row_disposition` decimal(12,4) DEFAULT NULL COMMENT 'Base Weee Tax Row Disposition',\n PRIMARY KEY (`item_id`),\n KEY `SALES_ORDER_ITEM_ORDER_ID` (`order_id`),\n KEY `SALES_ORDER_ITEM_STORE_ID` (`store_id`),\n CONSTRAINT `SALES_ORDER_ITEM_ORDER_ID_SALES_ORDER_ENTITY_ID` FOREIGN KEY (`order_id`) REFERENCES `sales_order` (`entity_id`) ON DELETE CASCADE,\n CONSTRAINT `SALES_ORDER_ITEM_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE SET NULL\n) ENGINE=InnoDB AUTO_INCREMENT=1631 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Sales Flat Order Item';"
},
{
"table_name": "catalog_product_entity",
"description": "The core product table, linked from reports to get product details.",
"schema": "CREATE TABLE `catalog_product_entity` (\n `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',\n `attribute_set_id` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Attribute Set ID',\n `type_id` varchar(32) NOT NULL DEFAULT 'simple' COMMENT 'Type ID',\n `sku` varchar(64) NOT NULL COMMENT 'SKU',\n `has_options` smallint(6) NOT NULL DEFAULT 0 COMMENT 'Has Options',\n `required_options` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Required Options',\n `created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'Creation Time',\n `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'Update Time',\n PRIMARY KEY (`entity_id`),\n KEY `CATALOG_PRODUCT_ENTITY_ATTRIBUTE_SET_ID` (`attribute_set_id`),\n KEY `CATALOG_PRODUCT_ENTITY_SKU` (`sku`)\n) ENGINE=InnoDB AUTO_INCREMENT=2051 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Catalog Product Table';"
},
{
"table_name": "search_query",
"description": "Stores customer search terms, used for search term reports.",
"schema": "CREATE TABLE `search_query` (\n `query_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Query ID',\n `query_text` varchar(255) DEFAULT NULL COMMENT 'Query text',\n `num_results` int(10) unsigned NOT NULL DEFAULT 0 COMMENT 'Num results',\n `popularity` int(10) unsigned NOT NULL DEFAULT 0 COMMENT 'Popularity',\n `redirect` varchar(255) DEFAULT NULL COMMENT 'Redirect',\n `store_id` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Store ID',\n `display_in_terms` smallint(6) NOT NULL DEFAULT 1 COMMENT 'Display in terms',\n `is_active` smallint(6) DEFAULT 1 COMMENT 'Active status',\n `is_processed` smallint(6) DEFAULT 0 COMMENT 'Processed status',\n `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'Updated at',\n PRIMARY KEY (`query_id`),\n UNIQUE KEY `SEARCH_QUERY_QUERY_TEXT_STORE_ID` (`query_text`,`store_id`),\n KEY `SEARCH_QUERY_QUERY_TEXT_STORE_ID_POPULARITY` (`query_text`,`store_id`,`popularity`),\n KEY `SEARCH_QUERY_STORE_ID` (`store_id`),\n KEY `SEARCH_QUERY_IS_PROCESSED` (`is_processed`),\n KEY `SEARCH_QUERY_STORE_ID_POPULARITY` (`store_id`,`popularity`),\n CONSTRAINT `SEARCH_QUERY_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE CASCADE\n) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Search query table';"
},
{
"table_name": "store",
"description": "Defines individual store views, used to scope reports.",
"schema": "CREATE TABLE `store` (\n `store_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Store ID',\n `code` varchar(32) DEFAULT NULL COMMENT 'Code',\n `website_id` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Website ID',\n `group_id` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Group ID',\n `name` varchar(255) NOT NULL COMMENT 'Store Name',\n `sort_order` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Store Sort Order',\n `is_active` smallint(5) unsigned NOT NULL DEFAULT 0 COMMENT 'Store Activity',\n PRIMARY KEY (`store_id`),\n UNIQUE KEY `STORE_CODE` (`code`),\n KEY `STORE_WEBSITE_ID` (`website_id`),\n KEY `STORE_IS_ACTIVE_SORT_ORDER` (`is_active`,`sort_order`),\n KEY `STORE_GROUP_ID` (`group_id`),\n CONSTRAINT `STORE_GROUP_ID_STORE_GROUP_GROUP_ID` FOREIGN KEY (`group_id`) REFERENCES `store_group` (`group_id`) ON DELETE CASCADE,\n CONSTRAINT `STORE_WEBSITE_ID_STORE_WEBSITE_WEBSITE_ID` FOREIGN KEY (`website_id`) REFERENCES `store_website` (`website_id`) ON DELETE CASCADE\n) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Stores';"
}
]
}
]