diff --git a/app/system/backend/sync_router.py b/app/system/backend/sync_router.py index 2e16835..095dd55 100644 --- a/app/system/backend/sync_router.py +++ b/app/system/backend/sync_router.py @@ -283,6 +283,11 @@ async def sync_vtiger_contacts() -> Dict[str, Any]: # Link contact to customer if account_id exists account_id = contact.get('account_id') + + # Debug: Log first 10 contacts with account_id info + if len(contacts) < 20: # Only log for small batches or first few + logger.info(f"🔍 Debug kontakt: {first_name} {last_name}, account_id={account_id}, contact_id={contact_id if 'contact_id' in locals() else 'N/A'}") + if account_id and contact_id: # Find customer by vTiger account ID customer = execute_query(