Add sync strategy documentation and templates for bidirectional sync between EspoCRM and Advoware

- Introduced SYNC_STRATEGY_ARCHIVE.md detailing the sync process, status values, and flow for updating entities from EspoCRM to Advoware and vice versa.
- Created SYNC_TEMPLATE.md as a guide for implementing new syncs, including field definitions, mapper examples, sync utilities, event handlers, and cron jobs.
- Added README_SYNC.md for the Beteiligte sync event handler, outlining its functionality, event subscriptions, optimizations, error handling, and performance metrics.
This commit is contained in:
2026-02-07 15:54:13 +00:00
parent 8550107b89
commit ae1d96f767
12 changed files with 1162 additions and 1069 deletions

View File

@@ -46,16 +46,35 @@
- [calendar_sync_all_step.md](../steps/advoware_cal_sync/calendar_sync_all_step.md) - Employee cascade
- [calendar_sync_event_step.md](../steps/advoware_cal_sync/calendar_sync_event_step.md) - Per-employee sync (complex)
**VMH Webhooks** ([Module README](../steps/vmh/README.md)):
- [beteiligte_create_api_step.md](../steps/vmh/webhook/beteiligte_create_api_step.md) - Create webhook
**VMH Webhooks & Sync** ([Module README](../steps/vmh/README.md)):
- **Beteiligte Sync** (Bidirectional EspoCRM ↔ Advoware)
- [BETEILIGTE_SYNC.md](BETEILIGTE_SYNC.md) - Complete documentation
- [README_SYNC.md](../steps/vmh/README_SYNC.md) - Event handler docs
- [beteiligte_sync_event_step.py](../steps/vmh/beteiligte_sync_event_step.py) - Event handler
- [beteiligte_sync_cron_step.py](../steps/vmh/beteiligte_sync_cron_step.py) - Cron job
- **Webhooks**
- [beteiligte_create_api_step.md](../steps/vmh/webhook/beteiligte_create_api_step.md) - Create webhook
- [beteiligte_update_api_step.md](../steps/vmh/webhook/beteiligte_update_api_step.md) - Update webhook (similar)
- [beteiligte_delete_api_step.md](../steps/vmh/webhook/beteiligte_delete_api_step.md) - Delete webhook (similar)
- [beteiligte_sync_event_step.md](../steps/vmh/beteiligte_sync_event_step.md) - Sync handler (placeholder)
### Services
- [Advoware Service](../services/ADVOWARE_SERVICE.md) - API Client mit HMAC-512 Auth
- [Advoware API Swagger](advoware/advoware_api_swagger.json) - Vollständige API-Dokumentation (JSON)
- **Advoware Service** ([ADVOWARE_SERVICE.md](../services/ADVOWARE_SERVICE.md)) - API Client mit HMAC-512 Auth
- **Advoware API Swagger** ([advoware_api_swagger.json](advoware/advoware_api_swagger.json)) - Vollständige API-Dokumentation
- **EspoCRM Service** ([espocrm.py](../services/espocrm.py)) - EspoCRM API Client mit X-Api-Key Auth
- **Sync Services**
- [beteiligte_sync_utils.py](../services/beteiligte_sync_utils.py) - Sync utilities (lock, timestamp, merge)
- [espocrm_mapper.py](../services/espocrm_mapper.py) - Entity mapping EspoCRM ↔ Advoware
### Sync Documentation
- **[BETEILIGTE_SYNC.md](BETEILIGTE_SYNC.md)** - Complete sync documentation
- Architecture, data flow, troubleshooting
- **[SYNC_TEMPLATE.md](SYNC_TEMPLATE.md)** - Template für neue Advoware-Syncs
- Best practices, code templates, architecture principles
- **[ENTITY_MAPPING_CBeteiligte_Advoware.md](ENTITY_MAPPING_CBeteiligte_Advoware.md)** - Field mapping details
- **[SYNC_STRATEGY_ARCHIVE.md](SYNC_STRATEGY_ARCHIVE.md)** - Original strategy analysis (archived)
### Utility Scripts
@@ -77,15 +96,21 @@ docs/
├── DEVELOPMENT.md # Development guide
├── GOOGLE_SETUP.md # Google Calendar setup
├── TROUBLESHOOTING.md # Debugging guide
├── BETEILIGTE_SYNC.md # ⭐ Beteiligte sync docs
├── SYNC_TEMPLATE.md # ⭐ Template for new syncs
├── ENTITY_MAPPING_CBeteiligte_Advoware.md # Field mappings
└── advoware/
└── advoware_api_swagger.json # Advoware API spec
steps/{module}/
├── README.md # Module overview
├── README_SYNC.md # ⭐ Sync handler docs (VMH)
└── {step_name}.md # Step documentation
services/
── {service_name}.md # Service documentation
── {service_name}.md # Service documentation
├── beteiligte_sync_utils.py # ⭐ Sync utilities
└── espocrm_mapper.py # ⭐ Entity mapper
scripts/{category}/
├── README.md # Script documentation