System Integrations (INT)¶
Module Purpose: Connects the "Brain" (Pebble) to the "Body" (ERP/CRM). It ensures that a Sale Order created here actually generates a Dispatch Note in SAP/Oracle without human copy-pasting.
[!TIP] Core Concept: "Event-Driven Sync." We don't just dump data. We trigger actions based on events (e.g.,
Quote_Won-> push to ERP).
Use Case Quick Reference¶
| ID | Title | Priority |
|---|---|---|
| INT-001 | Salesforce Connector (Bi-directional) | P1 |
| INT-002 | ERP Connector (SAP/Oracle) | P1 |
| INT-003 | Document Sync (SharePoint/Drive) | P1 |
| INT-004 | Webhook Event Bus | P2 |
UC-INT-001: Salesforce Connector¶
What It Does¶
Keeps the Sales Team (in Salesforce) and the Ops Team (in Pebble) aligned. If a Lead is converted in Salesforce, it appears in Pebble. If a Quote is finalized in Pebble, it updates the Opportunity value in Salesforce.
Who: System Integration
When: Real-time Sync
How It Works¶
- Trigger: "Opportunity Won" in Salesforce.
- Action:
- Pull Customer Details -> Create/Update in Pebble Masters.
- Pull Product Line Items -> Create "Order Request" in Pebble.
- Reverse Sync:
- Pebble generates PDF Quote.
- Pushes PDF file to
Salesforce.Attachmentsobject linked to the Opportunity.
UC-INT-002: ERP Connector (SAP/Oracle)¶
What It Does¶
The "Money Bridge". Pebble handles the negotiation, but the ERP handles the transaction. This connector ensures financial data flows accurately.
Who: System Integration
When: Order Finalization
How It Works¶
- Inventory Check:
- Pebble queries ERP API:
GET /inventory/zinc-oxide/batch-status. - ERP returns: "50MT Available".
- Order Push:
- Quote Closed in Pebble.
- API POST to ERP
CreateSaleOrder. - Payload: Customer ID, Item Codes, Agreed Price, Tax Logic.
- Status Pull:
- Pebble polls ERP for
Dispatch_Status. - When ERP says "Truck Left", Pebble sends SMS to Customer (OPS-001).
UC-INT-003: Document Sync¶
What It Does¶
Compliance Insurance. Ensures that every file generated in Pebble (Quotes, Invoices, COA) is automatically backed up to the corporate file server (SharePoint/Google Drive).
Who: System Archivist
When: File Creation
How It Works¶
- Event: User uploads "Signed Contract.pdf".
- Path Logic:
- Logic:
/Corporate/Contracts/{Customer_Name}/{Year}/. - Upload: API Puts file to destination.
- Metadata: Tags file in SharePoint with "Expiry Date" from Pebble metadata.
UC-INT-004: Webhook Event Bus¶
What It Does¶
Allows custom third-party apps to listen to Pebble events. Want a Slack notification when a deal closes? Want a blinking light in the office? Use Webhooks.
Who: Developer / IT
When: System Events
How It Works¶
- Subscription: Admin registers URL
https://my-internal-tool.com/webhook. - Topic: Subscribes to
quote.approved. - Payload:
- JSON sent:
{"id": 123, "amount": 50000, "user": "Steve"}. - Use Case:
- Client's internal dashboard updates instantly.
- Slack bot posts: "Steve just closed a 50k deal! 🚀".