Build vs. Buy Strategy: CRM & Orchestration¶
Decision: BUILD (Custom)
Alternatives Evaluated: Pipedrive, Odoo, Frappe (ERPNext), Microsoft D365
This document outlines the strategic rationale for building the Pebble Orchestrator as a custom "sidecar" platform rather than implementing an off-the-shelf CRM or ERP module.
Executive Summary¶
The decision to build was driven by three critical "Industrial Gaps" that general-purpose software could not bridge without excessive customization cost and technical debt.
| Feature Domain | Off-the-Shelf (Odoo / Twenty / Pipedrive) | Pebble Orchestrator (Custom Build) |
|---|---|---|
| Data Philosophy | Platform-Centric: Wants to own the Customer UID and Ledger. | Tally-Sidecar: Architecture treats Tally UIDs as immutable keys. |
| UX Workflow | Generic: Optimized for standard SaaS/Service deals. | Industrial: 8-Tab workflow for Chemical Regs (FEP, Drug Licenses). |
| Intelligence | Assistant: "Draft me an email." | Orchestrator: "Parse signature, check Tally credit, auto-create Kanban/CRM shell." |
| Compliance | Configuration: Relies on user training/process. | Hard-Coded: Software blocks (e.g., Disable Invoice if License Expired). |
1. The "Tally-Sidecar" Strategy (Target Architecture)¶
The Problem with Odoo / Frappe¶
Platforms like Odoo and Frappe (ERPNext) are fundamentally "Accounting-Centric." They are designed to replace your existing financial software.
- Lock-in Risk: The Enterprise uses Tally Prime for accounting. Adopting Odoo would pressure the business to migrate its ledger to Odoo to get full value, creating massive compliance risk (Indian Taxation/GST) and operational disruption.
- The "Sync Trap": While Odoo can integrate with Tally (via third-party connectors), the architecture is fundamentally conflicted. Odoo is designed to be the accounting engine, not a peripheral. This leads to "Source of Truth" wars where both systems try to manage inventory/ledgers, often requiring complex bidirectional syncs that are prone to breakage.
- The "Middleware Cost": Just like Pipedrive, Frappe and Odoo often rely on tools like Zapier or custom Python scripts to bridge the gap with external systems, adding hidden subscription costs and fragility.
The Pebble Solution¶
Pebble is being built with a "Sidecar" Architecture to support a future deep-integration with Tally.
- Non-Invasive: The roadmap creates a layer that "reads" from Tally without attempting to replace it.
- Future-Proofing: By building custom, the business retains the flexibility to implement the XML / HTTP Integration Engine (Phase 1) exactly as per its operational needs, ensuring that when the integration goes live, it respects Tally as the immutable Source of Truth.
2. Competitive Analysis¶
vs. Pipedrive (The "Connectivity" Trap)¶
Pipedrive is a best-in-class Sales CRM, but it lacks "Industrial Depth."
- The Marketplace Gap: Pipedrive relies on apps for functionality. There is no Pipedrive App for "Calculate Import Duty based on bonded warehouse status" or "Check Bonded vs. Duty-Paid Batch Availability."
- Workflow: To execute a sale in Pipedrive, a user would need:
- Pipedrive: For the Deal.
- Zapier: To move data.
- Spreadsheet/External Tool: To calculate the "Landed Cost" (Freight + Customs + Margin).
- DocuSign: To send the quote.
- Pebble Advantage: The CPQ Engine is native. The AI calculates the Landed Cost (Ingredient Price + Duty + Freight) instantly based on Tally's batch data.
vs. Frappe / ERPNext (The "Framework" Trap)¶
Frappe is a powerful open-source framework, but it comes with "Opinionated Bloat."
- Development Velocity: Customizing ERPNext to hide 90% of its irrelevant modules (HR, Asset Management, Manufacturing) takes significant effort. You spend more time disabling features than building new ones.
- Tally Integration: While Frappe allows for Tally integration (via community connectors or custom scripts), these are often "flat" data dumps or require significant maintenance to handle Tally's XML schema quirks. They treat Tally as a data source to be imported, rather than a live operational twin.
- Pebble Advantage: Pebble's architecture is built specifically around Tally's XML structure. It doesn't just import data; it "understands" the industrial context of that data (e.g., checking credit limits against open orders in real-time) without needing a full sync.
vs. Twenty CRM (The "SaaS-Centric" Framework)¶
Twenty is a modern, developer-first alternative to Salesforce, but it is built for Horizontal CRM (General Sales).
- The Orchestration Gap: Twenty excels at "managing relationships" (Email sync, notes, pipelines). However, its AI Classification (e.g., Sales vs. Logistics) is currently in beta/development. For Pebble IQ's core "AI Traffic Cop" flow, we would still need to build the brain externally.
- The "Industrial Block" Limitation: While Twenty's backend is flexible, its UI Layer is not a Control Plane. Implementing a "Hard Block" (like physically disabling a 'Send Quote' button if a Tally Drug License is missing) would require forking and modifying Twenty's core UI code, as their native extension framework doesn't yet support fine-grained button-level logic.
- Multi-Entity Shared Credits: Handling a shared credit bucket across 3 legal entities is a very custom industrial requirement that horizontal CRMs like Twenty don't handle out-of-the-box.
- Pebble Advantage: Custom logic for "FEP Audit Blocks" and "Drug License Hard-Stops" is implemented as first-class citizenship in the core code, not as an afterthought/plugin.
vs. Microsoft Dynamics 365 (The Legacy)¶
The customer is migrating away from D365. * Pain Points: Extreme cost, slow UI latency, and "Consultant Dependency" (any change requires a certified partner). * Pebble Advantage: "Millisecond Utility." The search is instant. The UI is built for speed.
3. Industrial Gap Analysis (Visual Reference)¶
Analysis of referential industrial prototypes (borrowed concepts) revealed several "Hard Gaps" that standard SaaS platforms (Odoo, Frappe, Pipedrive) cannot bridge without expensive, multi-month customization.
A. Regulatory & Compliance Gaps¶
| Feature | Industrial Requirement (Reference) | SaaS Limitation (Odoo/Frappe) | Pebble "Build" Advantage |
|---|---|---|---|
| Drug License Tracking | Hard-stop validation against chemical sales. | Text field only; no native blocking logic. | Native validation in the Quote engine. |
| FEP Status | Factory Empanelment Process tracking per location. | Requires custom module/entity. | Built into the Location Master for industrial audits. |
| Monthly Consumption | Tracking granular consumption patterns for key SKU groups. | Basic "Potential" field only. | Data-driven forecasting for inventory sidecar. |
B. Industrial UX Gaps¶
| Feature | Industrial Requirement (Reference) | SaaS Limitation (Pipedrive) | Pebble "Build" Advantage |
|---|---|---|---|
| 8-Tab Workflow | Consolidating Locations, Contacts, Products, and Suppliers in one view. | Requires multiple navigation clicks/reloads. | Single-screen industrial dashboard (Zero Latency). |
| Tally-first Data Model | SAP/Tally codes as primary identifiers. | CRM-centric UID leads to sync conflicts. | Sidecar architecture treats Tally UID as the Source of Truth. |
| Multi-Entity Comm. | 4 Mobiles, 3 Emails, and 5 Social IDs per contact. | Standard fields are limited to 1-2. | Native schema for high-touch distribution relationships. |
4. Competitive Analysis (Updated)¶
Standard CRMs treat all "Contacts" roughly the same. In Chemical Distribution, the "Product-Customer" matrix is complex.
A. Multi-Entity Legal Structures¶
- Scenario: A single client group has 3 Legal Entities (Pvt Ltd, LLP, Inc). They share a Global Credit Limit.
- Standard CRM: Treats them as 3 separate companies. You cannot easily enforce a "Group Credit Block."
- Pebble: Built with a "Group Company" layer that aggregates Tally ledgers across entities to enforce limits dynamically.
B. Regulatory Hard-Stops¶
- Scenario: You cannot sell "Precursor Chemicals" if the customer's Drug License is expired.
- Standard CRM: Rely on a "Custom Field" text box that users often ignore.
- Pebble: The system physically disables the "Generate Quote" button if the
Drug_License_Expiry_Date<Today. Compliance is code, not policy.
5. Financial Tradeoff¶
| Cost Component | Buying Service (Odoo/Salesforce) | Building Custom (Pebble) |
|---|---|---|
| Licensing | Perpetual User Fees ($20-100/user/mo) | $0 (Owned IP) |
| Implementation | High (Consultant Fees: $50-100k) | Fixed Dev Cost |
| Customization | Expensive & Limited by Platform | included in Build |
| Maintenance | Upgrade Risks (Breaking changes) | Low (Self-contained Docker) |
| Infrastructure | Varies | Low (Cloudflare + VPS) |
6. Synthesis of Design Ideas (Reference-to-Pebble Mapping)¶
The referential industrial concepts provided via screenshots are being synthesized into Pebble's architecture to ensure it meets industrial standards out of the box.
| Reference Concept Item | Strategy for Pebble Build |
|---|---|
| 8-Tab Consolidated UX | Pebble will use a Single-SPA architecture with persistent tabs. This eliminates the "page reload fatigue" common in legacy industrial systems. |
| Drug License & Compliance | Pebble's CPQ Engine will treat Drug_License_Expiry as a "Hard Block." No quote or invoice can be generated if the license is invalid. |
| High-Touch Comm. Schema | Unlike standard CRMs with 1-2 phone fields, Pebble's schema supports 4+ Mobile numbers and multi-social IDs (WhatsApp/Telegram) per contact by default. |
| FEP (Industrial Audit) | Factory Empanelment Process status will be a first-class citizen in the Location Master, visible on every delivery and dispatch screen. |
| Tally/ERP Sync Logic | The Sidecar Architecture will use a "Snapshot-First" pattern to ensure local operations (like order booking) never fail even if Tally is offline. |
Conclusion¶
- High-Volume Stability: For a stable industrial business, owning the orchestration layer provides better long-term ROI than renting.
- Avoids Rent-Seeking: Eliminates perpetual per-seat licensing costs and "Consultant Dependency" for minor changes.
- Asset Value: The custom platform becomes a proprietary IP asset rather than an operational expense.