AI-Ready Markdown Exporter & Prompt Manager

AI-Ready Markdown Exporter & Prompt Manager

Magento 2 AI-Ready Markdown Exporter & Prompt Manager

Export your Magento entities into token-optimized, clean structured Markdown format with a single click. Immediate data access for ChatGPT, Claude, and custom LLM models.

Seamless AI Workflow (No-Code Prompting)
The module enables administrators, marketers, and customer service staff to export relevant data (orders, products, carts, CMS content) with a single click. No more copy-paste formatting errors or junk character sets: the system immediately concatenates pre-configured AI templates with token-optimized Markdown data.

System Features & Operations

AI Sandbox Modal
A built-in "View AI Markdown" action button appears on the admin views of supported entities. Clicking it opens the Sandbox window, displaying a formatted Markdown preview, sortable Quick Prompt buttons, and a copy function that instantly puts the prompt with resolved variables and data onto the clipboard.

Quick Prompt CRUD & Abandoned Carts

Under the AI Exporter -> Manage Prompts menu, administrators can freely create and modify prompt templates per entity type, with full support for grid-level inline editing.
Since Magento does not include a native view for abandoned carts, the module provides a custom Abandoned Carts Grid interface to directly launch AI-driven cart recovery and reminder campaigns.
💡** Automatic Cache Invalidation:** Saving or deleting prompts automatically flushes the ai_markdown_prompts cache tag - no manual cache clearing required!

System Requirements & Compatibility

Magento Version: 2.4.8+
PHP Version: 8.4+
Core Dependency: WebtechSolutions_AiCore
External Library: league/html-to-markdown:^5.1
Admin UI Theme: Magento Luma (Stock Adminhtml UI)

Default Prompts Out-of-the-Box (Install Patch):
• Order → Customer Service Reply (Delay)
• Product → Generate SEO Description
• Customer → VIP Offer Email
• Review → Thank-You Reply to Review
• Quote → Abandoned Cart Reminder
• CMS → Summarize Content

1.0.0 - Released

  • "View AI Markdown" button on the admin views of the relevant entities (Order, Product, Review, Quote, Customer, CMS Page/Block)
  • AI Sandbox Modal: Quick Prompt buttons + read-only Markdown preview + "Copy to Clipboard"
  • Quick Prompt templates configurable per entity type, with dynamic placeholder variables
  • Dedicated admin menu (AI Exporter -> Manage Prompts) for CRUD management of prompts, with InlineEdit support
  • Custom "Abandoned Cart" admin grid (AI Exporter -> Abandoned Carts) — no such out-of-the-box Magento view exists
  • HTML → Markdown conversion (league/html-to-markdown) for CMS and product descriptions
  • ACL-based permission management per entity type (e.g. a packer role cannot export Customer LTV data)
  • Cached Quick Prompt lookups, automatically invalidated on prompt save/delete

Frequently Asked Questions

The module enables administrators, marketers, and customer service staff to export data from key Magento entities (orders, products, customers, reviews, abandoned carts, and CMS content) into clean, structured Markdown with a single click. This data is heavily token-optimized, stripping out heavy HTML or JSON code noise, making it perfectly tailored to be pasted directly into external Large Language Models (LLMs) like ChatGPT or Claude for rapid content generation, analysis, or communication.

Yes, absolutely. The module features a dedicated admin interface accessible via AI Exporter -> Manage Prompts. This interface provides a full CRUD grid with InlineEdit capabilities, allowing managers to instantly create, reorder, or toggle prompt templates per entity type. These templates support dynamic placeholders like {order_id}, {customer_name}, and {product_sku} that automatically resolve into real storefront data when the action is triggered.

The behavior of the Copy to Clipboard action adapts dynamically based on your selection:

  • No Quick Prompt Selected: The system copies only the raw, highly structured Markdown data table or list representing that specific entity.
  • Quick Prompt Selected: The system automatically injects your customized instruction template (with all dynamic placeholders fully resolved), appends a clean double line break (\n\n), and attaches the structural Markdown data right below it. A green "Copied!" checkmark will flash for 2 seconds to confirm a successful operation.

Button visibility is strictly tied to Magento's native ACL (Access Control List) authorization matrix. The module introduces individual, entity-scoped permissions (such as export_customer, export_order, and prompt_manage) under System > Permissions > User Roles. This granular design allows store managers to safely restrict specific user groups—for instance, blocking a warehouse packer role from seeing the customer export button to protect sensitive Customer Lifetime Value (LTV) analytics.

No, the module is built to meet a strict under-50ms target execution timeframe. The backend controller processes data directly from the already-loaded Magento entity context without triggering additional, heavy database queries. Furthermore, any large CMS block or page HTML conversions exceeding 50 KB are automatically cached and memoized in memory to prevent runtime performance degradation.

Since out-of-the-box Magento lacks a dedicated, actionable admin view for non-converted shopping sessions, the module introduces a custom grid located at AI Exporter -> Abandoned Carts. This workspace hooks directly into the core sales_quote tables to identify abandoned sessions and provides a direct row-level View AI Markdown action. This allows marketing teams to rapidly compile highly personalized cart-recovery emails or discount offers through external AI models using the exact items left behind.

No, manual cache flushes are entirely unnecessary. To maximize frontend modal performance, prompt lookups are optimized using a dedicated ai_markdown_prompts cache tag. However, the module features event-driven invalidation hooks, meaning the specific entity cache tag is wiped and rebuilt automatically the exact millisecond an administrator saves or deletes a prompt row in the manager.

The module is strictly engineered for Magento 2.4.8-p1 (Community Edition) running on PHP 8.4. Architecturally, it requires the core WebtechSolutions_AiCore module to be active and relies heavily on the industry-standard league/html-to-markdown Composer package (version ^5.1) to cleanly sanitize raw rich-text HTML elements into clean Markdown layouts before delivery to the AI sandbox.