Commit Graph

27 Commits

Author SHA1 Message Date
e8c751e987 [31e88f42] Erreicht: Die Stabilität des SuperOffice Connectors wurde maßgeblich verbessert, um Endlos-Schleifen bei der Job-Verarbeitung zu verhindern und die Dashboard-Anzeige zu optimieren. Die Verarbeitung relevanter Änderungen wurde präzisiert.
Erreicht: Die Stabilität des SuperOffice Connectors wurde maßgeblich verbessert, um Endlos-Schleifen bei der Job-Verarbeitung zu verhindern und die Dashboard-Anzeige zu optimieren. Die Verarbeitung relevanter Änderungen wurde präzisiert.
Details der Implementierung:
 * Stabile Job-Verarbeitung (Poison Pill): Ein Poison Pill-Mechanismus wurde in queue_manager.py eingeführt. Jobs werden nun nach maximal 5 fehlgeschlagenen Versuchen automatisch als FAILED markiert.
 * Robuste SuperOffice API-Client-Authentifizierung: Die Fehlerbehandlung im superoffice_client.py wurde gehärtet. Authentifizierungsfehler und andere kritische API-Probleme lösen jetzt spezifische Exceptions aus.
 * Behebung des Worker-Startfehlers: Ein ImportError (ContactNotFoundException) im Worker wurde behoben.
 * Präzise Trigger-Logik: Eine Neubewertung von Accounts wird jetzt nur noch bei Änderungen an den Feldern name, urladdress, urls oder dem Vertical-UDF (SuperOffice:83) ausgelöst.
 * Korrekte Datumsanzeige im Dashboard: Die Dashboard-Formatierungslogik wurde angepasst, um updated_at-Zeitstempel anzuzeigen.
2026-03-09 12:38:08 +00:00
3ee995173c Docs: Aktualisierung der Dokumentation für Task [31e88f42] 2026-03-09 12:38:08 +00:00
de576e2a9a docs(connector): [31e88f42] Document webhook de-duplication shield
Document the newly implemented de-duplication logic in the SuperOffice Connector README. This explains the problem of duplicate 'contact.created' webhooks from SuperOffice and how the worker now skips redundant jobs.
2026-03-09 08:42:22 +00:00
78461b0e71 fix(connector): [31e88f42] Implement de-duplication for contact.created
SuperOffice sends two 'contact.created' webhooks for a single new contact. This caused the connector to process the same entity twice, leading to duplicate entries and logs.

This commit introduces a de-duplication shield in the worker:
- A new method  is added to  to check for jobs with the same company name that are either 'PROCESSING' or 'COMPLETED' within the last 5 minutes.
- The worker now fetches the company name upon receiving a job, updates the job record with the name, and then calls the new de-duplication method.
- If a duplicate  event is detected, the job is skipped, preventing redundant processing.
2026-03-09 08:39:35 +00:00
f38b76ffae [30388f42] fix: Stabilize competitor-analysis and content-engine services 2026-03-08 14:50:00 +00:00
c467d62580 [30388f42] feat: Add automated test infrastructure for core services 2026-03-08 13:41:58 +00:00
ae2303b733 [30388f42] Infrastructure Hardening: Repaired CE/Connector DB schema, fixed frontend styling build, implemented robust echo shield in worker v2.1.1, and integrated Lead Engine into gateway. 2026-03-07 14:08:42 +00:00
efcaa57cf0 [30388f42] Recovery & Stabilization: Restored productive core stack, implemented Docker Volumes for DB persistence, and fixed frontend build issues. 2026-03-07 08:06:50 +00:00
17346b3fcb [2ff88f42] Full End-to-End integration: Webhooks, Auto-Enrichment, Notion-Sync, UI updates and new Connector Architecture 2026-02-19 16:13:16 +00:00
Moltbot-Jarvis
262add256f docs: Add scale-up plan for SuperOffice batch processing 2026-02-19 08:14:44 +00:00
Moltbot-Jarvis
d2e9ee2a70 feat(so-sync): final round-trip tools and infrastructure fixes 2026-02-16 13:58:37 +00:00
Moltbot-Jarvis
bb306c7717 feat(so-sync): bidirectional round-trip for company data established [lessons-learned] 2026-02-16 13:58:37 +00:00
f5e661f9c0 feat(superoffice): Restore full main.py functionality and add health check [2ff88f42]
This commit restores the full functionality of the  script within the  module. Several  instances were resolved by implementing missing methods in  (e.g., , , , , , , ) and correcting argument passing.

