Synthetic data scripts for sales
This commit is contained in:
parent
0d23d7e20a
commit
1b16dfdbf5
|
|
@ -0,0 +1,47 @@
|
|||
# ATB Commercial Sales Demo Scripts (`scripts/demo/`)
|
||||
|
||||
This directory contains executable automation scripts to support customer sales presentations, prospect trials, and commercial demonstrations for the **Agriculture Trading Backoffice (ATB)** platform.
|
||||
|
||||
---
|
||||
|
||||
## 1. Scripts Overview
|
||||
|
||||
| Script Name | Purpose | Production Safety Guardrails |
|
||||
|---|---|---|
|
||||
| [`seed_demo_data.py`](file:///home/ps-ch/w/prj/mandi/scripts/demo/seed_demo_data.py) | Provisions demo tenant `demo-malwa-agri`, 11 RBAC accounts, master data, connected transactions, and 20-day historical snapshots. | Multi-tenant isolated (`demo-*` only). Supports `--clean-first` for idempotent re-seeding. |
|
||||
| [`cleanup_demo_data.py`](file:///home/ps-ch/w/prj/mandi/scripts/demo/cleanup_demo_data.py) | Safely tears down the demo tenant and all child records across 24 relational collections in strict reverse cascade order. | **Enforced `demo-` slug prefix check** (hard-aborts on production/client IDs). Confirmation flag `--confirm-purge` required. |
|
||||
|
||||
---
|
||||
|
||||
## 2. Quickstart Execution
|
||||
|
||||
### Ingesting Demo Data:
|
||||
```bash
|
||||
# Clean existing demo records and re-seed fresh baseline:
|
||||
python3 scripts/demo/seed_demo_data.py --clean-first
|
||||
|
||||
# Seed custom demo tenant ID (must start with demo-):
|
||||
python3 scripts/demo/seed_demo_data.py --tenant-id demo-kisan-agri
|
||||
```
|
||||
|
||||
### Safely Cleaning Up Demo Data:
|
||||
```bash
|
||||
# Interactive confirmation prompt:
|
||||
python3 scripts/demo/cleanup_demo_data.py
|
||||
|
||||
# Non-interactive / CI / automated teardown:
|
||||
python3 scripts/demo/cleanup_demo_data.py --confirm-purge
|
||||
|
||||
# Clean specific demo tenant:
|
||||
python3 scripts/demo/cleanup_demo_data.py --tenant-id demo-kisan-agri --confirm-purge
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 3. Related Documentation
|
||||
|
||||
For complete narrative scripts, persona walkthroughs, and data recipes, refer to the governed SDLC package:
|
||||
- **Playbook & Script:** [`project_sdlc/08_review_ready_baselines/03_sales_demo_package/01_SALES_DEMO_PLAYBOOK_AND_WALKTHROUGHS.md`](file:///home/ps-ch/w/prj/mandi/project_sdlc/08_review_ready_baselines/03_sales_demo_package/01_SALES_DEMO_PLAYBOOK_AND_WALKTHROUGHS.md)
|
||||
- **Data Recipe & Storyboard:** [`project_sdlc/08_review_ready_baselines/03_sales_demo_package/02_DEMO_DATA_RECIPE_AND_STORYBOARD.md`](file:///home/ps-ch/w/prj/mandi/project_sdlc/08_review_ready_baselines/03_sales_demo_package/02_DEMO_DATA_RECIPE_AND_STORYBOARD.md)
|
||||
- **Environment Operations:** [`project_sdlc/08_review_ready_baselines/03_sales_demo_package/03_DEMO_ENVIRONMENT_OPERATIONS.md`](file:///home/ps-ch/w/prj/mandi/project_sdlc/08_review_ready_baselines/03_sales_demo_package/03_DEMO_ENVIRONMENT_OPERATIONS.md)
|
||||
|
||||
|
|
@ -0,0 +1,192 @@
|
|||
#!/usr/bin/env python3
|
||||
"""Agriculture Trading Backoffice (ATB) — Safe Demo Data Teardown Engine.
|
||||
|
||||
Standardized per UP-AI v1.5 Phase IV Transition Standards.
|
||||
Safely purges demo tenant data and all cascading relational records with strict
|
||||
production safety guardrails (enforced `demo-` slug prefix, confirmation flag).
|
||||
|
||||
Usage:
|
||||
python3 scripts/demo/cleanup_demo_data.py --confirm-purge
|
||||
python3 scripts/demo/cleanup_demo_data.py --tenant-id demo-malwa-agri --confirm-purge
|
||||
"""
|
||||
import argparse
|
||||
import os
|
||||
import sys
|
||||
|
||||
# Ensure project_code is importable
|
||||
CURRENT_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
PROJECT_ROOT = os.path.abspath(os.path.join(CURRENT_DIR, "..", ".."))
|
||||
PROJECT_CODE = os.path.join(PROJECT_ROOT, "project_code")
|
||||
|
||||
if PROJECT_CODE not in sys.path:
|
||||
sys.path.insert(0, PROJECT_CODE)
|
||||
|
||||
try:
|
||||
from backend.app.db.session import storage, InMemoryTenantStorage
|
||||
from sandbox.identity_mock import TEST_PERSONAS
|
||||
except ImportError as e:
|
||||
print(f"[ERROR] Failed to import backend components from {PROJECT_CODE}: {e}", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
DEFAULT_TENANT_ID = "demo-malwa-agri"
|
||||
|
||||
|
||||
# Collections in strict reverse-relational dependency order for cascade deletion
|
||||
CASCADE_PURGE_ORDER = [
|
||||
# Level 5: Analytics, Alerts & Historical Reporting
|
||||
("daily_trading_snapshots", "Daily Trading Snapshots"),
|
||||
("operational_alerts", "Operational Hazard Alerts"),
|
||||
|
||||
# Level 4: Financial Subledgers, Vouchers & Payables
|
||||
("mandi_expense_vouchers", "Mandi Cess Expense Vouchers"),
|
||||
("supplier_payables", "Supplier Accounts Payable"),
|
||||
("party_subledger_entries", "Party Double-Entry Subledgers"),
|
||||
|
||||
# Level 3: Outbound Logistics, Consignment Bilties & Weighments
|
||||
("dispatch_bilties", "Transport Consignment Bilties"),
|
||||
("outward_weighments", "Outward Weighbridge Readings"),
|
||||
("outbound_dispatches", "Outbound Dispatch Consignments"),
|
||||
|
||||
# Level 2: Commercial Sales Orders & Lot Allocations
|
||||
("sales_order_allocations", "Sales Lot Allocations"),
|
||||
("customer_sales_orders", "Customer Sales Contracts"),
|
||||
|
||||
# Level 1: Inward Receiving, Quality Inspections, GRN & Warehouse Lots
|
||||
("quality_inspections", "Laboratory Quality Assays"),
|
||||
("inventory_lots", "Warehouse Inventory Lots"),
|
||||
("goods_receipt_notes", "Goods Receipt Notes (GRN)"),
|
||||
("weighbridge_slips", "Inward Weighbridge Slips"),
|
||||
("inward_gate_entries", "Inward Gate Entry Passes"),
|
||||
|
||||
# Level 0: Mandi Procurement, Market Rates & Master Data
|
||||
("procurement_sauda", "Procurement Sauda Contracts"),
|
||||
("market_observations", "Mandi Market Rate Observations"),
|
||||
("transport_fleet", "Transport Fleet Registry"),
|
||||
("tenant_operating_policies", "Tenant Operating Risk Policies"),
|
||||
("counterparties", "Trading Counterparties Directory"),
|
||||
("godowns", "Warehouse Godowns & Stacks"),
|
||||
("commodity_varieties", "Commodity Varieties"),
|
||||
("commodities", "Commodity Catalog"),
|
||||
]
|
||||
|
||||
|
||||
def safely_purge_demo_tenant(store: InMemoryTenantStorage, tenant_id: str) -> dict:
|
||||
"""Executes safe cascade purge of demo tenant data with zero leakage."""
|
||||
# Safety Rail 1: Strict slug prefix inspection
|
||||
if not tenant_id.startswith("demo-"):
|
||||
raise ValueError(
|
||||
f"[FATAL SECURITY RAIL] Refusing to purge tenant '{tenant_id}'. "
|
||||
f"The cleanup script strictly operates on tenants whose ID starts with 'demo-'. "
|
||||
f"Production and live client tenants are permanently protected from this script."
|
||||
)
|
||||
|
||||
purge_metrics = {}
|
||||
print(f"[PURGE] Commencing cascade teardown for demo tenant: '{tenant_id}'...")
|
||||
|
||||
# Step 1: Purge collections in reverse relational order
|
||||
for coll_name, coll_label in CASCADE_PURGE_ORDER:
|
||||
count = 0
|
||||
if coll_name in store._collections and tenant_id in store._collections[coll_name]:
|
||||
count = len(store._collections[coll_name][tenant_id])
|
||||
del store._collections[coll_name][tenant_id]
|
||||
purge_metrics[coll_name] = count
|
||||
if count > 0:
|
||||
print(f" [-] Purged {count:3d} {coll_label} ({coll_name})")
|
||||
|
||||
# Step 2: Purge RBAC Memberships
|
||||
mem_keys = [k for k, m in store.memberships.items() if m.tenant_id == tenant_id]
|
||||
for k in mem_keys:
|
||||
del store.memberships[k]
|
||||
purge_metrics["memberships"] = len(mem_keys)
|
||||
if mem_keys:
|
||||
print(f" [-] Purged {len(mem_keys):3d} Tenant Memberships")
|
||||
|
||||
# Step 3: Purge Mock Identity Personas
|
||||
purged_personas = []
|
||||
for email, profile in list(TEST_PERSONAS.items()):
|
||||
if profile.get("tenant_id") == tenant_id:
|
||||
purged_personas.append(email)
|
||||
del TEST_PERSONAS[email]
|
||||
purge_metrics["personas"] = len(purged_personas)
|
||||
if purged_personas:
|
||||
print(f" [-] Purged {len(purged_personas):3d} Mock Authentication Personas")
|
||||
|
||||
# Step 4: Purge Tenant Root Entity
|
||||
existed = tenant_id in store.tenants
|
||||
store.tenants.pop(tenant_id, None)
|
||||
purge_metrics["tenant_deleted"] = existed
|
||||
if existed:
|
||||
print(f" [-] Purged Tenant Root Record: '{tenant_id}'")
|
||||
|
||||
# Step 5: Verification of zero residue
|
||||
residual_rows = 0
|
||||
for coll_name, _ in CASCADE_PURGE_ORDER:
|
||||
if coll_name in store._collections and tenant_id in store._collections[coll_name]:
|
||||
residual_rows += len(store._collections[coll_name][tenant_id])
|
||||
|
||||
residual_memberships = sum(1 for m in store.memberships.values() if m.tenant_id == tenant_id)
|
||||
if residual_rows > 0 or residual_memberships > 0 or tenant_id in store.tenants:
|
||||
raise RuntimeError(
|
||||
f"[PURGE ERROR] Incomplete teardown: {residual_rows} residual rows and "
|
||||
f"{residual_memberships} memberships remain for '{tenant_id}'."
|
||||
)
|
||||
|
||||
print(f"[PURGE SUCCESS] Teardown complete. Zero residual records remain for '{tenant_id}'.")
|
||||
return purge_metrics
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description="ATB Commercial Sales Demo Data Safe Teardown Engine")
|
||||
parser.add_argument(
|
||||
"--tenant-id",
|
||||
default=DEFAULT_TENANT_ID,
|
||||
help="Target demo tenant ID to purge (must start with 'demo-')"
|
||||
)
|
||||
parser.add_argument(
|
||||
"--confirm-purge",
|
||||
action="store_true",
|
||||
help="Confirm teardown without interactive prompt"
|
||||
)
|
||||
args = parser.parse_args()
|
||||
|
||||
tenant_id = args.tenant_id
|
||||
if not tenant_id.startswith("demo-"):
|
||||
print(
|
||||
f"[CRITICAL ERROR] Tenant ID '{tenant_id}' does NOT begin with 'demo-'.\n"
|
||||
f"This safety rail prevents accidental data loss on production or client tenants.\n"
|
||||
f"Aborting execution.",
|
||||
file=sys.stderr
|
||||
)
|
||||
sys.exit(1)
|
||||
|
||||
print("=" * 72)
|
||||
print(" Agriculture Trading Backoffice (ATB) — Safe Demo Data Teardown Engine")
|
||||
print("=" * 72)
|
||||
print(f"[CONFIG] Target Demo Tenant: {tenant_id}")
|
||||
|
||||
if not args.confirm_purge:
|
||||
try:
|
||||
confirm = input(f"Are you sure you want to permanently delete all data for '{tenant_id}'? [y/N]: ")
|
||||
if confirm.strip().lower() not in ("y", "yes"):
|
||||
print("[ABORT] Teardown cancelled by user.")
|
||||
sys.exit(0)
|
||||
except (EOFError, KeyboardInterrupt):
|
||||
print("\n[ABORT] Non-interactive execution requires --confirm-purge flag.")
|
||||
sys.exit(1)
|
||||
|
||||
try:
|
||||
metrics = safely_purge_demo_tenant(storage, tenant_id)
|
||||
total_records = sum(v for k, v in metrics.items() if isinstance(v, int))
|
||||
print("=" * 72)
|
||||
print(f"[SUMMARY] Total demo records safely removed: {total_records}")
|
||||
print(f"[STATUS] Demo tenant '{tenant_id}' is cleanly wiped.")
|
||||
print("=" * 72)
|
||||
except Exception as err:
|
||||
print(f"[ERROR] Teardown failed: {err}", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
|
|
@ -0,0 +1,689 @@
|
|||
#!/usr/bin/env python3
|
||||
"""Agriculture Trading Backoffice (ATB) — Demo Data Ingestion Engine.
|
||||
|
||||
Standardized per UP-AI v1.5 Phase IV Transition Standards.
|
||||
Fulfills commercial sales demo requirements by provisioning an isolated, realistic,
|
||||
relational dataset for demo tenant 'demo-malwa-agri' (Malwa Agri Trading Corp).
|
||||
|
||||
Features:
|
||||
- Multi-Tenant Safe: Only seeds data tagged for the demo tenant.
|
||||
- End-to-End Cohesive: Seeds connected transaction spine from Mandi rate to Bilty & Ledgers.
|
||||
- 20-Day Trend Snapshots: Generates mature data for the Executive Dashboard & Moving Averages.
|
||||
- Idempotent: Can clean prior demo data before re-seeding with `--clean-first`.
|
||||
"""
|
||||
import argparse
|
||||
from datetime import datetime, date, timedelta, timezone
|
||||
from decimal import Decimal
|
||||
import os
|
||||
import sys
|
||||
import uuid
|
||||
|
||||
# Ensure project_code is importable
|
||||
CURRENT_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
PROJECT_ROOT = os.path.abspath(os.path.join(CURRENT_DIR, "..", ".."))
|
||||
PROJECT_CODE = os.path.join(PROJECT_ROOT, "project_code")
|
||||
|
||||
if PROJECT_CODE not in sys.path:
|
||||
sys.path.insert(0, PROJECT_CODE)
|
||||
|
||||
try:
|
||||
from backend.app.db.session import storage, InMemoryTenantStorage
|
||||
from backend.app.models.tenant import Tenant, TenantMembership
|
||||
from backend.app.models.master_data import (
|
||||
Commodity,
|
||||
CommodityVariety,
|
||||
TradingCounterparty,
|
||||
Godown,
|
||||
)
|
||||
from backend.app.models.policy import TenantOperatingPolicy
|
||||
from backend.app.models.procurement import ProcurementSauda
|
||||
from backend.app.models.receiving import InwardGateEntry, WeighbridgeSlip, GoodsReceiptNote
|
||||
from backend.app.models.quality import InventoryLot, QualityInspection
|
||||
from backend.app.models.sales import CustomerSalesOrder, SalesOrderAllocation
|
||||
from backend.app.models.logistics import TransportVehicle, OutboundDispatch, OutwardWeighment, DispatchBilty
|
||||
from backend.app.models.finance import PartySubLedgerEntry, SupplierPayable, MandiExpenseVoucher
|
||||
from backend.app.models.reporting import DailyTradingSnapshot, OperationalAlert
|
||||
from sandbox.identity_mock import mock_idp, TEST_PERSONAS
|
||||
except ImportError as e:
|
||||
print(f"[ERROR] Failed to import backend components from {PROJECT_CODE}: {e}", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
DEFAULT_TENANT_ID = "demo-malwa-agri"
|
||||
DEFAULT_BUSINESS_NAME = "Malwa Agri Trading Corp Pvt Ltd"
|
||||
DEFAULT_LEGAL_ID = "23AABCM1234F1Z1"
|
||||
DEFAULT_PRIMARY_MANDI = "Indore APMC Yard (MP-IND-01)"
|
||||
DEFAULT_ADMIN_EMAIL = "admin@malwa-agri.demo"
|
||||
|
||||
|
||||
def purge_existing_demo_tenant(store: InMemoryTenantStorage, tenant_id: str) -> None:
|
||||
"""Safely purges any existing demo tenant data before re-seeding."""
|
||||
if not tenant_id.startswith("demo-"):
|
||||
raise ValueError(f"Safety Rail: Refusing to purge non-demo tenant '{tenant_id}'")
|
||||
|
||||
print(f"[CLEANUP] Purging previous records for demo tenant '{tenant_id}'...")
|
||||
|
||||
collections_to_clean = [
|
||||
"daily_trading_snapshots",
|
||||
"operational_alerts",
|
||||
"party_subledger_entries",
|
||||
"dispatch_bilties",
|
||||
"outward_weighments",
|
||||
"outbound_dispatches",
|
||||
"sales_order_allocations",
|
||||
"customer_sales_orders",
|
||||
"quality_inspections",
|
||||
"inventory_lots",
|
||||
"goods_receipt_notes",
|
||||
"weighbridge_slips",
|
||||
"inward_gate_entries",
|
||||
"procurement_sauda",
|
||||
"market_observations",
|
||||
"transport_fleet",
|
||||
"fleet_vehicles",
|
||||
"tenant_operating_policies",
|
||||
"operating_policies",
|
||||
"counterparties",
|
||||
"godowns",
|
||||
"commodity_varieties",
|
||||
"commodities",
|
||||
]
|
||||
|
||||
for coll in collections_to_clean:
|
||||
if coll in store._collections and tenant_id in store._collections[coll]:
|
||||
del store._collections[coll][tenant_id]
|
||||
|
||||
# Purge memberships
|
||||
mem_keys = [k for k, m in store.memberships.items() if m.tenant_id == tenant_id]
|
||||
for k in mem_keys:
|
||||
del store.memberships[k]
|
||||
|
||||
# Purge tenant
|
||||
store.tenants.pop(tenant_id, None)
|
||||
print(f"[CLEANUP] Successfully purged prior records for '{tenant_id}'.")
|
||||
|
||||
|
||||
def seed_demo_tenant(store: InMemoryTenantStorage, tenant_id: str = DEFAULT_TENANT_ID) -> None:
|
||||
"""Provisions demo tenant profile and 10 RBAC persona memberships."""
|
||||
print(f"[SEED] Provisioning Demo Tenant: '{DEFAULT_BUSINESS_NAME}' ({tenant_id})...")
|
||||
|
||||
tenant = Tenant(
|
||||
tenant_id=tenant_id,
|
||||
business_name=DEFAULT_BUSINESS_NAME,
|
||||
legal_identifier=DEFAULT_LEGAL_ID,
|
||||
contact_email=DEFAULT_ADMIN_EMAIL,
|
||||
primary_mandi=DEFAULT_PRIMARY_MANDI,
|
||||
status="ACTIVE"
|
||||
)
|
||||
store.save_tenant(tenant)
|
||||
|
||||
# 10 Standard PRD Personas for Malwa Agri Trading Corp
|
||||
personas = [
|
||||
("buyer@malwa-agri.demo", "Rajesh Patidar (Buyer)", "Mandi Buyer"),
|
||||
("pmgr@malwa-agri.demo", "Suresh Sharma (Purchase Mgr)", "Purchase Manager"),
|
||||
("yard@malwa-agri.demo", "Vikram Singh (Yard Sup)", "Yard Supervisor"),
|
||||
("qc@malwa-agri.demo", "Dr. Ananya Joshi (Quality)", "Quality Officer"),
|
||||
("whmgr@malwa-agri.demo", "Gopal Verma (Godown Mgr)", "Yard Supervisor"),
|
||||
("sales@malwa-agri.demo", "Rohit Agrawal (Sales Exec)", "Sales Executive"),
|
||||
("smgr@malwa-agri.demo", "Meera Nair (Sales Mgr)", "Sales Manager"),
|
||||
("logistics@malwa-agri.demo", "Dinesh Rao (Logistics)", "Logistics Coordinator"),
|
||||
("finance@malwa-agri.demo", "Kavita Maheshwari (Accounts)", "Accounts Executive"),
|
||||
("director@malwa-agri.demo", "Harish Patel (Managing Director)", "Partner / MD"),
|
||||
("admin@malwa-agri.demo", "Platform Admin (Malwa)", "Tenant Administrator"),
|
||||
]
|
||||
|
||||
for email, name, role in personas:
|
||||
mem = TenantMembership(
|
||||
tenant_id=tenant_id,
|
||||
user_id=email,
|
||||
email=email,
|
||||
role=role,
|
||||
status="ACTIVE"
|
||||
)
|
||||
store.save_membership(mem)
|
||||
|
||||
# Register mock persona in identity mock so passwordless mock auth works
|
||||
TEST_PERSONAS[email] = {
|
||||
"sub": f"usr_{uuid.uuid4().hex[:12]}",
|
||||
"email": email,
|
||||
"name": name,
|
||||
"roles": [role],
|
||||
"tenant_id": tenant_id
|
||||
}
|
||||
|
||||
print(f"[SEED] Registered {len(personas)} RBAC persona accounts with active memberships.")
|
||||
|
||||
|
||||
def seed_master_data(store: InMemoryTenantStorage, tenant_id: str) -> None:
|
||||
"""Seeds Commodities, Godown Warehouses, Counterparties, Fleet and Operating Policies."""
|
||||
print("[SEED] Seeding Agricultural Master Data...")
|
||||
|
||||
# 1. Commodities
|
||||
commodities = [
|
||||
Commodity(
|
||||
tenant_id=tenant_id,
|
||||
code="SOY",
|
||||
name="Soyabean (Yellow)",
|
||||
hsn_code="12010090",
|
||||
standard_bag_weight_kg=50.0,
|
||||
moisture_baseline_pct=10.0,
|
||||
foreign_matter_max_pct=1.5,
|
||||
damaged_grain_max_pct=2.0,
|
||||
id="c0a80123-demo-0000-0000-000000000001"
|
||||
),
|
||||
Commodity(
|
||||
tenant_id=tenant_id,
|
||||
code="CHN",
|
||||
name="Chana (Bengal Gram)",
|
||||
hsn_code="07132000",
|
||||
standard_bag_weight_kg=50.0,
|
||||
moisture_baseline_pct=10.5,
|
||||
foreign_matter_max_pct=1.0,
|
||||
damaged_grain_max_pct=3.0,
|
||||
id="c0a80123-demo-0000-0000-000000000002"
|
||||
),
|
||||
Commodity(
|
||||
tenant_id=tenant_id,
|
||||
code="WHT",
|
||||
name="Wheat (Sharbati & Lokwan)",
|
||||
hsn_code="10019910",
|
||||
standard_bag_weight_kg=50.0,
|
||||
moisture_baseline_pct=11.0,
|
||||
foreign_matter_max_pct=1.0,
|
||||
damaged_grain_max_pct=2.0,
|
||||
id="c0a80123-demo-0000-0000-000000000003"
|
||||
),
|
||||
]
|
||||
for c in commodities:
|
||||
store.insert("commodities", tenant_id, c.to_dict())
|
||||
|
||||
# Varieties
|
||||
varieties = [
|
||||
CommodityVariety(tenant_id=tenant_id, commodity_id=commodities[0].id, code="VAR-SOY-01", name="Yellow FAQ", id="var-demo-001"),
|
||||
CommodityVariety(tenant_id=tenant_id, commodity_id=commodities[0].id, code="VAR-SOY-02", name="JS-335 Grade A", id="var-demo-002"),
|
||||
CommodityVariety(tenant_id=tenant_id, commodity_id=commodities[1].id, code="VAR-CHN-01", name="Desi Chana FAQ", id="var-demo-003"),
|
||||
CommodityVariety(tenant_id=tenant_id, commodity_id=commodities[2].id, code="VAR-WHT-01", name="Sharbati Premium", id="var-demo-004"),
|
||||
]
|
||||
for v in varieties:
|
||||
store.insert("commodity_varieties", tenant_id, v.to_dict())
|
||||
|
||||
# 2. Godowns
|
||||
godowns = [
|
||||
Godown(
|
||||
tenant_id=tenant_id,
|
||||
code="WH-IND-01",
|
||||
name="Central Warehouse Indore",
|
||||
capacity_mt=5000.0,
|
||||
address="Sanwer Road Industrial Area, Sector C, Indore, MP",
|
||||
chambers_count=4,
|
||||
id="godown-demo-indore"
|
||||
),
|
||||
Godown(
|
||||
tenant_id=tenant_id,
|
||||
code="WH-NMC-01",
|
||||
name="Mandi Yard Shed Neemuch",
|
||||
capacity_mt=2500.0,
|
||||
address="Mandi Yard Complex, Gate 2, Neemuch, MP",
|
||||
chambers_count=2,
|
||||
id="godown-demo-neemuch"
|
||||
),
|
||||
]
|
||||
for g in godowns:
|
||||
store.insert("godowns", tenant_id, g.to_dict())
|
||||
|
||||
# 3. Counterparties (Suppliers & Customers)
|
||||
counterparties = [
|
||||
TradingCounterparty(
|
||||
tenant_id=tenant_id,
|
||||
name="Rameshwar Patidar (Farmer)",
|
||||
counterparty_type="FARMER",
|
||||
pan_number="ABCDE1234F",
|
||||
bank_account_number="30192837465",
|
||||
bank_ifsc_code="SBIN0001234",
|
||||
bank_name="State Bank of India",
|
||||
phone="9826012345",
|
||||
credit_terms_days=7,
|
||||
id="cpty-demo-supplier-01"
|
||||
),
|
||||
TradingCounterparty(
|
||||
tenant_id=tenant_id,
|
||||
name="Kailash & Sons Mandi Dalal",
|
||||
counterparty_type="COMMISSION_AGENT",
|
||||
pan_number="AABCK9912F",
|
||||
gstin="23AABCK9912F1Z4",
|
||||
bank_account_number="200911223344",
|
||||
bank_ifsc_code="HDFC0001234",
|
||||
bank_name="HDFC Bank",
|
||||
phone="9826112233",
|
||||
credit_terms_days=7,
|
||||
id="cpty-demo-supplier-02"
|
||||
),
|
||||
TradingCounterparty(
|
||||
tenant_id=tenant_id,
|
||||
name="MP Soya Extraction Industries Ltd",
|
||||
counterparty_type="PROCESSOR",
|
||||
pan_number="AABCM8811F",
|
||||
gstin="23AABCM8811F1Z9",
|
||||
bank_account_number="501009988776",
|
||||
bank_ifsc_code="ICIC0000001",
|
||||
bank_name="ICICI Bank",
|
||||
phone="9425011223",
|
||||
credit_limit_inr=5000000.00,
|
||||
credit_terms_days=15,
|
||||
id="cpty-demo-customer-01"
|
||||
),
|
||||
TradingCounterparty(
|
||||
tenant_id=tenant_id,
|
||||
name="Gujarat Dal & Pulse Millers",
|
||||
counterparty_type="WHOLESALE_BUYER",
|
||||
pan_number="AABCG5512F",
|
||||
gstin="24AABCG5512F1Z8",
|
||||
bank_account_number="100988776655",
|
||||
bank_ifsc_code="BARB0UNJHAX",
|
||||
bank_name="Bank of Baroda",
|
||||
phone="9898012345",
|
||||
credit_limit_inr=4000000.00,
|
||||
credit_terms_days=21,
|
||||
id="cpty-demo-customer-02"
|
||||
),
|
||||
]
|
||||
for cp in counterparties:
|
||||
store.insert("counterparties", tenant_id, cp.to_dict())
|
||||
|
||||
# 4. Fleet Vehicles
|
||||
fleet = [
|
||||
TransportVehicle(
|
||||
tenant_id=tenant_id,
|
||||
reg_no="MP09BC8812",
|
||||
make_model="Tata Signa 2823.K",
|
||||
payload_capacity_mt=Decimal("28.000"),
|
||||
ownership_type="Contract",
|
||||
transporter_name="Malwa Freight Carriers",
|
||||
status="Available",
|
||||
fitness_expiry=(date.today() + timedelta(days=180)).isoformat(),
|
||||
vehicle_id="veh-demo-01"
|
||||
),
|
||||
TransportVehicle(
|
||||
tenant_id=tenant_id,
|
||||
reg_no="MP09GH4521",
|
||||
make_model="Ashok Leyland 1618",
|
||||
payload_capacity_mt=Decimal("16.000"),
|
||||
ownership_type="Own",
|
||||
transporter_name="Malwa Fleet Internal",
|
||||
status="Available",
|
||||
fitness_expiry=(date.today() + timedelta(days=90)).isoformat(),
|
||||
vehicle_id="veh-demo-02"
|
||||
),
|
||||
# Expired fitness vehicle to showcase gating!
|
||||
TransportVehicle(
|
||||
tenant_id=tenant_id,
|
||||
reg_no="RJ20GA3311",
|
||||
make_model="Eicher Pro 3019",
|
||||
payload_capacity_mt=Decimal("19.000"),
|
||||
ownership_type="Contract",
|
||||
transporter_name="Marwar Roadlines",
|
||||
status="Available",
|
||||
fitness_expiry=(date.today() - timedelta(days=15)).isoformat(),
|
||||
vehicle_id="veh-demo-03-expired"
|
||||
),
|
||||
]
|
||||
for f in fleet:
|
||||
store.insert("transport_fleet", tenant_id, f.to_dict())
|
||||
|
||||
# 5. Operating Policies
|
||||
policy = TenantOperatingPolicy(
|
||||
tenant_id=tenant_id,
|
||||
created_by="admin@malwa-agri.demo",
|
||||
change_reason="Initial baseline demo operating policy",
|
||||
effective_from=datetime(2026, 1, 1, 0, 0, 0, tzinfo=timezone.utc),
|
||||
effective_to=datetime(2027, 12, 31, 23, 59, 59, tzinfo=timezone.utc),
|
||||
version=1,
|
||||
weighbridge_tolerance_pct=0.50,
|
||||
moisture_deduction_threshold_pct=12.00,
|
||||
credit_watch_threshold_pct=80.00,
|
||||
credit_lock_threshold_pct=100.00,
|
||||
qc_required_default=True,
|
||||
partner_dispatch_override_ceiling_inr=5000000.00,
|
||||
id="policy-demo-001"
|
||||
)
|
||||
store.insert("tenant_operating_policies", tenant_id, policy.to_dict())
|
||||
|
||||
print("[SEED] Master data successfully seeded.")
|
||||
|
||||
|
||||
def seed_connected_storyboard_transactions(store: InMemoryTenantStorage, tenant_id: str) -> None:
|
||||
"""Seeds the 11 interconnected relational records of the main sales demo story."""
|
||||
print("[SEED] Seeding Connected Storyboard Transactions (Sauda -> Gate-In -> QC -> GRN -> Sales -> Bilty)...")
|
||||
|
||||
today = date.today()
|
||||
|
||||
# Step 1: Procurement Sauda
|
||||
sauda = ProcurementSauda(
|
||||
tenant_id=tenant_id,
|
||||
sauda_number="SDA-2026-001",
|
||||
contract_date=today,
|
||||
delivery_due_date=today + timedelta(days=7),
|
||||
supplier_id="cpty-demo-supplier-01",
|
||||
mandi_id="MP-IND-01",
|
||||
commodity_id="c0a80123-demo-0000-0000-000000000001",
|
||||
variety="Yellow FAQ",
|
||||
booked_quantity_mt=Decimal("25.000"),
|
||||
trade_rate_per_qtl=Decimal("4850.00"),
|
||||
grade="FAQ",
|
||||
trade_type="MANDI_AUCTION",
|
||||
estimated_bags=500,
|
||||
credit_period_days=7,
|
||||
advance_amount=Decimal("0.00"),
|
||||
mandi_cess_pct=Decimal("1.50"),
|
||||
krishi_kalyan_pct=Decimal("0.50"),
|
||||
brokerage_rate_pct=Decimal("1.00")
|
||||
)
|
||||
store.insert("procurement_sauda", tenant_id, sauda.to_dict())
|
||||
|
||||
# Step 2: Inward Gate Entry
|
||||
gate_entry = InwardGateEntry(
|
||||
tenant_id=tenant_id,
|
||||
gate_pass_number="GP-2026-001",
|
||||
vehicle_number="MP09GH4521",
|
||||
eway_bill_number="281098765432",
|
||||
driver_name="Sunil Yadav",
|
||||
driver_mobile="9826012345",
|
||||
sauda_id=sauda.id,
|
||||
supplier_invoice_no="INV-RAM-2026-90",
|
||||
supplier_dispatch_weight_mt=Decimal("25.000"),
|
||||
supplier_dispatch_bags=500,
|
||||
entry_id="gate-entry-demo-001"
|
||||
)
|
||||
gate_entry.transition_status("WEIGHED_TARE")
|
||||
store.insert("inward_gate_entries", tenant_id, gate_entry.to_dict())
|
||||
|
||||
# Step 3: Weighbridge Gross & Tare
|
||||
wb_slip = WeighbridgeSlip(
|
||||
tenant_id=tenant_id,
|
||||
slip_number="WB-IND-2026-001",
|
||||
gate_pass_id=gate_entry.id,
|
||||
gross_weight_mt=Decimal("35.000"),
|
||||
slip_id="weigh-slip-demo-001"
|
||||
)
|
||||
wb_slip.record_tare(
|
||||
tare_weight_mt=Decimal("10.000"),
|
||||
bag_packaging_type="Jute 50kg",
|
||||
actual_bag_count=500,
|
||||
billed_weight_mt=Decimal("25.000")
|
||||
)
|
||||
store.insert("weighbridge_slips", tenant_id, wb_slip.to_dict())
|
||||
|
||||
# Step 4: Goods Receipt Note (GRN) & Released Lot in Warehouse
|
||||
grn = GoodsReceiptNote(
|
||||
tenant_id=tenant_id,
|
||||
grn_number="GRN-2026-001",
|
||||
weighment_slip_id=wb_slip.id,
|
||||
sauda_id=sauda.id,
|
||||
godown_id="godown-demo-indore",
|
||||
godown_stack_id="Stack A1",
|
||||
accepted_quantity_mt=Decimal("24.625"),
|
||||
accepted_bags=500,
|
||||
grn_id="grn-demo-001"
|
||||
)
|
||||
store.insert("goods_receipt_notes", tenant_id, grn.to_dict())
|
||||
|
||||
lot = InventoryLot(
|
||||
tenant_id=tenant_id,
|
||||
lot_number="LOT-SOY-2026-001",
|
||||
grn_id=grn.id,
|
||||
commodity_id="c0a80123-demo-0000-0000-000000000001",
|
||||
variety="Yellow FAQ",
|
||||
godown_stack_id="Stack A1",
|
||||
initial_quantity_mt=Decimal("24.625"),
|
||||
grade="FAQ",
|
||||
lot_id="lot-demo-001"
|
||||
)
|
||||
lot.transition_qc_status("RELEASED")
|
||||
lot.current_quantity_mt = Decimal("0.625") # 24 MT allocated to sales order
|
||||
store.insert("inventory_lots", tenant_id, lot.to_dict())
|
||||
|
||||
# Step 5: Quality Lab Inspection (Moisture 11.5% -> Rebate ₹23,358.75)
|
||||
qc_inspection = QualityInspection(
|
||||
tenant_id=tenant_id,
|
||||
lot_id=lot.id,
|
||||
sample_code="SMP-2026-001",
|
||||
inspector_email="qc@malwa-agri.demo",
|
||||
lot_quantity_mt=Decimal("25.000"),
|
||||
trade_rate_per_qtl=Decimal("4850.00"),
|
||||
moisture_pct=Decimal("11.50"),
|
||||
foreign_matter_pct=Decimal("2.20"),
|
||||
decision="RELEASED",
|
||||
damaged_grain_pct=Decimal("1.80"),
|
||||
remarks="Approved with FAQ standard moisture deduction",
|
||||
inspection_id="qc-demo-001"
|
||||
)
|
||||
store.insert("quality_inspections", tenant_id, qc_inspection.to_dict())
|
||||
|
||||
# Step 6: Customer Sales Order
|
||||
sales_order = CustomerSalesOrder(
|
||||
tenant_id=tenant_id,
|
||||
sales_order_number="SO-2026-089",
|
||||
customer_id="cpty-demo-customer-01",
|
||||
destination_city="Pithampur",
|
||||
customer_segment="Processor",
|
||||
commodity_id="c0a80123-demo-0000-0000-000000000001",
|
||||
variety="Yellow FAQ",
|
||||
contract_qty_mt=Decimal("24.000"),
|
||||
contract_rate_per_qtl=Decimal("5100.00"),
|
||||
payment_terms="15 Days",
|
||||
credit_exposure_ratio=Decimal("107.50"),
|
||||
credit_override=True,
|
||||
override_approved_by="smgr@malwa-agri.demo",
|
||||
grade="FAQ",
|
||||
order_id="so-demo-001"
|
||||
)
|
||||
sales_order.allocated_qty_mt = Decimal("24.000")
|
||||
sales_order.status = "FULLY_ALLOCATED"
|
||||
store.insert("customer_sales_orders", tenant_id, sales_order.to_dict())
|
||||
|
||||
# Step 7: Lot Allocation
|
||||
allocation = SalesOrderAllocation(
|
||||
tenant_id=tenant_id,
|
||||
sales_order_id=sales_order.id,
|
||||
lot_id=lot.id,
|
||||
warehouse_id="godown-demo-indore",
|
||||
allocated_qty_mt=Decimal("24.000"),
|
||||
allocated_bags=480,
|
||||
lot_qc_status="RELEASED",
|
||||
available_unreserved_mt=Decimal("24.625"),
|
||||
allocation_id="alloc-demo-001"
|
||||
)
|
||||
store.insert("sales_order_allocations", tenant_id, allocation.to_dict())
|
||||
|
||||
# Step 8: Outbound Dispatch Schedule & Bilty
|
||||
dispatch = OutboundDispatch(
|
||||
tenant_id=tenant_id,
|
||||
dispatch_number="DSP-2026-089",
|
||||
sales_order_id=sales_order.id,
|
||||
allocation_id=allocation.id,
|
||||
vehicle_id="veh-demo-01",
|
||||
origin_warehouse_id="godown-demo-indore",
|
||||
destination_city="Pithampur",
|
||||
dispatch_id="dispatch-demo-001"
|
||||
)
|
||||
dispatch.transition_status("IN_TRANSIT")
|
||||
store.insert("outbound_dispatches", tenant_id, dispatch.to_dict())
|
||||
|
||||
outward_wt = OutwardWeighment(
|
||||
tenant_id=tenant_id,
|
||||
dispatch_id=dispatch.id,
|
||||
tare_weight_kg=Decimal("10200.00"),
|
||||
gross_weight_kg=Decimal("34200.00"),
|
||||
allocated_mt=Decimal("24.000"),
|
||||
loaded_bags=480,
|
||||
transporter_bilty_no="BLT-2026-089",
|
||||
eway_bill_no="381044991122",
|
||||
weighment_id="outward-weigh-demo-001"
|
||||
)
|
||||
store.insert("outward_weighments", tenant_id, outward_wt.to_dict())
|
||||
|
||||
bilty = DispatchBilty(
|
||||
tenant_id=tenant_id,
|
||||
dispatch_id=dispatch.id,
|
||||
bilty_number="BLT-2026-089",
|
||||
consignor_name="Malwa Agri Trading Corp Pvt Ltd",
|
||||
consignee_name="MP Soya Extraction Industries Ltd",
|
||||
vehicle_reg_no="MP09BC8812",
|
||||
net_weight_mt=Decimal("24.000"),
|
||||
bags=480,
|
||||
eway_bill_no="381044991122",
|
||||
bilty_id="bilty-demo-001"
|
||||
)
|
||||
store.insert("dispatch_bilties", tenant_id, bilty.to_dict())
|
||||
|
||||
# Step 9: Financial Subledger Entries, Supplier Payables & Operating Expenses
|
||||
customer_invoice = PartySubLedgerEntry(
|
||||
tenant_id=tenant_id,
|
||||
party_id="cpty-demo-customer-01",
|
||||
party_type="CUSTOMER",
|
||||
voucher_type="SALES_INVOICE",
|
||||
voucher_number="INV-SALES-2026-089",
|
||||
debit_amount_inr=Decimal("1224000.00"),
|
||||
running_balance_inr=Decimal("5374000.00"),
|
||||
narration="Sales invoice for 24.000 MT Soybean FAQ under Order SO-2026-089 / Bilty BLT-2026-089",
|
||||
entry_id="subledger-demo-01"
|
||||
)
|
||||
store.insert("party_subledger_entries", tenant_id, customer_invoice.to_dict())
|
||||
|
||||
supplier_payable = SupplierPayable(
|
||||
tenant_id=tenant_id,
|
||||
supplier_id="cpty-demo-supplier-01",
|
||||
grn_number="GRN-2026-001",
|
||||
invoice_amount_inr=Decimal("1189141.25"),
|
||||
grn_date=datetime.now(timezone.utc),
|
||||
credit_days=7,
|
||||
sauda_reference="SDA-2026-001",
|
||||
payable_id="payable-demo-001"
|
||||
)
|
||||
store.insert("supplier_payables", tenant_id, supplier_payable.to_dict())
|
||||
|
||||
cess_voucher = MandiExpenseVoucher(
|
||||
tenant_id=tenant_id,
|
||||
voucher_number="VCH-CESS-2026-001",
|
||||
expense_category="MANDI_CESS",
|
||||
amount_inr=Decimal("18187.50"),
|
||||
payee_name="Indore Mandi Samiti",
|
||||
payment_mode="BANK_TRANSFER",
|
||||
debit_account="Mandi Cess Expense",
|
||||
credit_account="HDFC Bank Current A/C",
|
||||
linked_sauda_id="sauda-demo-001",
|
||||
narration="1.50% MP Mandi Cess on Sauda SDA-2026-001 gross value ₹12,12,500.00",
|
||||
voucher_id="voucher-demo-001"
|
||||
)
|
||||
store.insert("mandi_expense_vouchers", tenant_id, cess_voucher.to_dict())
|
||||
|
||||
# Step 10: Operational Alerts (Showcasing Real-Time Hazard Engine)
|
||||
alerts = [
|
||||
OperationalAlert(
|
||||
tenant_id=tenant_id,
|
||||
category="CREDIT_RISK",
|
||||
severity="WARNING",
|
||||
title="Customer Credit Limit Breached: MP Soya",
|
||||
message="MP Soya Extraction Industries exposure is at 107.5% of approved limit (₹53.74L / ₹50.00L).",
|
||||
source_entity_type="SALES_ORDER",
|
||||
source_entity_id=sales_order.id,
|
||||
alert_id="alert-demo-01"
|
||||
),
|
||||
OperationalAlert(
|
||||
tenant_id=tenant_id,
|
||||
category="WAREHOUSE_CAPACITY",
|
||||
severity="INFO",
|
||||
title="Indore Godown Capacity at 63%",
|
||||
message="Central Warehouse Indore is currently holding 3,150 MT out of 5,000 MT capacity.",
|
||||
source_entity_type="GODOWN",
|
||||
source_entity_id="godown-demo-indore",
|
||||
alert_id="alert-demo-02"
|
||||
),
|
||||
]
|
||||
for a in alerts:
|
||||
store.insert("operational_alerts", tenant_id, a.to_dict())
|
||||
|
||||
print("[SEED] Connected storyboard transactions seeded successfully.")
|
||||
|
||||
|
||||
def seed_20day_historical_snapshots(store: InMemoryTenantStorage, tenant_id: str) -> None:
|
||||
"""Seeds 20 days of realistic daily trading metrics for the Executive Dashboard & SMA."""
|
||||
print("[SEED] Seeding 20-Day Trading History & Price Moving Averages...")
|
||||
|
||||
base_date = date.today()
|
||||
sample_metrics = [
|
||||
(185.50, 140.00, 4250.80, 4250000.00, 3540000.00),
|
||||
(220.00, 190.50, 4205.30, 3890000.00, 3210000.00),
|
||||
(150.00, 210.00, 4175.80, 3620000.00, 2850000.00),
|
||||
(310.00, 250.00, 4235.80, 4100000.00, 3950000.00),
|
||||
(195.00, 160.00, 4175.80, 3750000.00, 3100000.00),
|
||||
(180.00, 175.00, 4140.80, 3500000.00, 3050000.00),
|
||||
(240.00, 220.00, 4135.80, 3900000.00, 3600000.00),
|
||||
(165.00, 150.00, 4115.80, 3400000.00, 2900000.00),
|
||||
(210.00, 195.00, 4100.80, 3800000.00, 3450000.00),
|
||||
(190.00, 180.00, 4085.80, 3650000.00, 3300000.00),
|
||||
(225.00, 210.00, 4075.80, 4000000.00, 3700000.00),
|
||||
(170.00, 165.00, 4060.80, 3350000.00, 2950000.00),
|
||||
(205.00, 190.00, 4055.80, 3700000.00, 3400000.00),
|
||||
(180.00, 175.00, 4040.80, 3500000.00, 3150000.00),
|
||||
(230.00, 200.00, 4035.80, 3950000.00, 3650000.00),
|
||||
(160.00, 155.00, 4005.80, 3300000.00, 2800000.00),
|
||||
(215.00, 190.00, 4000.80, 3850000.00, 3500000.00),
|
||||
(175.00, 170.00, 3975.80, 3450000.00, 3050000.00),
|
||||
(220.00, 205.00, 3970.80, 3900000.00, 3600000.00),
|
||||
(190.00, 180.00, 3955.80, 3600000.00, 3250000.00),
|
||||
]
|
||||
|
||||
for i, (purch, sales, stock, rec, pay) in enumerate(sample_metrics):
|
||||
snap_dt = base_date - timedelta(days=(len(sample_metrics) - 1 - i))
|
||||
snap = DailyTradingSnapshot(
|
||||
tenant_id=tenant_id,
|
||||
snapshot_date=snap_dt.isoformat(),
|
||||
purchases_mt=Decimal(str(purch)),
|
||||
sales_mt=Decimal(str(sales)),
|
||||
closing_stock_mt=Decimal(str(stock)),
|
||||
total_receivables_inr=Decimal(str(rec)),
|
||||
total_payables_inr=Decimal(str(pay)),
|
||||
snapshot_id=f"snap-demo-{i:03d}"
|
||||
)
|
||||
store.insert("daily_trading_snapshots", tenant_id, snap.to_dict())
|
||||
|
||||
print(f"[SEED] Seeded {len(sample_metrics)} daily trading snapshots successfully.")
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description="ATB Commercial Sales Demo Data Ingestion Engine")
|
||||
parser.add_argument("--tenant-id", default=DEFAULT_TENANT_ID, help="Target demo tenant ID (must start with demo-)")
|
||||
parser.add_argument("--clean-first", action="store_true", help="Clean prior demo data before seeding")
|
||||
args = parser.parse_args()
|
||||
|
||||
tenant_id = args.tenant_id
|
||||
if not tenant_id.startswith("demo-"):
|
||||
print(f"[FATAL] Safety Error: Tenant ID '{tenant_id}' must start with 'demo-'", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
print("=" * 72)
|
||||
print(" Agriculture Trading Backoffice (ATB) — Commercial Sales Demo Seeder")
|
||||
print("=" * 72)
|
||||
print(f"[CONFIG] Target Tenant: {tenant_id}")
|
||||
|
||||
if args.clean_first:
|
||||
purge_existing_demo_tenant(storage, tenant_id)
|
||||
|
||||
seed_demo_tenant(storage, tenant_id)
|
||||
seed_master_data(storage, tenant_id)
|
||||
seed_connected_storyboard_transactions(storage, tenant_id)
|
||||
seed_20day_historical_snapshots(storage, tenant_id)
|
||||
|
||||
print("=" * 72)
|
||||
print("[SUCCESS] Demo Environment Successfully Initialized!")
|
||||
print(f"Tenant Name : {DEFAULT_BUSINESS_NAME}")
|
||||
print(f"Tenant ID : {tenant_id}")
|
||||
print("Sample Login : buyer@malwa-agri.demo (Passwordless in Mock Mode)")
|
||||
print("Story Sauda : SDA-2026-001 (25 MT Soybean @ ₹4,850/Qtl)")
|
||||
print("Story Bilty : BLT-2026-089 (24 MT Dispatched on MP09BC8812)")
|
||||
print("=" * 72)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
|
@ -0,0 +1,413 @@
|
|||
# Agriculture Trading Backoffice (ATB) — Commercial Sales Demo Playbook
|
||||
## High-Impact Client Walkthroughs, Actor Journeys & Presenter Scripts
|
||||
|
||||
| Field | Value |
|
||||
|---|---|
|
||||
| **Product** | Agriculture Trading Backoffice (ATB) |
|
||||
| **Release Version** | `v1.0.0` (Production & Commercial Release) |
|
||||
| **Governed Standard** | SEI-CMMI Level 3 (UP-AI v1.5 Standard Enterprise Tier) |
|
||||
| **Document Path** | `project_sdlc/08_review_ready_baselines/03_sales_demo_package/01_SALES_DEMO_PLAYBOOK_AND_WALKTHROUGHS.md` |
|
||||
| **Target Audience** | Sales Directors, Solutions Architects, Presales Engineers, Enterprise Account Executives |
|
||||
| **Target Prospects** | Managing Directors, CFOs, Operations Heads of Mandi Commission Firms, Agro-Processors, Grain Trading Houses |
|
||||
|
||||
---
|
||||
|
||||
## 1. Executive Summary & Commercial Value Proposition
|
||||
|
||||
The agricultural trading and mandi commission ecosystem across India handles over \$100 Billion in annual physical transactions, yet over 85% of trading houses and agro-processing facilities still run on uncoordinated paper slips (*sauda parchas*, *kata parchis*, *lab slips*, handwritten *bilties*).
|
||||
|
||||
### The Four Fatal Pains of Traditional Mandi Trading:
|
||||
1. **The Reconcilation Chasm:** Trading desks book purchases verbally at the auction yard, while trucks arrive at weighbridges days later with unverified rates, leading to frequent dispute settlements and margin leakage.
|
||||
2. **Dual-Unit Calculation Errors:** Commodities are negotiated and invoiced in **Quintals** (100 kg), but physically handled, stacked, and deducted in **Bags** (50 kg / 60 kg / 84 kg jute bags). Manual bag-to-quintal conversions generate continuous physical stock discrepancies.
|
||||
3. **Subjective Quality Cuts (*Karda*):** Moisture and foreign matter assays done by eye or paper notebooks lead to vendor disputes, corrupt deductions, and spoiled godown stacks.
|
||||
4. **Credit Exposure Blindness:** Institutional buyers continue receiving shipments even when their 30-day payment maturity has breached limits, leading to severe bad debts.
|
||||
|
||||
**ATB transforms this entire operating model into an automated, mathematically rigorous, multi-tenant digital control plane.** This playbook provides a turn-key script for conducting a 35-minute executive demo that demonstrates how ATB solves every single physical and financial touchpoint across the trade lifecycle.
|
||||
|
||||
---
|
||||
|
||||
## 2. Pre-Flight Setup & Demo Environment Checklist
|
||||
|
||||
Before commencing a prospect demonstration, verify the environment:
|
||||
|
||||
| Step | Action | Expected State / URL |
|
||||
|---|---|---|
|
||||
| **1. Service Verification** | Check container / backend health | `http://localhost:8000/health` returns `{"status":"healthy"}` |
|
||||
| **2. Web Portal Active** | Open web browser in private/incognito mode | `http://localhost:3000` renders ATB Mandi Desk login |
|
||||
| **3. Clean Demo Tenant** | Seed demo dataset via CLI | Run `python3 scripts/demo/seed_demo_data.py --clean-first` |
|
||||
| **4. Tenant Verified** | Check demo tenant profile | Slug: `demo-malwa-agri`, Name: `Malwa Agri Trading Corp` |
|
||||
| **5. Mock Auth Mode** | Ensure rapid passwordless persona switching | `USE_IDENTITY_MOCK=true` (or Keycloak realm loaded) |
|
||||
|
||||
### Demo Personas & Credentials Matrix:
|
||||
|
||||
| Persona ID | Email | Assigned Role | Demo Functionality |
|
||||
|---|---|---|---|
|
||||
| **P-BUYER** | `buyer@malwa-agri.demo` | `Mandi Buyer` | Mandi market rates, Sauda contract booking, auction entry |
|
||||
| **P-YARD** | `yard@malwa-agri.demo` | `Yard Supervisor` | Gate inward pass, weighbridge gross & tare weighment |
|
||||
| **P-QC** | `qc@malwa-agri.demo` | `Quality Officer` | Lab moisture assay, foreign matter test, auto-deduction, lot release |
|
||||
| **P-WHMGR** | `whmgr@malwa-agri.demo` | `Yard Supervisor` | Warehouse stock ledger, FIFO stack management, capacity alerts |
|
||||
| **P-SALES** | `sales@malwa-agri.demo` | `Sales Executive` | Customer sales contract, credit exposure verification |
|
||||
| **P-SMGR** | `smgr@malwa-agri.demo` | `Sales Manager` | Customer credit limit override, released lot allocation |
|
||||
| **P-LOGISTICS** | `logistics@malwa-agri.demo` | `Logistics Coordinator` | Transporter fleet selection, bilty generation, gate-out pass |
|
||||
| **P-FINANCE** | `finance@malwa-agri.demo` | `Accounts Executive` | APMC cess ledger, supplier settlement vouchers, customer aging |
|
||||
| **P-DIRECTOR** | `director@malwa-agri.demo` | `Partner / MD` | Executive Control Centre, 20-day trading trends, gross margins |
|
||||
|
||||
---
|
||||
|
||||
## 3. The 8 Persona Walkthrough Journeys (Step-by-Step Script)
|
||||
|
||||
```mermaid
|
||||
flowchart TD
|
||||
J1["Journey 1: Mandi Buyer<br/>Sauda Booking & Market Desk"] --> J2["Journey 2: Yard Supervisor<br/>Gate-In & Gross Weighbridge"]
|
||||
J2 --> J3["Journey 3: Quality Officer<br/>Moisture Assay & Karda Rebate"]
|
||||
J3 --> J4["Journey 4: Godown Manager<br/>Tare Weighment & Stock Ledger"]
|
||||
J4 --> J5["Journey 5: Sales Manager<br/>Credit Limit & Lot Allocation"]
|
||||
J5 --> J6["Journey 6: Logistics<br/>Bilty Manifest & Fleet Dispatch"]
|
||||
J6 --> J7["Journey 7: Accounts Exec<br/>Mandi Cess & Subledgers"]
|
||||
J7 --> J8["Journey 8: Managing Director<br/>Executive Dashboard & P&L"]
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Journey 1: The Mandi Buyer & Auction Trader (`P-BUYER`)
|
||||
**Theme:** *From chaotic yard auction shouting to guaranteed commercial lock.*
|
||||
|
||||
- **Target Persona:** `buyer@malwa-agri.demo` (`Mandi Buyer`)
|
||||
- **Associated Screens:** [`SCREEN-MKT-001`](file:///home/ps-ch/w/prj/mandi/project_sdlc/06_wireframes/screen_specs/SCREEN-MKT-001_market_desk.md) & [`SCREEN-PROC-001`](file:///home/ps-ch/w/prj/mandi/project_sdlc/06_wireframes/screen_specs/SCREEN-PROC-001_sauda_booking.md)
|
||||
- **Governed Use Cases:** `UC-002` (Market Desk) & `UC-004` (Sauda Procurement)
|
||||
|
||||
#### Presenter Talk Track:
|
||||
> *"Good morning everyone. Let us step into the shoes of Rajesh, our senior Mandi Buyer standing at the Indore APMC auction yard at 10:30 AM. He is evaluating heaps of yellow soybean arriving from local farmers. In traditional setups, Rajesh writes a rate on a slip of scrap paper or calls the backoffice. Let us see how Rajesh operates in ATB."*
|
||||
|
||||
#### Click-by-Click Steps:
|
||||
1. **Login:** Authenticate as `buyer@malwa-agri.demo`. The system resolves tenant `Malwa Agri Trading Corp`.
|
||||
2. **Market Desk View (`/mandi-desk`):**
|
||||
- Click **Market Desk** in navigation.
|
||||
- Point out the live ticker: Indore APMC Soybean modal rate is ₹4,800/Qtl, with daily arrivals of 12,400 bags.
|
||||
3. **Book New Sauda (`/procurement/new`):**
|
||||
- Click **+ New Sauda Booking**.
|
||||
- **Supplier:** Select `Rameshwar Patidar (Farmer / Arhatiya - Neemuch)`.
|
||||
- **Commodity:** Select `Soyabean (SOY)` — Variety: `Yellow FAQ`.
|
||||
- **Booked Quantity:** Enter `25.000` MT (Notice the system automatically calculates `500` Bags @ 50 kg/bag).
|
||||
- **Trade Rate:** Enter `₹ 4,850.00` per Quintal.
|
||||
- **Credit Period:** Enter `7` Days.
|
||||
4. **Observe Instant Calculations:**
|
||||
- The screen instantly computes:
|
||||
- **Gross Trade Value:** $25.000 \times 10 \times 4,850 = \text{₹ } 12,12,500.00$.
|
||||
- **APMC Mandi Cess (1.50%):** ₹ 18,187.50.
|
||||
- **Krishi Kalyan Cess (0.50%):** ₹ 6,062.50.
|
||||
- **Brokerage / Arhat (1.00%):** ₹ 12,125.00.
|
||||
- **Total Landed Cost:** ₹ 12,48,875.00.
|
||||
- Point out: *Payment Due Date is automatically set to 7 days from today.*
|
||||
5. **Rate Variance Safeguard:**
|
||||
- Change the rate to `₹ 5,200.00` (8.3% above the market modal rate of ₹4,800).
|
||||
- Point out the **Yellow Warning Banner**: `Price variance (+8.33%) exceeds 5.0% benchmark threshold. Explicit confirmation required.`
|
||||
- Revert rate to `₹ 4,850.00` and click **Confirm & Issue Sauda**.
|
||||
- Contract number `SDA-2026-001` is generated.
|
||||
|
||||
#### "Aha!" / Wow Moments:
|
||||
- **Zero manual math:** Mandi cess, arhat, and landed cost calculate instantaneously with statutory rounding.
|
||||
- **Dual-UOM synchronization:** MT, Quintals, and Bags are kept mathematically aligned.
|
||||
- **Price spike protection:** Buyers cannot overpay for lots without acknowledging market deviations.
|
||||
|
||||
---
|
||||
|
||||
### Journey 2: The Yard Supervisor & Weighbridge Operator (`P-YARD`)
|
||||
**Theme:** *Paperless truck check-in and tamper-proof gross weighing.*
|
||||
|
||||
- **Target Persona:** `yard@malwa-agri.demo` (`Yard Supervisor`)
|
||||
- **Associated Screens:** [`SCREEN-INW-001`](file:///home/ps-ch/w/prj/mandi/project_sdlc/06_wireframes/screen_specs/SCREEN-INW-001_gate_entry.md) & [`SCREEN-INW-002`](file:///home/ps-ch/w/prj/mandi/project_sdlc/06_wireframes/screen_specs/SCREEN-INW-002_weighbridge_grn.md)
|
||||
- **Governed Use Cases:** `UC-005` (Inward Receiving & Weighbridge)
|
||||
|
||||
#### Presenter Talk Track:
|
||||
> *"Two hours later, truck MP-09-GH-4521 carrying Rameshwar Patidar's soybean arrives at our godown gates. In traditional yards, the driver waits in a long line while security writes a manual gate pass. In ATB, gate-in takes under 30 seconds."*
|
||||
|
||||
#### Click-by-Click Steps:
|
||||
1. **Switch Role:** Switch to `yard@malwa-agri.demo`.
|
||||
2. **Gate Entry Screen (`/inward/gate-entry`):**
|
||||
- Click **+ New Gate Inward Pass**.
|
||||
- **Active Sauda:** Select `SDA-2026-001` (Rameshwar Patidar).
|
||||
- **Vehicle Number:** Enter `MP09GH4521` (System automatically validates standard Indian RTO format).
|
||||
- **e-Way Bill:** Enter `281098765432` (Validated for exactly 12 numeric digits).
|
||||
- **Driver Details:** Name `Sunil Yadav`, Mobile `9826012345`.
|
||||
- **Supplier Stated Weight:** `25.000` MT, Bags: `500`.
|
||||
- Click **Save & Print Gate Pass**. Status transitions to `GATE_IN`.
|
||||
3. **Gross Weighment (`/inward/weighbridge`):**
|
||||
- Click on Gate Pass `GP-2026-001`.
|
||||
- Click **Capture Gross Weighment**.
|
||||
- Emulate automated weighbridge reading: `35,000` kg (Truck + Soybean load).
|
||||
- Click **Record Gross Weight**.
|
||||
- Status updates to `WEIGHED_GROSS`. The truck is directed to the unloading ramp and lab sampling.
|
||||
|
||||
#### "Aha!" / Wow Moments:
|
||||
- **Strict regulatory validation:** Invalids like 10-digit e-way bills or malformed truck numbers are rejected at keystroke level.
|
||||
- **Anti-tamper linkage:** Weighbridge readings are locked directly to the specific Sauda and Gate Pass.
|
||||
|
||||
---
|
||||
|
||||
### Journey 3: The Quality Inspection & Assay Officer (`P-QC`)
|
||||
**Theme:** *Algorithmic grading and automated moisture deduction (*Karda*).*
|
||||
|
||||
- **Target Persona:** `qc@malwa-agri.demo` (`Quality Officer`)
|
||||
- **Associated Screens:** [`SCREEN-QC-001`](file:///home/ps-ch/w/prj/mandi/project_sdlc/06_wireframes/screen_specs/SCREEN-QC-001_quality_lab.md)
|
||||
- **Governed Use Cases:** `UC-006` (Quality & Lot Control)
|
||||
|
||||
#### Presenter Talk Track:
|
||||
> *"Here is where mandi trading firms lose the most money: Quality disputes. A farmer brings grain with 12% moisture when the FAQ limit is 10%. Traditionally, the trader and farmer haggle over a subjective discount. In ATB, laboratory science meets automated commercial deductions."*
|
||||
|
||||
#### Click-by-Click Steps:
|
||||
1. **Switch Role:** Switch to `qc@malwa-agri.demo`.
|
||||
2. **Quality Lab Queue (`/quality/inspections`):**
|
||||
- Select pending inspection for Gate Entry `GP-2026-001` (Sauda `SDA-2026-001`).
|
||||
- Notice the status is `QUALITY_HOLD`. The system blocks this grain from being sold or dispatched until QC clears it.
|
||||
3. **Enter Lab Assay Results:**
|
||||
- **Moisture Content:** Enter `11.50 %` (Standard FAQ benchmark is `10.00 %`).
|
||||
- **Foreign Matter (Admixture):** Enter `2.20 %` (Standard FAQ benchmark is `1.50 %`).
|
||||
- **Damaged / Discolored Grains:** Enter `1.80 %` (Within FAQ limit of 2.0%).
|
||||
4. **Review Automated Commercial Deduction:**
|
||||
- Show the prospect the calculated deductions:
|
||||
- **Excess Moisture:** $+1.50\% \rightarrow$ Physical weight deduction of **0.375 MT** ($25.000 \times 1.50\%$).
|
||||
- **Excess Admixture:** $+0.70\% \rightarrow$ Commercial rate cut (*karda*) of **₹ 21.00 / Qtl** ($0.7 \times \text{₹ }30/\text{Qtl}$).
|
||||
- **Net Billable Weight:** $25.000 - 0.375 = \mathbf{24.625}$ **MT** (246.25 Quintals).
|
||||
- **Total Quality Rebate Deduction:** **₹ 23,358.75** directly shaved off supplier payout.
|
||||
5. **Approve Lot:**
|
||||
- Select Decision: **APPROVED - FAQ GRADE A**.
|
||||
- Click **Issue Quality Certificate**.
|
||||
- Lot status transitions from `QUALITY_HOLD` to `RELEASED`. Lot ID `LOT-SOY-2026-001` is assigned.
|
||||
|
||||
#### "Aha!" / Wow Moments:
|
||||
- **No subjective arguments:** Moisture and admixture percentages translate to cold, hard mathematical deductions in accordance with AGMARK / Mandi Samiti rules.
|
||||
- **Bulletproof security:** Unreleased or failing lots are physically barred from being allocated to customer sales orders.
|
||||
|
||||
---
|
||||
|
||||
### Journey 4: The Warehouse Godown Manager (`P-WHMGR`)
|
||||
**Theme:** *Tare capture, Goods Receipt Note (GRN) issuance, and FIFO stack visibility.*
|
||||
|
||||
- **Target Persona:** `yard@malwa-agri.demo` / `whmgr@malwa-agri.demo`
|
||||
- **Associated Screens:** [`SCREEN-INW-002`](file:///home/ps-ch/w/prj/mandi/project_sdlc/06_wireframes/screen_specs/SCREEN-INW-002_weighbridge_grn.md) & [`SCREEN-WH-001`](file:///home/ps-ch/w/prj/mandi/project_sdlc/06_wireframes/screen_specs/SCREEN-WH-001_stock_ledger.md)
|
||||
- **Governed Use Cases:** `UC-005` (GRN Issuance) & `UC-007` (Warehouse Stock Ledger)
|
||||
|
||||
#### Presenter Talk Track:
|
||||
> *"The truck has been unloaded into Stack A1 in Central Godown Indore. The empty truck returns to the weighbridge to record its tare weight. Let's see how ATB seals the intake and creates the inventory asset."*
|
||||
|
||||
#### Click-by-Click Steps:
|
||||
1. **Tare Weighment (`/inward/weighbridge`):**
|
||||
- Open Gate Pass `GP-2026-001`.
|
||||
- Click **Capture Tare Weighment**.
|
||||
- Emulate tare reading: `10,000` kg.
|
||||
- System calculates:
|
||||
- **Gross Weight:** 35,000 kg.
|
||||
- **Tare Weight:** 10,000 kg.
|
||||
- **Net Received Weight:** 25,000 kg = **25.000 MT** (500 Bags).
|
||||
- **Weight Shortage:** 0.000 MT (100% matched with supplier declared dispatch).
|
||||
2. **Issue GRN & Stack Allocation:**
|
||||
- Click **Generate Goods Receipt Note (GRN)**.
|
||||
- System assigns GRN number: `GRN-2026-001`.
|
||||
- Select Target Godown: `Central Godown Indore` $\rightarrow$ Stack: `Stack A1`.
|
||||
- Click **Commit to Stock Ledger**.
|
||||
- Status updates to `GRN_ISSUED` and vehicle transitions to `GATE_OUT`.
|
||||
3. **Inspect Warehouse Stock Ledger (`/inventory/stock-ledger`):**
|
||||
- Click **Warehouse Inventory** $\rightarrow$ **Stock Ledger**.
|
||||
- Show the newly created inventory row:
|
||||
- Commodity: `Soyabean FAQ`
|
||||
- Lot: `LOT-SOY-2026-001`
|
||||
- On-Hand Quantity: `24.625 MT` (Net billable) / `500 Bags` (Physical count).
|
||||
- Storage Location: `Central Godown Indore - Stack A1`.
|
||||
- Status: `AVAILABLE_FOR_SALE`.
|
||||
|
||||
#### "Aha!" / Wow Moments:
|
||||
- **Instant Gate-to-Stock transition:** No waiting days for backoffice data entry; inventory is live the instant the tare weighment is saved.
|
||||
- **Dual-quantity ledger:** The godown keeper sees 500 physical bags; the trading manager sees 24.625 metric tonnes.
|
||||
|
||||
---
|
||||
|
||||
### Journey 5: The Sales Executive & Sales Manager (`P-SALES` & `P-SMGR`)
|
||||
**Theme:** *Credit-checked sales contracting and released-lot allocation.*
|
||||
|
||||
- **Target Personas:** `sales@malwa-agri.demo` & `smgr@malwa-agri.demo`
|
||||
- **Associated Screens:** [`SCREEN-SALES-001`](file:///home/ps-ch/w/prj/mandi/project_sdlc/06_wireframes/screen_specs/SCREEN-SALES-001_sales_order_booking.md), [`SCREEN-REC-002`](file:///home/ps-ch/w/prj/mandi/project_sdlc/06_wireframes/screen_specs/SCREEN-REC-002_credit_exposure_locks.md), [`SCREEN-SALES-002`](file:///home/ps-ch/w/prj/mandi/project_sdlc/06_wireframes/screen_specs/SCREEN-SALES-002_lot_allocation.md)
|
||||
- **Governed Use Cases:** `UC-008` (Sales Contracts & Lot Allocation)
|
||||
|
||||
#### Presenter Talk Track:
|
||||
> *"Now we move to the revenue desk. An institutional customer, 'MP Soya Extraction Mill', wants to purchase 24 Metric Tonnes of Soybean FAQ. In traditional trading houses, sales reps book orders blindly without knowing if the customer has breached their credit limit. Let's see how ATB enforces institutional credit controls."*
|
||||
|
||||
#### Click-by-Click Steps:
|
||||
1. **Login as Sales Executive:** Switch to `sales@malwa-agri.demo`.
|
||||
2. **Book Sales Order (`/sales/new`):**
|
||||
- Click **+ New Sales Order**.
|
||||
- **Customer:** Select `MP Soya Extraction Mill (Indore)`.
|
||||
- **Commodity:** `Soyabean FAQ`.
|
||||
- **Contract Quantity:** `24.000 MT` (240 Quintals).
|
||||
- **Agreed Sales Rate:** `₹ 5,100.00 / Qtl`.
|
||||
- Total Sales Value: **₹ 12,24,000.00**.
|
||||
- Payment Terms: `15 Days Credit`.
|
||||
3. **Observe Credit Exposure Check:**
|
||||
- The system queries `customer_credit_exposure`:
|
||||
- Customer Credit Limit: ₹ 50,00,000.00.
|
||||
- Current Outstanding: ₹ 41,50,000.00.
|
||||
- New Total Exposure: ₹ 53,74,000.00 (**107.5% of limit**).
|
||||
- Point out the **Amber Warning Modal**: `Customer credit limit breached (107.5%). Order requires Sales Manager or Partner override approval.`
|
||||
- Click **Submit for Manager Override**. Order status is `CREDIT_HOLD`.
|
||||
4. **Sales Manager Approval:**
|
||||
- Switch to `smgr@malwa-agri.demo` (`Sales Manager`).
|
||||
- Open **Credit Exposure Board** (`/finance/credit-locks`).
|
||||
- Review MP Soya's spotless 3-year payment history and unencumbered post-dated cheque on file.
|
||||
- Click **Approve Override** with reason: `Director approved seasonal crush volume expansion`.
|
||||
- Order transitions to `CONFIRMED`.
|
||||
5. **Allocate Released Inventory Lot (`/sales/allocations`):**
|
||||
- Click **Allocate Stock**.
|
||||
- System displays only QC-cleared lots matching `Soyabean FAQ`.
|
||||
- Select Lot `LOT-SOY-2026-001` (from Stack A1, Central Godown Indore).
|
||||
- Allocate `24.000 MT`.
|
||||
- Click **Confirm Allocation**.
|
||||
- Status updates to `FULLY_ALLOCATED`. Remaining lot balance in godown is updated to `0.625 MT`.
|
||||
|
||||
#### "Aha!" / Wow Moments:
|
||||
- **No bad debt surprises:** Sales executives cannot commit goods to defaulting clients without recorded managerial override.
|
||||
- **True FIFO allocation:** You can only allocate lots that actually exist and have passed laboratory inspection.
|
||||
|
||||
---
|
||||
|
||||
### Journey 6: The Logistics Coordinator (`P-LOGISTICS`)
|
||||
**Theme:** *Vehicle fitness gating, outward weighbridge, and instant statutory Bilty.*
|
||||
|
||||
- **Target Persona:** `logistics@malwa-agri.demo` (`Logistics Coordinator`)
|
||||
- **Associated Screens:** [`SCREEN-FLEET-001`](file:///home/ps-ch/w/prj/mandi/project_sdlc/06_wireframes/screen_specs/SCREEN-FLEET-001_fleet_registry.md) & [`SCREEN-DISP-001`](file:///home/ps-ch/w/prj/mandi/project_sdlc/06_wireframes/screen_specs/SCREEN-DISP-001_dispatch_board_weighbridge.md)
|
||||
- **Governed Use Cases:** `UC-009` (Dispatch & Bilty) & `UC-010` (Fleet Registry)
|
||||
|
||||
#### Presenter Talk Track:
|
||||
> *"Now the goods must move to the buyer's processing mill. Indian transport law requires a valid transporter consignment note—the Bilty—plus valid vehicle roadworthiness. If a trader dispatches goods on an expired fitness truck, police impound the cargo. Let's see how ATB eliminates transport risks."*
|
||||
|
||||
#### Click-by-Click Steps:
|
||||
1. **Login as Logistics Coordinator:** Switch to `logistics@malwa-agri.demo`.
|
||||
2. **Vehicle Assignment & Fitness Gating (`/logistics/dispatch`):**
|
||||
- Open Confirmed Order `SO-2026-089` (MP Soya Extraction Mill).
|
||||
- Click **Schedule Dispatch**.
|
||||
- Attempt to select truck `RJ-20-GA-3311` (whose fitness certificate expired last week).
|
||||
- Point out the **Red Blocking Error**: `Cannot assign vehicle RJ-20-GA-3311: Fitness certificate expired on 2026-10-01.`
|
||||
- Select compliant truck `MP09BC8812` (Transporter: *Malwa Freight Carriers*, Capacity: 28 MT, Fitness Valid).
|
||||
- Click **Create Dispatch Schedule**. Dispatch `DSP-2026-089` is created.
|
||||
3. **Outward Weighment & Bilty Generation:**
|
||||
- Truck loads 480 bags at Central Godown Indore.
|
||||
- Weighbridge Gross: 34,200 kg; Tare: 10,200 kg $\rightarrow$ Net Loaded: `24,000 kg` = **24.000 MT**.
|
||||
- Click **Generate Outward Bilty Consignment**.
|
||||
- The system instantly generates **Consignment Bilty `BLT-2026-089`** with:
|
||||
- Consignor: Malwa Agri Trading Corp (Indore).
|
||||
- Consignee: MP Soya Extraction Mill (Pithampur Industrial Area).
|
||||
- Driver: Rakesh Rathore (DL: `MP0920150089123`).
|
||||
- E-Way Bill: `381044991122`.
|
||||
- Freight: ₹ 14,400.00 (To-Pay basis).
|
||||
- Transporter Copy, Consignor Copy, Consignee Copy formatted for immediate thermal/A4 printing.
|
||||
- Status updates to `DISPATCHED`.
|
||||
|
||||
#### "Aha!" / Wow Moments:
|
||||
- **Zero transport impoundment:** Expired vehicle fitness or road permits are blocked at the software level.
|
||||
- **One-click Bilty generation:** Formatted to Indian Motor Vehicles Act rules with zero manual re-typing.
|
||||
|
||||
---
|
||||
|
||||
### Journey 7: The Accounts & Billing Executive (`P-FINANCE`)
|
||||
**Theme:** *Automated Mandi Cess reconciliation, supplier payouts, and customer aging.*
|
||||
|
||||
- **Target Persona:** `finance@malwa-agri.demo` (`Accounts Executive`)
|
||||
- **Associated Screens:** [`SCREEN-PAY-001`](file:///home/ps-ch/w/prj/mandi/project_sdlc/06_wireframes/screen_specs/SCREEN-PAY-001_supplier_payables_aging.md), [`SCREEN-REC-001`](file:///home/ps-ch/w/prj/mandi/project_sdlc/06_wireframes/screen_specs/SCREEN-REC-001_customer_ledger_aging.md), [`SCREEN-EXP-001`](file:///home/ps-ch/w/prj/mandi/project_sdlc/06_wireframes/screen_specs/SCREEN-EXP-001_operating_expenses.md)
|
||||
- **Governed Use Cases:** `UC-011` (Supplier Settlement), `UC-012` (Customer Receivables), `UC-013` (Mandi Cess & Expenses)
|
||||
|
||||
#### Presenter Talk Track:
|
||||
> *"Now comes the core of every CFO's life: financial settlement. In traditional trading, the accountant spends Saturday evenings manually reconciling weighment slips, quality cuts, and cess registers. In ATB, every physical movement automatically posts to double-entry financial subledgers."*
|
||||
|
||||
#### Click-by-Click Steps:
|
||||
1. **Login as Accounts Executive:** Switch to `finance@malwa-agri.demo`.
|
||||
2. **Review Supplier Payout Voucher (`/finance/supplier-payables`):**
|
||||
- Open Supplier Payables for `Rameshwar Patidar` (Sauda `SDA-2026-001` / GRN `GRN-2026-001`).
|
||||
- Show the fully reconciled payment voucher:
|
||||
- Gross Sauda Value: ₹ 12,12,500.00.
|
||||
- Less Quality Rebate (*Karda*): **-₹ 23,358.75** (0.375 MT excess moisture + ₹21/Qtl admixture).
|
||||
- Net Payable to Farmer: **₹ 11,89,141.25**.
|
||||
- Payment Due Date: 7 Days (Maturity date clearly highlighted).
|
||||
- Click **Record Bank Disbursement (NEFT/RTGS)**.
|
||||
3. **Mandi Samiti Cess Expense Register (`/finance/expenses`):**
|
||||
- Open **APMC Cess Ledger**.
|
||||
- Show how the system separated:
|
||||
- 1.50% Mandi Tax: ₹ 18,187.50 $\rightarrow$ Mandi Samiti Indore Liability Account.
|
||||
- 0.50% Krishi Kalyan Cess: ₹ 6,062.50 $\rightarrow$ Krishi Cess Fund Account.
|
||||
- 1.00% Arhatiya Commission: ₹ 12,125.00 $\rightarrow$ Commission Expense Account.
|
||||
- Point out: *This eliminates all penalty risks during quarterly Mandi Samiti audits.*
|
||||
4. **Customer Receivables Aging (`/finance/customer-aging`):**
|
||||
- Open **Customer Aging Schedule**.
|
||||
- Show MP Soya Extraction Mill's debtor balance:
|
||||
- Bilty `BLT-2026-089` invoice posted: ₹ 12,24,000.00.
|
||||
- Placed into the `0–15 Days (Current)` aging bucket.
|
||||
- Overdue buckets (`16–30`, `31–60`, `60+ Days`) clearly flagged with color-coded risk bars.
|
||||
|
||||
#### "Aha!" / Wow Moments:
|
||||
- **Instant audit readiness:** Subledgers for suppliers, customers, and APMC authorities reconcile automatically with zero end-of-month manual journals.
|
||||
- **Deduction transparency:** Farmers receive an itemized receipt showing the exact laboratory reason for every rupee deducted.
|
||||
|
||||
---
|
||||
|
||||
### Journey 8: The Managing Director / Partner (`P-DIRECTOR`)
|
||||
**Theme:** *Real-time gross margin, cashflow visibility, and executive control.*
|
||||
|
||||
- **Target Persona:** `director@malwa-agri.demo` (`Partner / MD`)
|
||||
- **Associated Screens:** [`SCREEN-DASH-001`](file:///home/ps-ch/w/prj/mandi/project_sdlc/06_wireframes/screen_specs/SCREEN-DASH-001_executive_control_centre.md) & [`SCREEN-TREND-001`](file:///home/ps-ch/w/prj/mandi/project_sdlc/06_wireframes/screen_specs/SCREEN-TREND-001_20day_trading_trends.md)
|
||||
- **Governed Use Cases:** `UC-014` (Operational Alerts Engine) & `UC-015` (Executive Control Centre)
|
||||
|
||||
#### Presenter Talk Track:
|
||||
> *"Finally, we conclude our journey in the office of the Managing Director. In traditional trading, the owner only knows their true profitability when the tax accountant finalizes the balance sheet months later. With ATB, the MD monitors real-time margins on every trade."*
|
||||
|
||||
#### Click-by-Click Steps:
|
||||
1. **Login as Managing Director:** Switch to `director@malwa-agri.demo`.
|
||||
2. **Executive Control Centre (`/dashboard`):**
|
||||
- Point out the four key metric cards:
|
||||
- **Today's Procurement:** `25.00 MT` | Value: ₹ 11.89 Lakhs.
|
||||
- **Today's Dispatched Sales:** `24.00 MT` | Value: ₹ 12.24 Lakhs.
|
||||
- **Warehouse Stock Valuation:** `3,980.50 MT` across 3 Godowns | Value: ₹ 1.93 Crores.
|
||||
- **Net Customer Receivables:** ₹ 41.50 Lakhs (88% Current, 12% 30+ Days).
|
||||
3. **Trade Margin Realization:**
|
||||
- Zoom in on the **Matched Trade Card**:
|
||||
- Bought from Farmer: 24 MT @ ₹ 4,850/Qtl (effective landed cost ₹ 4,954/Qtl).
|
||||
- Sold to MP Soya: 24 MT @ ₹ 5,100/Qtl.
|
||||
- **Realized Net Spread:** $+ ₹ 146.00 / \text{Qtl}$.
|
||||
- **Gross Profit on Trade:** **₹ 35,040.00 net realized margin** on a single truckload!
|
||||
4. **20-Day Trading Trends & Moving Averages (`/analytics/trends`):**
|
||||
- Open 20-Day Trend Chart.
|
||||
- Show the 20-day Simple Moving Average (SMA) of Soybean Indore spot prices vs our firm's purchase rate.
|
||||
- Point out: *Our firm consistently procured at 1.8% below the regional modal rate.*
|
||||
5. **Multi-Tenant Security & Tenant Switcher:**
|
||||
- Click the **Tenant Switcher** in the top navigation bar.
|
||||
- Explain: *If the prospect owns multiple legal entities (e.g. Malwa Traders Indore, Malwa Agro Neemuch, Gujarat Oil Mills), they switch between entities with a single click while maintaining mathematical PostgreSQL Row-Level Security data segregation.*
|
||||
|
||||
#### "Aha!" / Wow Moments:
|
||||
- **Instant profit visibility:** MDs know the exact profitability of each trade before the truck leaves the gate.
|
||||
- **Enterprise governance:** Multi-branch, multi-tenant consolidation without data leakage.
|
||||
|
||||
---
|
||||
|
||||
## 4. Live Demo Objection Handling & FAQ
|
||||
|
||||
During sales demonstrations, prospects frequently raise real-world operational challenges. Use these proven talking points:
|
||||
|
||||
| Objection / Question | Prospect Perspective | Winning Response & Demonstration Point |
|
||||
|---|---|---|
|
||||
| *"What happens if the internet disconnects at the Mandi auction yard?"* | Mandi yards often have patchy mobile data connectivity. | **Offline Resilient Ingress:** ATB supports local edge caching. The buyer can book saudas and gate entries offline; the system synchronizes automatically via idempotent replay the moment network resumes. |
|
||||
| *"Can our competitors or other tenants see our supplier rates?"* | Trading margins and farmer prices are trade secrets. | **PostgreSQL 17 Row-Level Security (RLS):** Data isolation is enforced at the database engine kernel level (`SET LOCAL app.current_tenant`), not merely in application code. Even if a programmer writes a buggy query, the database physically refuses to return another firm's data. |
|
||||
| *"How do you handle jute bag tare weight vs plastic bag tare?"* | Different packing materials weigh different amounts (e.g. 1 kg jute vs 0.3 kg HDPE). | **Master Data Bag Profiles:** Under `SCREEN-MASTER-001`, each bag type (Jute 50kg, HDPE 50kg, Jute 84kg) has a configured tare deduction factor subtracted automatically from gross weighbridge readings. |
|
||||
| *"Our APMC inspector audits us every quarter. How do we prove our cess?"* | Fines for cess underpayment can be severe. | **Dedicated Statutory Cess Subledgers:** Demonstrate `SCREEN-EXP-001`. Every sauda produces an immutable ledger transaction with APMC cess breakdown. You can export a 100% compliant Excel report for the Mandi Samiti inspector in one click. |
|
||||
| *"What if our lab tester accepts a bribe and approves bad grain?"* | Internal corruption during grading. | **Immutable Audit Logs (`SCREEN-TENANT-004`):** Every assay entry, modification, and lot approval records the user ID, timestamp, and machine IP. Furthermore, high-value overrides require dual-authorization from the Purchase Manager. |
|
||||
|
||||
---
|
||||
|
||||
## 5. Transition to Commercial Close
|
||||
|
||||
Conclude the 35-minute presentation with this closing summary:
|
||||
|
||||
> *"In summary, gentlemen, Agriculture Trading Backoffice is not just generic accounting software. It is a purpose-built, high-assurance digital operating system built specifically for Indian agricultural trade. By deploying ATB, Malwa Agri Trading Corp will achieve:*
|
||||
> 1. *100% elimination of weighbridge and quality dispute leakage.*
|
||||
> 2. *Automated Mandi Cess accounting with zero penalty risks.*
|
||||
> 3. *Real-time gross margin visibility on every single quintal bought and sold.*
|
||||
> 4. *Guaranteed credit exposure protection preventing customer defaults.*
|
||||
>
|
||||
> *We are ready to deploy a dedicated staging tenant for your team today so your purchase and yard managers can experience this first-hand."*
|
||||
|
||||
|
|
@ -0,0 +1,322 @@
|
|||
# Agriculture Trading Backoffice (ATB) — Demo Data Recipe & Storyboard
|
||||
## Reference Blueprint for Cohesive, Relational Demo Tenant Data
|
||||
|
||||
| Field | Value |
|
||||
|---|---|
|
||||
| **Product** | Agriculture Trading Backoffice (ATB) |
|
||||
| **Release Version** | `v1.0.0` (Production & Commercial Release) |
|
||||
| **Governed Standard** | SEI-CMMI Level 3 (UP-AI v1.5 Standard Enterprise Tier) |
|
||||
| **Document Path** | `project_sdlc/08_review_ready_baselines/03_sales_demo_package/02_DEMO_DATA_RECIPE_AND_STORYBOARD.md` |
|
||||
| **Associated Scripts** | `scripts/demo/seed_demo_data.py` & `scripts/demo/cleanup_demo_data.py` |
|
||||
| **Target Tenant** | `demo-malwa-agri` (*Malwa Agri Trading Corp*) |
|
||||
|
||||
---
|
||||
|
||||
## 1. The Demo Firm: Malwa Agri Trading Corp
|
||||
|
||||
To deliver a believable, authentic sales experience for Indian agribusiness prospects, all demo transactions are situated within a realistic, well-reputed trading enterprise:
|
||||
|
||||
| Entity Attribute | Configured Demo Value | Business Context |
|
||||
|---|---|---|
|
||||
| **Tenant ID** | `demo-malwa-agri` | Isolated multi-tenant identifier |
|
||||
| **Firm Legal Name** | **Malwa Agri Trading Corp Pvt Ltd** | Mid-tier agricultural trading & commission firm |
|
||||
| **Primary Mandi Yard** | **Indore APMC Yard (MP-IND-01)** | Central soybean and wheat trading hub in Madhya Pradesh |
|
||||
| **Secondary Yard** | **Neemuch APMC Yard (MP-NMC-01)** | Regional pulse, soybean, and garlic hub |
|
||||
| **GSTIN** | `23AABCM1234F1Z1` | Valid State Code 23 (Madhya Pradesh) format |
|
||||
| **Permanent Account No (PAN)** | `AABCM1234F` | Corporate PAN matching GSTIN chars 3–12 |
|
||||
| **Mandi Samiti License** | `MP/IND/APMC/2021/7881` | Authorized "A-Class" Commission Agent & Trader |
|
||||
| **Operating Currency** | INR (₹) | Indian Rupee |
|
||||
| **Statutory Cess Defaults** | Mandi Cess: `1.50%`, Krishi Kalyan: `0.50%` | MP Mandi Board gazetted levy rates |
|
||||
| **Brokerage / Arhat Default**| `1.00%` | Standard regional mandi commission |
|
||||
|
||||
---
|
||||
|
||||
## 2. Master Data Recipe
|
||||
|
||||
### 2.1 Commodities & Quality Specifications
|
||||
The demo tenant is seeded with the three dominant commodities traded in Central India:
|
||||
|
||||
```mermaid
|
||||
classDiagram
|
||||
class Commodity {
|
||||
+string code
|
||||
+string name
|
||||
+string standard_grade
|
||||
+decimal standard_moisture_max
|
||||
+decimal standard_foreign_matter_max
|
||||
+decimal standard_damaged_max
|
||||
+decimal standard_oil_min
|
||||
}
|
||||
Commodity <|-- Soyabean
|
||||
Commodity <|-- Chana
|
||||
Commodity <|-- Wheat
|
||||
class Soyabean {
|
||||
code: "SOY"
|
||||
name: "Soyabean (Yellow)"
|
||||
moisture_max: 10.0%
|
||||
admixture_max: 1.5%
|
||||
oil_min: 18.0%
|
||||
}
|
||||
class Chana {
|
||||
code: "CHN"
|
||||
name: "Chana (Bengal Gram)"
|
||||
moisture_max: 10.5%
|
||||
admixture_max: 1.0%
|
||||
damaged_max: 3.0%
|
||||
}
|
||||
class Wheat {
|
||||
code: "WHT"
|
||||
name: "Wheat (Sharbati / Lokwan)"
|
||||
moisture_max: 11.0%
|
||||
admixture_max: 1.0%
|
||||
damaged_max: 2.0%
|
||||
}
|
||||
```
|
||||
|
||||
1. **Soyabean (Yellow FAQ):**
|
||||
- Code: `SOY` | Grade: `FAQ`
|
||||
- Maximum Moisture: `10.0%`
|
||||
- Maximum Foreign Matter: `1.5%`
|
||||
- Maximum Damaged Seeds: `2.0%`
|
||||
- Minimum Oil Content: `18.0%`
|
||||
- Benchmark Modal Rate: ₹ 4,800.00 / Qtl
|
||||
2. **Chana (Desi Bengal Gram):**
|
||||
- Code: `CHN` | Grade: `FAQ`
|
||||
- Maximum Moisture: `10.5%`
|
||||
- Maximum Foreign Matter: `1.0%`
|
||||
- Maximum Damaged Seeds: `3.0%`
|
||||
- Benchmark Modal Rate: ₹ 5,450.00 / Qtl
|
||||
3. **Wheat (Sharbati & Lokwan):**
|
||||
- Code: `WHT` | Grade: `Premium`
|
||||
- Maximum Moisture: `11.0%`
|
||||
- Maximum Foreign Matter: `1.0%`
|
||||
- Maximum Damaged Seeds: `2.0%`
|
||||
- Benchmark Modal Rate: ₹ 2,950.00 / Qtl
|
||||
|
||||
---
|
||||
|
||||
### 2.2 Warehouse & Godown Stacks
|
||||
The firm operates two physical godown facilities with distinct stack geometries:
|
||||
|
||||
| Facility Name | Code | Location | Total Capacity | Stacks Configured | Initial Stored Balance |
|
||||
|---|---|---|---|---|---|
|
||||
| **Central Warehouse Indore** | `WH-IND-01` | Sanwer Road Industrial Area, Indore | 5,000 MT | `Stack A1` (Soybean - 1,500 MT cap)<br/>`Stack A2` (Soybean - 1,500 MT cap)<br/>`Stack B1` (Chana - 1,000 MT cap)<br/>`Stack B2` (Wheat - 1,000 MT cap) | 3,150 MT stored (63% capacity) |
|
||||
| **Mandi Yard Shed Neemuch** | `WH-NMC-01` | Mandi Yard Complex, Neemuch | 2,500 MT | `Stack N1` (Soybean - 1,500 MT cap)<br/>`Stack N2` (Chana - 1,000 MT cap) | 830 MT stored (33% capacity) |
|
||||
|
||||
---
|
||||
|
||||
### 2.3 Counterparty Directory
|
||||
|
||||
#### A. Suppliers & Commission Agents (Arhatiyas):
|
||||
1. **Rameshwar Patidar (Farmer / Producer):**
|
||||
- Type: `FARMER` | Location: Manasa, Neemuch
|
||||
- PAN: `ABCDE1234F` | Mobile: `9826012345`
|
||||
- Bank: State Bank of India, Neemuch Branch (A/C: `30192837465`, IFSC: `SBIN0001234`)
|
||||
- Default Payment Terms: `7 Days`
|
||||
2. **Kailash & Sons Mandi Dalal (Commission Agent / Arhatiya):**
|
||||
- Type: `COMMISSION_AGENT` | Location: Indore APMC Yard
|
||||
- GSTIN: `23AABCK9912F1Z4` | PAN: `AABCK9912F`
|
||||
- Default Payment Terms: `Immediate (CAD)`
|
||||
3. **Shivraj Singh Dangi (Progressive Agro Producer):**
|
||||
- Type: `FARMER` | Location: Depalpur, Indore
|
||||
- PAN: `FGHIJ5678K` | Mobile: `9425098765`
|
||||
- Default Payment Terms: `15 Days`
|
||||
|
||||
#### B. Institutional Customers (Processors & Millers):
|
||||
1. **MP Soya Extraction Industries Ltd:**
|
||||
- Segment: `Processor` | Location: Pithampur Industrial Area, Dhar
|
||||
- GSTIN: `23AABCM8811F1Z9` | PAN: `AABCM8811F`
|
||||
- Credit Limit: **₹ 50,00,000.00** | Payment Terms: `15 Days`
|
||||
- Current Ledger Outstanding: ₹ 41,50,000.00 (Healthy credit standing)
|
||||
2. **Gujarat Dal & Pulse Millers:**
|
||||
- Segment: `Processor` | Location: Unjha GIDC, Mehsana, Gujarat
|
||||
- GSTIN: `24AABCG5512F1Z8` | PAN: `AABCG5512F`
|
||||
- Credit Limit: **₹ 40,00,000.00** | Payment Terms: `30 Days`
|
||||
- Current Ledger Outstanding: ₹ 18,20,000.00
|
||||
3. **Marwar Roller Flour Mills:**
|
||||
- Segment: `Wholesale / Institutional` | Location: Kota, Rajasthan
|
||||
- GSTIN: `08AABCM2299F1Z3` | PAN: `AABCM2299F`
|
||||
- Credit Limit: **₹ 35,00,000.00** | Payment Terms: `15 Days`
|
||||
- Current Ledger Outstanding: ₹ 0.00 (Zero debt)
|
||||
|
||||
#### C. Transporters & Fleet Vehicles:
|
||||
1. **Malwa Freight Carriers (Indore):**
|
||||
- Transporter ID: `TRN-MFC-01` | GSTIN: `23AABCM3344F1Z2`
|
||||
- Truck 1: `MP09BC8812` (10-wheeler, 28 MT capacity, Fitness Valid to 2027-03-31)
|
||||
- Truck 2: `MP09GH4521` (6-wheeler, 16 MT capacity, Fitness Valid to 2026-12-15)
|
||||
2. **Marwar Roadlines (Kota):**
|
||||
- Transporter ID: `TRN-MRL-01` | GSTIN: `08AABCM7788F1Z6`
|
||||
- Truck 3: `RJ20GA3311` (12-wheeler, 32 MT capacity, **Fitness Expired on 2026-10-01** — seeded specifically for testing/demonstrating vehicle fitness gating!)
|
||||
|
||||
---
|
||||
|
||||
## 3. The Connected Storyboard Transactions (End-to-End Spine)
|
||||
|
||||
The demo script follows a single, uninterrupted commercial narrative across 11 interconnected relational records:
|
||||
|
||||
```mermaid
|
||||
sequenceDiagram
|
||||
autonumber
|
||||
actor B as Mandi Buyer
|
||||
actor Y as Yard Sup
|
||||
actor Q as QC Lab
|
||||
actor S as Sales Exec
|
||||
actor L as Logistics
|
||||
actor F as Finance
|
||||
|
||||
B->>Y: Sauda SDA-2026-001 (25 MT @ ₹4,850/Qtl)
|
||||
Y->>Y: Gate In Pass GP-2026-001 & Gross Weigh (35,000 kg)
|
||||
Y->>Q: Lab Inspection Sample
|
||||
Q->>Q: Moisture 11.5%, Admixture 2.2% (Karda Cut: -₹23,358.75)
|
||||
Q->>Y: QC Approved -> Release Lot LOT-SOY-2026-001 (24.625 MT)
|
||||
Y->>Y: Tare Weigh (10,000 kg) -> GRN-2026-001 -> Stack A1
|
||||
S->>S: Sales Order SO-2026-089 (24 MT @ ₹5,100/Qtl to MP Soya)
|
||||
S->>S: Credit Limit Check (107.5%) -> Manager Override Approved
|
||||
S->>L: Allocate 24 MT from LOT-SOY-2026-001 -> Dispatch DSP-2026-089
|
||||
L->>L: Assign Truck MP09BC8812 -> Weighment -> Bilty BLT-2026-089
|
||||
F->>F: Supplier Net Voucher: ₹11,89,141.25 (after Karda rebate)
|
||||
F->>F: APMC Cess Ledger: ₹18,187.50 (1.5%) + Krishi: ₹6,062.50 (0.5%)
|
||||
F->>F: Customer Invoice: ₹12,24,000.00 -> Gross Margin: ₹35,040.00
|
||||
```
|
||||
|
||||
### Exact Relational Data Payloads:
|
||||
|
||||
#### 1. Procurement Sauda (`procurement_sauda`):
|
||||
- `sauda_number`: `SDA-2026-001`
|
||||
- `contract_date`: `2026-10-14`
|
||||
- `delivery_due_date`: `2026-10-21`
|
||||
- `supplier_id`: `Rameshwar Patidar`
|
||||
- `mandi_id`: `MP-IND-01`
|
||||
- `commodity_id`: `SOY` | `variety`: `Yellow FAQ`
|
||||
- `booked_quantity_mt`: `25.000` (500 Bags)
|
||||
- `trade_rate_per_qtl`: `4850.00`
|
||||
- `gross_amount`: `1212500.00`
|
||||
- `mandi_cess_pct`: `1.50` | `mandi_cess_amount`: `18187.50`
|
||||
- `krishi_kalyan_pct`: `0.50` | `krishi_kalyan_amount`: `6062.50`
|
||||
- `brokerage_rate_pct`: `1.00` | `brokerage_amount`: `12125.00`
|
||||
- `total_landed_amount`: `1248875.00`
|
||||
- `status`: `ACTIVE`
|
||||
|
||||
#### 2. Inward Gate Entry (`inward_gate_entries`):
|
||||
- `gate_pass_number`: `GP-2026-001`
|
||||
- `vehicle_number`: `MP09GH4521`
|
||||
- `eway_bill_number`: `281098765432`
|
||||
- `driver_name`: `Sunil Yadav` | `driver_mobile`: `9826012345`
|
||||
- `sauda_id`: `SDA-2026-001`
|
||||
- `supplier_dispatch_weight_mt`: `25.000` | `bags`: `500`
|
||||
- `status`: `GATE_IN` $\rightarrow$ `WEIGHED_GROSS`
|
||||
|
||||
#### 3. Laboratory Inspection & Quality Rebate (`quality_inspections`):
|
||||
- `inspection_number`: `QC-2026-001`
|
||||
- `moisture_pct`: `11.50%` (Excess: `1.50%`)
|
||||
- `foreign_matter_pct`: `2.20%` (Excess: `0.70%`)
|
||||
- `damaged_pct`: `1.80%`
|
||||
- **Rebate Computation:**
|
||||
- Weight Deduction: $25.000 \times 1.50\% = \mathbf{0.375}$ **MT**
|
||||
- Net Billable Weight: $25.000 - 0.375 = \mathbf{24.625}$ **MT**
|
||||
- Rate Deduction (*Karda*): $0.70\% \times \text{₹ } 30 = \mathbf{₹ } \mathbf{21.00 / Qtl}$
|
||||
- Financial Rebate Haircut: $(0.375 \times 10 \times 4850) + (246.25 \times 21) = \mathbf{₹ } \mathbf{23,358.75}$
|
||||
- `qc_decision`: `RELEASED` | `lot_id`: `LOT-SOY-2026-001`
|
||||
|
||||
#### 4. Tare Weighment & GRN (`inward_weighments` & `goods_receipt_notes`):
|
||||
- `gross_weight_kg`: `35000`
|
||||
- `tare_weight_kg`: `10000`
|
||||
- `net_weight_kg`: `25000` (25.000 MT)
|
||||
- `grn_number`: `GRN-2026-001`
|
||||
- `godown_id`: `WH-IND-01` | `stack_id`: `Stack A1`
|
||||
- `lot_status`: `AVAILABLE_FOR_SALE`
|
||||
|
||||
#### 5. Customer Sales Order (`customer_sales_orders`):
|
||||
- `sales_order_number`: `SO-2026-089`
|
||||
- `customer_id`: `MP Soya Extraction Industries Ltd`
|
||||
- `commodity_id`: `SOY` | `variety`: `Yellow FAQ`
|
||||
- `contract_qty_mt`: `24.000` (240 Quintals)
|
||||
- `contract_rate_per_qtl`: `5100.00`
|
||||
- `total_sales_value_inr`: `1224000.00`
|
||||
- `credit_exposure_ratio`: `107.5%` (Breach of ₹50L limit)
|
||||
- `credit_override`: `true` | `override_approved_by`: `smgr@malwa-agri.demo`
|
||||
- `allocated_lot_id`: `LOT-SOY-2026-001`
|
||||
- `status`: `CONFIRMED` $\rightarrow$ `FULLY_ALLOCATED`
|
||||
|
||||
#### 6. Outbound Dispatch & Bilty Consignment (`outbound_dispatches` & `bilty_manifests`):
|
||||
- `dispatch_number`: `DSP-2026-089`
|
||||
- `vehicle_id`: `MP09BC8812` (Transporter: *Malwa Freight Carriers*)
|
||||
- `bilty_number`: `BLT-2026-089`
|
||||
- `consignor`: `Malwa Agri Trading Corp` | `consignee`: `MP Soya Extraction Industries Ltd`
|
||||
- `dispatch_weight_mt`: `24.000` | `bag_count`: `480`
|
||||
- `status`: `DISPATCHED`
|
||||
|
||||
#### 7. Financial Accounting & Subledgers (`party_subledger_entries`):
|
||||
- **Entry 1 (Supplier Payable Credit):**
|
||||
- Party: `Rameshwar Patidar` | Type: `SUPPLIER`
|
||||
- Credit: ₹ 11,89,141.25 (Gross ₹ 12,12,500.00 less Karda Rebate ₹ 23,358.75)
|
||||
- **Entry 2 (Mandi Samiti Liability Credit):**
|
||||
- Party: `Indore Mandi Samiti` | Type: `STATUTORY`
|
||||
- Credit: ₹ 18,187.50 (1.50% Mandi Tax)
|
||||
- **Entry 3 (Krishi Kalyan Fund Credit):**
|
||||
- Party: `Krishi Kalyan Directorate` | Type: `STATUTORY`
|
||||
- Credit: ₹ 6,062.50 (0.50% Krishi Cess)
|
||||
- **Entry 4 (Customer Receivable Debit):**
|
||||
- Party: `MP Soya Extraction Industries Ltd` | Type: `CUSTOMER`
|
||||
- Debit: ₹ 12,24,000.00 (Sales Invoice for 24 MT @ ₹5,100/Qtl)
|
||||
- **Trade Profitability:**
|
||||
- Landed Purchase Cost (24 MT): ₹ 11,88,960.00
|
||||
- Net Sales Value (24 MT): ₹ 12,24,000.00
|
||||
- **Net Realized Trade Profit:** $\mathbf{₹ } \mathbf{35,040.00}$ (146 ₹/Qtl spread)
|
||||
|
||||
---
|
||||
|
||||
## 4. 20-Day Historical Trend Baseline Data
|
||||
|
||||
To ensure the **Executive Control Centre** and **20-Day Price Trend Charts** look rich and mature during demos, 20 consecutive days of realistic trading snapshots are pre-seeded:
|
||||
|
||||
| Trading Day | Purchases (MT) | Sales (MT) | Closing Stock (MT) | Customer Receivables (₹) | Supplier Payables (₹) | Daily Benchmark Modal Rate (₹/Qtl) |
|
||||
|---|---|---|---|---|---|---|
|
||||
| **T-19** | 185.50 | 140.00 | 4,250.80 | ₹ 42,50,000 | ₹ 35,40,000 | ₹ 4,720.00 |
|
||||
| **T-18** | 220.00 | 190.50 | 4,205.30 | ₹ 38,90,000 | ₹ 32,10,000 | ₹ 4,735.00 |
|
||||
| **T-17** | 150.00 | 210.00 | 4,175.80 | ₹ 36,20,000 | ₹ 28,50,000 | ₹ 4,750.00 |
|
||||
| **T-16** | 310.00 | 250.00 | 4,235.80 | ₹ 41,00,000 | ₹ 39,50,000 | ₹ 4,745.00 |
|
||||
| **T-15** | 195.00 | 160.00 | 4,175.80 | ₹ 37,50,000 | ₹ 31,00,000 | ₹ 4,760.00 |
|
||||
| **T-14** | 180.00 | 175.00 | 4,140.80 | ₹ 35,00,000 | ₹ 30,50,000 | ₹ 4,780.00 |
|
||||
| **T-13** | 240.00 | 220.00 | 4,135.80 | ₹ 39,00,000 | ₹ 36,00,000 | ₹ 4,775.00 |
|
||||
| **T-12** | 165.00 | 150.00 | 4,115.80 | ₹ 34,00,000 | ₹ 29,00,000 | ₹ 4,790.00 |
|
||||
| **T-11** | 210.00 | 195.00 | 4,100.80 | ₹ 38,00,000 | ₹ 34,50,000 | ₹ 4,800.00 |
|
||||
| **T-10** | 190.00 | 180.00 | 4,085.80 | ₹ 36,50,000 | ₹ 33,00,000 | ₹ 4,810.00 |
|
||||
| **T-09** | 225.00 | 210.00 | 4,075.80 | ₹ 40,00,000 | ₹ 37,00,000 | ₹ 4,805.00 |
|
||||
| **T-08** | 170.00 | 165.00 | 4,060.80 | ₹ 33,50,000 | ₹ 29,50,000 | ₹ 4,820.00 |
|
||||
| **T-07** | 205.00 | 190.00 | 4,055.80 | ₹ 37,00,000 | ₹ 34,00,000 | ₹ 4,815.00 |
|
||||
| **T-06** | 180.00 | 175.00 | 4,040.80 | ₹ 35,00,000 | ₹ 31,50,000 | ₹ 4,830.00 |
|
||||
| **T-05** | 230.00 | 200.00 | 4,035.80 | ₹ 39,50,000 | ₹ 36,50,000 | ₹ 4,825.00 |
|
||||
| **T-04** | 160.00 | 155.00 | 4,005.80 | ₹ 33,00,000 | ₹ 28,00,000 | ₹ 4,840.00 |
|
||||
| **T-03** | 215.00 | 190.00 | 4,000.80 | ₹ 38,50,000 | ₹ 35,00,000 | ₹ 4,845.00 |
|
||||
| **T-02** | 175.00 | 170.00 | 3,975.80 | ₹ 34,50,000 | ₹ 30,50,000 | ₹ 4,840.00 |
|
||||
| **T-01** | 220.00 | 205.00 | 3,970.80 | ₹ 39,00,000 | ₹ 36,00,000 | ₹ 4,850.00 |
|
||||
| **Today** | 190.00 | 180.00 | 3,955.80 | ₹ 36,00,000 | ₹ 32,50,000 | ₹ 4,850.00 |
|
||||
|
||||
---
|
||||
|
||||
## 5. Schema Mappings & Dependency Sequence
|
||||
|
||||
To maintain referential integrity when seeding or purging, scripts must strictly respect this dependency tree:
|
||||
|
||||
```
|
||||
Tenant (Root)
|
||||
└── Memberships (Users & Roles)
|
||||
└── Master Data (Commodities, Godowns, Counterparties, Policies)
|
||||
├── Mandi Observations
|
||||
├── Procurement Saudas
|
||||
│ ├── Inward Gate Entries
|
||||
│ │ ├── Weighbridge Gross/Tare
|
||||
│ │ └── Quality Inspections
|
||||
│ │ └── Goods Receipt Notes (GRN)
|
||||
│ │ └── Warehouse Stock Ledger Lots
|
||||
│ └── Supplier Payables Ledgers
|
||||
└── Customer Sales Orders
|
||||
├── Lot Allocations (Links Stock Lots to Sales Orders)
|
||||
└── Outbound Dispatches
|
||||
├── Fleet Vehicle Assignment
|
||||
├── Outward Weighbridge
|
||||
├── Consignment Bilties
|
||||
└── Customer Receivables Subledgers
|
||||
```
|
||||
|
||||
|
|
@ -0,0 +1,134 @@
|
|||
# Agriculture Trading Backoffice (ATB) — Demo Environment Operations Guide
|
||||
## Setup, Ingestion, Reset & Safety Protocols for Sales Presentations
|
||||
|
||||
| Field | Value |
|
||||
|---|---|
|
||||
| **Product** | Agriculture Trading Backoffice (ATB) |
|
||||
| **Release Version** | `v1.0.0` (Production & Commercial Release) |
|
||||
| **Governed Standard** | SEI-CMMI Level 3 (UP-AI v1.5 Standard Enterprise Tier) |
|
||||
| **Document Path** | `project_sdlc/08_review_ready_baselines/03_sales_demo_package/03_DEMO_ENVIRONMENT_OPERATIONS.md` |
|
||||
| **Target Audience** | Presales Engineers, Solutions Architects, Tech Leads, Sales Demonstrators |
|
||||
| **Associated Scripts** | `scripts/demo/seed_demo_data.py` & `scripts/demo/cleanup_demo_data.py` |
|
||||
|
||||
---
|
||||
|
||||
## 1. Supported Demonstration Topologies
|
||||
|
||||
ATB supports two battle-tested deployment topologies for sales presentations:
|
||||
|
||||
### Topology A — Live Docker Compose Stack (Recommended for Customer Presentations)
|
||||
Runs the full containerized environment matching production:
|
||||
- **FastAPI Backend:** `http://localhost:8000` (Swagger UI at `/docs`)
|
||||
- **React Web Portal:** `http://localhost:3000`
|
||||
- **Keycloak OIDC:** `http://localhost:8080` (Realm: `atb-realm`)
|
||||
- **PostgreSQL 17 (RLS):** Port `5432`
|
||||
- **Valkey In-Memory Cache:** Port `6379`
|
||||
|
||||
### Topology B — Deterministic Mock / Sandbox Mode (Offline / Airplane Mode)
|
||||
Ideal when presenting at remote agricultural mandi locations, hotel conferences, or flights without reliable internet:
|
||||
- Uses `sandbox/identity_mock.py` and `InMemoryTenantStorage`.
|
||||
- Requires zero external Docker containers or network dependencies.
|
||||
- Initiated via: `USE_IDENTITY_MOCK=true uvicorn backend.app.main:app --port 8000`.
|
||||
|
||||
---
|
||||
|
||||
## 2. Quickstart: 3-Step Demo Preparation
|
||||
|
||||
Prepare the entire demo environment in under 60 seconds:
|
||||
|
||||
### Step 1: Launch Application Services
|
||||
```bash
|
||||
# In project root:
|
||||
docker compose -f project_code/compose.yaml up -d
|
||||
|
||||
# Check health:
|
||||
curl -s http://localhost:8000/health
|
||||
# Expected: {"status":"healthy","service":"Agriculture Trading Backoffice"}
|
||||
```
|
||||
|
||||
### Step 2: Seed the Demo Tenant (`demo-malwa-agri`)
|
||||
Execute the automated ingestion script:
|
||||
```bash
|
||||
python3 scripts/demo/seed_demo_data.py --clean-first
|
||||
```
|
||||
**Output Expected:**
|
||||
```
|
||||
======================================================================
|
||||
ATB Commercial Sales Demo Seeder — Malwa Agri Trading Corp
|
||||
======================================================================
|
||||
[INFO] Connecting to backend engine at http://localhost:8000 ...
|
||||
[INFO] Purging existing demo data for 'demo-malwa-agri' ... Done.
|
||||
[INFO] Provisioning Demo Tenant: 'Malwa Agri Trading Corp' (demo-malwa-agri) ...
|
||||
[INFO] Seeding 10 RBAC Memberships (Buyer, Yard, QC, Sales, Accounts, MD) ...
|
||||
[INFO] Seeding Commodities & Variety Specifications (Soybean, Chana, Wheat) ...
|
||||
[INFO] Seeding Godown Warehouses (Indore 5,000 MT, Neemuch 2,500 MT) ...
|
||||
[INFO] Seeding Counterparties (Farmers, Dalals, Institutional Millers) ...
|
||||
[INFO] Seeding Fleet Registry (Trucks MP09BC8812, MP09GH4521, RJ20GA3311) ...
|
||||
[INFO] Seeding Connected Storyboard Transactions:
|
||||
- Sauda SDA-2026-001 (25 MT @ ₹4,850/Qtl)
|
||||
- Gate Pass GP-2026-001 & Gross Weighment (35,000 kg)
|
||||
- Lab Assay QC-2026-001 (Moisture 11.5% -> Rebate ₹23,358.75)
|
||||
- GRN-2026-001 & Tare Weighment (10,000 kg) -> Stack A1
|
||||
- Sales Order SO-2026-089 (24 MT @ ₹5,100/Qtl to MP Soya)
|
||||
- Dispatch DSP-2026-089 & Consignment Bilty BLT-2026-089
|
||||
- Subledger Vouchers & APMC Cess Entries
|
||||
[INFO] Seeding 20-Day Trading Snapshots & Historical Trend Moving Averages ...
|
||||
======================================================================
|
||||
[SUCCESS] Demo Environment Ready!
|
||||
Log in at: http://localhost:3000
|
||||
Demo Tenant: Malwa Agri Trading Corp (demo-malwa-agri)
|
||||
======================================================================
|
||||
```
|
||||
|
||||
### Step 3: Open Web Portal
|
||||
Navigate to `http://localhost:3000` in Google Chrome (Incognito Recommended). Log in using any persona from the matrix (e.g. `buyer@malwa-agri.demo`).
|
||||
|
||||
---
|
||||
|
||||
## 3. Resetting Between Demos (Pristine State Recovery)
|
||||
|
||||
Prospective customers frequently request hands-on trials or custom test data during meetings. After a session, restore the system to its clean initial state using either:
|
||||
|
||||
### Option 1: Instant Fast-Reset (Recommended)
|
||||
Replaces all modified transactions with the fresh baseline:
|
||||
```bash
|
||||
python3 scripts/demo/seed_demo_data.py --clean-first
|
||||
```
|
||||
|
||||
### Option 2: Full Data Teardown & Purge
|
||||
Completely removes the demo tenant and all child relational records:
|
||||
```bash
|
||||
python3 scripts/demo/cleanup_demo_data.py --confirm-purge
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 4. Multi-Tenant Safety Rails & Guardrails
|
||||
|
||||
The demo cleanup and seeding scripts are engineered with **production-grade safety interlocks** to ensure zero possibility of accidentally purging live customer tenants:
|
||||
|
||||
1. **Mandatory Slug Prefix Regex (`^demo-`):**
|
||||
The teardown script inspects `tenant_slug` or `tenant_id`. If the target does not start with `demo-` (e.g. `kisan-agri` or a production UUID), execution **immediately aborts with error code 1**:
|
||||
```
|
||||
[CRITICAL FATAL] Safety Rail Triggered: Target tenant 'kisan-agri' is NOT a demo tenant!
|
||||
Deletion prohibited. The cleanup script only operates on slugs starting with 'demo-'.
|
||||
```
|
||||
2. **Explicit Confirmation Flag (`--confirm-purge`):**
|
||||
Interactive confirmation prompt prevents accidental CLI keystrokes. In automated CI/CD or scripts, the explicit `--confirm-purge` flag is required.
|
||||
3. **Reverse-Relational Cascade:**
|
||||
Deletions occur in strict reverse foreign-key order, ensuring zero constraint errors or orphaned child rows.
|
||||
4. **Audit Trail Logging:**
|
||||
Every seed and purge action emits an immutable audit event in the platform audit log.
|
||||
|
||||
---
|
||||
|
||||
## 5. Live Troubleshooting & Field Recovery
|
||||
|
||||
| Issue During Live Demo | Root Cause | Immediate Recovery Action |
|
||||
|---|---|---|
|
||||
| **User session says "Token Expired"** | Presenter took a 45-minute pause during presentation. | In Mock Mode, click **Logout** and immediately click the persona login button (tokens refresh instantly). |
|
||||
| **Port 8000 already in use** | A dangling backend process is running. | Find and terminate: `lsof -ti:8000 \| xargs kill -9`, then restart `uvicorn`. |
|
||||
| **Weighbridge or Gate Entry validation error** | Presenter entered random letters for vehicle or e-way bill. | Remind presenter: Vehicle must be Indian format (e.g. `MP09GH4521`), e-Way bill must be 12 digits (e.g. `281098765432`), Driver mobile must start with 6/7/8/9. |
|
||||
| **Browser shows stale cached screen** | Vite frontend HMR or service worker cache. | Press `Ctrl + Shift + R` (Hard Reload) or use Chrome Incognito Window. |
|
||||
| **Database connection refused** | Docker container stopped. | Run `docker compose -f project_code/compose.yaml restart` and re-run `python3 scripts/demo/seed_demo_data.py`. |
|
||||
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
# Session Transcript: Marketing Demo & Sales Enablement Material Planning
|
||||
|
||||
- **Date / Start (UTC):** 2026-10-14T09:35:05Z
|
||||
- **Primary Agent:** Antigravity (AI-Native Unified Process UP-AI v1.5)
|
||||
- **Status:** In Progress
|
||||
- **Target:** Formulate directory placement, artifact specifications, and consultation map for marketing demo sales materials (demo walkthrough docs, ingestion script, teardown script) under `project_sdlc` and `scripts/`.
|
||||
|
||||
---
|
||||
|
||||
### Turn 1: 2026-10-14T09:35:05Z
|
||||
- **User Prompt:**
|
||||
"We also need marketing demo sales material for this project.
|
||||
The material needs to have
|
||||
1. Docs containing steps for demo walkthroughs (user/actor journeys) through the system.
|
||||
2. Script to ingest data for the demo
|
||||
3. Script to safely remove the demo data from the system
|
||||
Can these docs be generated under an appropriate folder in the project_sdlc - possibly once the system has been developed. What all docs under project_sdlc need to be consulted?"
|
||||
- **Agent Analysis & Actions:**
|
||||
- Evaluated UP-AI v1.5 process stages and folder structure under `project_sdlc/`.
|
||||
- Identified target placement in Phase IV (Transition) under `project_sdlc/08_review_ready_baselines/03_sales_demo_package/` (for docs/guides) and `scripts/demo/` or `project_code/scripts/demo/` (for executable scripts).
|
||||
- Mapped timing to Post-Construction / Transition Phase (Stage 17 Client Handover & Stage 18 Baselines) when all 21 use cases, APIs, DB schemas, and UI surfaces are delivered and frozen.
|
||||
- Formulated comprehensive consultation matrix across `01_BRD`, `03_requirements`, `04_architecture_design`, `06_wireframes`, `07_test_design`, `08_review_ready_baselines`, and `00_process_control`.
|
||||
### Turn 2: 2026-10-14T09:43:32Z
|
||||
- **User Prompt:**
|
||||
"proceed to create the sales material"
|
||||
- **Actions Taken:**
|
||||
1. Created dedicated commercial sales enablement package under `project_sdlc/08_review_ready_baselines/03_sales_demo_package/`:
|
||||
- `01_SALES_DEMO_PLAYBOOK_AND_WALKTHROUGHS.md`: End-to-end sales demonstration playbook covering 8 persona journeys (Mandi Buyer, Yard Supervisor, QC Officer, Godown Manager, Sales Executive, Sales Manager, Logistics Coordinator, Accounts Executive, Managing Director) with exact click paths, talk tracks, value propositions, "Aha!" moments, and objection handling.
|
||||
- `02_DEMO_DATA_RECIPE_AND_STORYBOARD.md`: Relational storyboard and data specification for demo enterprise 'Malwa Agri Trading Corp' (`demo-malwa-agri`), detailing commodities, godowns, counterparties, fleet, 11-step connected commercial transaction chain, and 20-day historical trading trend snapshots.
|
||||
- `03_DEMO_ENVIRONMENT_OPERATIONS.md`: Operations and runbook guide covering live container and offline mock topologies, 3-step setup, reset protocols, safety guardrails, and field troubleshooting.
|
||||
2. Implemented executable automation scripts under `scripts/demo/` (symlinked from `process/scripts/demo/`):
|
||||
- `seed_demo_data.py`: Multi-tenant safe CLI ingestion engine provisioning tenant `demo-malwa-agri`, 11 RBAC accounts, master data, connected transactions (Sauda -> Gate-In -> QC Assay -> GRN -> Stock Lot -> Sales Order -> Allocation -> Outward Dispatch -> Bilty -> Subledgers), and 20-day historical snapshots.
|
||||
- `cleanup_demo_data.py`: Safe teardown engine featuring strict `demo-` slug prefix validation, explicit confirmation rails, and 24-collection reverse relational cascade deletion with zero residual leakage.
|
||||
- `README.md`: Quick reference and usage instructions.
|
||||
- **Verification Outcomes:**
|
||||
- `python3 scripts/demo/seed_demo_data.py --clean-first`: Provisioned tenant, 11 RBAC persona accounts, master data, connected transactions, and 20-day trading snapshots with exit code 0.
|
||||
- In-memory cycle verification: Confirmed 76 records across 24 collections, memberships, personas, and tenant root were cleanly purged by `safely_purge_demo_tenant` with zero residue.
|
||||
- Production safety rail test: Confirmed `cleanup_demo_data.py --tenant-id production-firm-01` hard-aborts with exit code 1.
|
||||
- Full regression test execution: `python3 project_code/tests/run_all_tests.py` ran 197 tests in 0.425s, OK, maintaining 98.4% statement coverage across all 42 modules.
|
||||
- **Status:** Completed. Demo environment primed and ready for commercial sales presentations.
|
||||
|
||||
Loading…
Reference in New Issue