Enhance: Address/VAT Sync & Infrastructure Hardening [30e88f42]
- Implemented Address (City) and VAT (OrgNumber) sync back to SuperOffice. - Hardened Infrastructure: Removed Pydantic dependency in config for better Docker compatibility. - Improved SuperOffice Client error logging and handled empty SO_ENVIRONMENT variables. - Updated Matrix Generator: Switched to gemini-2.0-flash, added industry filtering, and robust JSON parsing. - Updated Documentation with session findings and troubleshooting steps.
This commit is contained in:
@@ -107,10 +107,28 @@ Der Connector ist der Bote, der diese Daten in das CRM bringt.
|
||||
2. Sync-Skript laufen lassen: `python3 backend/scripts/sync_notion_industries.py`.
|
||||
3. Matrix neu berechnen: `python3 backend/scripts/generate_matrix.py --live`.
|
||||
|
||||
### Prompt-Tuning
|
||||
Die Prompts für Matrix und Opener liegen in:
|
||||
* Matrix: `backend/scripts/generate_matrix.py`
|
||||
* Opener: `backend/services/classification.py` (oder `enrichment.py`)
|
||||
### End-to-End Tests
|
||||
Ein automatisierter Integrationstest (`tests/test_e2e_flow.py`) deckt den gesamten Zyklus ab:
|
||||
1. **Company Creation:** Webhook -> CE Provisioning -> Write-back (Vertical).
|
||||
2. **Person Creation:** Webhook -> CE Matrix Lookup -> Write-back (Texte).
|
||||
3. **Vertical Change:** Änderung im CRM -> CE Update -> Cascade zu Personen -> Neue Texte.
|
||||
|
||||
Ausführen mittels:
|
||||
```bash
|
||||
python3 connector-superoffice/tests/test_e2e_flow.py
|
||||
```
|
||||
|
||||
## 7. Troubleshooting & Known Issues
|
||||
|
||||
### Authentication "URL has an invalid label"
|
||||
Tritt auf, wenn `SO_ENVIRONMENT` leer ist. Der Client fällt nun automatisch auf `sod` zurück.
|
||||
|
||||
### Pydantic V2 Compatibility
|
||||
Die `config.py` wurde auf natives Python (`os.getenv`) umgestellt, um Konflikte mit `pydantic-settings` in Docker-Containern zu vermeiden.
|
||||
|
||||
### Address & VAT Sync (WIP)
|
||||
Der Worker wurde erweitert, um auch `City` und `OrgNumber` (VAT) zurückzuschreiben.
|
||||
**Status (21.02.2026):** Implementiert, aber noch im Feinschliff. Logs zeigen teils Re-Queueing während das Enrichment läuft.
|
||||
|
||||
## Appendix: The "First Sentence" Prompt
|
||||
|
||||
|
||||
Reference in New Issue
Block a user