Skip to content

IAV-959/refactor(entity): Consolidate CustomerCareAgent integration fields into typed enumerations

salaheddine zidani a demandé de fusionner feature/IAV-959 vers develop

🎯 Objective

Refactor CustomerCareAgent entity to improve integration management scalability and maintainability by replacing individual credential source fields with consolidated typed enumerations.


📊 Changes Overview

Architecture Improvement

This refactoring consolidates 8 disparate integration fields into 3 typed collections, providing:

  • Better scalability (add new channels without schema changes)
  • Improved type safety with dedicated enumerations
  • Cleaner entity design with reduced field proliferation
  • Support for multiple channels simultaneously (Set prevents duplicates)

Field Mapping

Old Approach New Approach
whatsappCredentialSource
instagramCredentialSource communicationChannels
facebookMessengerCredentialSource (Set)
telegramCredentialSource
shopifyCredentialSource
wooCommerceCredentialSource ecommercePlatform (EcommercePlatformType)
freshdeskCredentialSource
iaviaTicketingEnabled ticketingSystem (TicketingSystemType)

New Features

  • Multi-channel support: Agents can now handle multiple communication channels simultaneously
  • Validation: Enforces at least one communication channel via @Size(min=1)
  • Fake credentials: New fakeCredentials relationship for n8n workflow placeholder credentials
    • Internal use only: Not exposed to clients
    • Purpose: Prevent n8n workflow errors when real credentials are unnecessary
    • Scope: Used exclusively in backend workflow integration layer
  • Duplicate prevention: Using Set for communicationChannels

🔗 Related Issues

Closes IAV-959

Rapports de requête de fusion