The data extraction logic in  was adjusted to correctly parse the structure returned by the SuperOffice API (e.g.,  and ).

A dedicated SuperOffice API health check script () was introduced to quickly verify basic API connectivity (reading contacts and persons). This script confirmed that read operations for  and  entities are functional, while the  endpoint continues to return a , which is now handled gracefully as a warning, allowing other tests to proceed.

The  now successfully executes all SuperOffice-specific POC steps, including creating contacts, persons, sales, projects, and updating UDFs.
2026-02-16 10:33:19 +00:00
Jarvis
82fb1a7804 docs: Add ID mappings for Roles and Verticals (DEV) 2026-02-12 14:24:57 +00:00
Jarvis
275c284716 docs: Add DEV/PROD mapping for UDF ProgIds 2026-02-12 14:23:45 +00:00
Jarvis
ed34b233ca feat: Build complete POC for Butler model (client, matrix, daemon) 2026-02-12 14:18:57 +00:00
Jarvis
4756fa3815 docs: Create comprehensive documentation for the Butler model architecture 2026-02-12 14:18:57 +00:00
a5daf1a059 [2ff88f42] Update README.md with custom table access lessons learned and revert unrequested files. 2026-02-11 13:34:35 +00:00
005c947dae [2ff88f42] refactor(connector-superoffice): finalize production readiness cleanup
- Integrated centralized logging system in all modules.
- Extracted all IDs and ProgIds into a separate .
- Refactored  and  for cleaner dependency management.
- Included updated discovery and inspection utilities.
- Verified end-to-end workflow stability.
2026-02-10 12:43:26 +00:00
0821437407 [2ff88f42] feat(connector-superoffice): Implement Company Explorer sync and Holiday logic
- **Company Explorer Sync**: Added `explorer_client.py` and integrated Step 9 in `main.py` for automated data transfer to the intelligence engine.
- **Holiday Logic**: Implemented `BusinessCalendar` in `utils.py` using the `holidays` library to automatically detect weekends and Bavarian holidays, ensuring professional timing for automated outreaches.
- **API Discovery**: Created `parse_ce_openapi.py` to facilitate technical field mapping through live OpenAPI analysis.
- **Project Stability**: Refined error handling and logging for a smooth end-to-end workflow.
2026-02-10 11:56:44 +00:00
b236bbe29c [2ff88f42] 1. Umfassende Entitäten-Erstellung: Wir haben erfolgreich Methoden implementiert, um die Kern-SuperOffice-Entitäten per API zu erstellen:
1. Umfassende Entitäten-Erstellung: Wir haben erfolgreich Methoden implementiert, um die Kern-SuperOffice-Entitäten per API zu erstellen:
       * Firmen (`Contact`)
       * Personen (`Person`)
       * Verkäufe (`Sale`) (entspricht D365 Opportunity)
       * Projekte (`Project`) (entspricht D365 Campaign), inklusive der Verknüpfung von Personen als Projektmitglieder.
   2. Robuste UDF-Aktualisierung: Wir haben eine generische und fehlertolerante Methode (update_entity_udfs) implementiert, die benutzerdefinierte Felder (UDFs) für sowohl Contact- als
      auch Person-Entitäten aktualisieren kann. Diese Methode ruft zuerst das bestehende Objekt ab, um die Konsistenz zu gewährleisten.
   3. UDF-ID-Discovery: Durch eine iterative Inspektionsmethode haben wir erfolgreich alle internen SuperOffice-IDs für die Listenwerte deines MA Status-Feldes (Ready_to_Send, Sent_Week1,
      Sent_Week2, Bounced, Soft_Denied, Interested, Out_of_Office, Unsubscribed) ermittelt und im Connector hinterlegt.
   4. Vollständiger End-to-End Test-Workflow: Unser main.py-Skript demonstriert nun einen kompletten Ablauf, der alle diese Schritte von der Erstellung bis zur UDF-Aktualisierung umfasst.
   5. Architekturplan für Marketing Automation: Wir haben einen detaillierten "Butler-Service"-Architekturplan für die Marketing-Automatisierung entworfen, der den Connector für die
      Textgenerierung und SuperOffice für den Versand und das Status-Management nutzt.
   6. Identifikation des E-Mail-Blockers: Wir haben festgestellt, dass das Erstellen von E-Mail-Aktivitäten per API in deiner aktuellen SuperOffice-Entwicklungsumgebung aufgrund fehlender
      Lizenzierung/Konfiguration des E-Mail-Moduls blockiert ist (500 Internal Server Error).
