๐ AI-Based Dashboard Layout Guide
Merciglobal Cloud ERP
This document provides a structured guide to generate AI-driven dashboard layouts for Merciglobal Cloud ERP. It is designed for:
- Customers
- Internal Merciglobal Developers
- Sales & Implementation Teams
๐ฏ Objective
Create intelligent, insight-driven dashboards that present critical business KPIs in a clean and structured format.
The dashboard must:
- Provide decision-making insights
- Highlight performance indicators
- Be visually structured using grid layout
๐ง AI Instruction Logic
The AI should act as:
- Business Analyst
- Data Analytics Expert
- Business Manager
It must generate widgets using predefined rules and structured output.
๐ Layout Structure Rules
Grid System
12xโ Full width (1 widget per row)6xโ 2 widgets per row4xโ 3 widgets per row3xโ 4 widgets per row
๐ Use 4x strictly for single KPI value widgets
๐ Widget Types
| Type | Description |
|---|---|
| value | Single KPI number |
| column | Vertical bar chart |
| bar | Horizontal bar chart |
| line | Trend over time |
| pie | Distribution comparison |
| map | Geographic visualization |
๐ For City-based data, include BOTH:
- Column Chart
- Map Widget
โ๏ธ Compute Functions
| Compute Type | Description |
|---|---|
| count | Total records |
| distinct | Unique values |
| sum | Total sum |
| avg | Average value |
| monthly | Monthly trend using date field |
| top | Top N records (based on value) |
| compare | Distribution comparison |
๐งพ Field Selection Rules
Focus only on important business fields:
- Include fields with
LINK_BROWโ Connected relational data - Include fields with
FIX_DDLโ Fixed dropdown categories - Avoid
det_*fields completely
๐งฉ Sample AI Dashboard Layout Output
projectfolder/dashboard/db_{tablename}.php
$layout = array();
$layout[] = array( "cols" => "4x", "type" => "value" , "table" => "trn_sorder", "field" => "id", "compute" => "count", "caption" => "Total Orders");
$layout[] = array( "cols" => "4x", "type" => "value" , "table" => "trn_sorder", "field" => "customerid", "compute" => "distinct", "caption" => "Total Customers");
$layout[] = array( "cols" => "4x", "type" => "value" , "table" => "trn_sorder", "field" => "finalamt", "compute" => "sum", "caption" => "Total Revenue");
$layout[] = array( "cols" => "6x", "type" => "column", "table" => "trn_sorder", "field" => "finalamt,date", "compute" => "monthly", "caption" => "Monthly Sales Trend");
$layout[] = array( "cols" => "6x", "type" => "line", "table" => "trn_sorder", "field" => "finalamt,date", "compute" => "monthly", "caption" => "Revenue Growth Trend");
$layout[] = array( "cols" => "6x", "type" => "bar", "table" => "trn_sorder", "field" => "customerid,finalamt", "compute" => "top", "caption" => "Top Customers");
$layout[] = array( "cols" => "6x", "type" => "pie", "table" => "trn_sorder", "field" => "status,finalamt", "compute" => "compare", "caption" => "Order Status Distribution");
$layout[] = array( "cols" => "6x", "type" => "column", "table" => "trn_sorder", "field" => "city,finalamt", "compute" => "top", "caption" => "Top Cities by Revenue");
$layout[] = array( "cols" => "6x", "type" => "map", "table" => "trn_sorder", "field" => "city,finalamt", "compute" => "top", "caption" => "Sales by Location");
$data["title"] = "Sales Dashboard";
$data["layout"] = $layout;
echo json_encode($data);
๐ Best Practices
- Always start with KPI cards (value widgets)
- Use monthly trends for performance tracking
- Include top analysis for customers, products, or regions
- Add distribution charts for categorical insights
- Maintain balanced layout (6x + 6x rows)
๐ผ Business Benefits in Merciglobal Cloud ERP
- Real-time decision making
- Improved sales visibility
- Better customer insights
- Performance tracking across modules
- AI-driven dashboard automation
๐ฆ Implementation Scope
This structure can be used across modules:
- Sales
- Purchase
- Inventory
- Finance
- CRM
๐ Conclusion
AI-based dashboards in Merciglobal Cloud ERP empower businesses with actionable insights and structured analytics.
By following the above layout rules and widget strategies, teams can create powerful, scalable, and intelligent dashboards tailored to business needs.
End of Document