2026-02-10 11:06:32 +00:00
538e42b5ea [2ff88f42] feat(connector-superoffice): Implement Sale and Project entities, refine workflow
This commit extends the SuperOffice connector to support the creation and linking of Sale \(Opportunity\) and Project \(Campaign\) entities, providing a comprehensive foundation for both sales and marketing automation workflows.

Key achievements:
- **`SUPEROFFICE_INTEGRATION_PLAN.md`**: Updated to include strategic mapping of D365 concepts \(Opportunity, Campaign\) to SuperOffice entities \(Sale, Project\).
- **`connector-superoffice/superoffice_client.py`**:
    - Implemented `create_sale` method to generate new opportunities, correctly mapping `Title` to SuperOffices
2026-02-10 07:57:11 +00:00
2318bf322b [2ff88f42] 1. Analyse der Änderungen:
1. Analyse der Änderungen:
      * superoffice_client.py: Implementierung der Methoden create_contact (Standardfelder) und create_person (inkl. Firmenverknüpfung).
      * auth_handler.py: Härtung der Authentifizierung durch Priorisierung von SO_CLIENT_ID und Unterstützung für load_dotenv(override=True).
      * main.py: Erweiterung des Test-Workflows für den vollständigen Lese- und Schreib-Durchstich (Erstellung von Demo-Firmen und Personen).
      * README.md: Aktualisierung des Status Quo und der verfügbaren Client-Methoden.
2026-02-09 19:00:18 +00:00
395251dd9c [2ff88f42] Durchstich geschafft
Durchstich geschafft
2026-02-09 16:05:04 +00:00
938a81fd97 feat(connector-superoffice): implement OAuth 2.0 flow and S2S architecture
Completed POC for SuperOffice integration with the following key achievements:
- Switched from RSA/SOAP to OAuth 2.0 (Refresh Token Flow) for better compatibility with SOD environment.
- Implemented robust token refreshing and caching mechanism in .
- Solved 'Wrong Subdomain' issue by enforcing  for tenant .
- Created  for REST API interaction (Search, Create, Update UDFs).
- Added helper scripts: , , .
- Documented usage and configuration in .
- Updated  configuration requirements.

[2ff88f42]
2026-02-09 16:04:16 +00:00
ff62024ef7 feat(superoffice): POC API handshake & auth flow [2ff88f42]
Establishes the initial structure for the SuperOffice connector. Implements the complete, iterative authentication process, culminating in a successful refresh token exchange. Documents the process and the final blocker (API authorization) in the integration plan, awaiting IT action to change the application type to 'Server to server'.
2026-02-06 13:52:44 +00:00
Jarvis
36cb4bfbae chore: scaffold superoffice connector service for development 2026-02-02 19:42:38 +00:00