IAV-1141/feat: Freshdesk integration — credential mapping, validation & ticketing auto-switch
Summary
Completes the Freshdesk integration lifecycle and adds a new agent-level ticketing query endpoint.
Changes
Credential Mapping
Freshdesk credentials (apiKey + domain) are now mapped to N8N's httpBasicAuth format (user / password). The FRESHDESK_API_KEY constant was corrected from "freshdeskApi" to "httpBasicAuth".
Fake Credential Generation
FRESHDESK and INSTAGRAM_HEADER_AUTH now use dedicated hardcoded fake generators, bypassing the N8N schema fetch. This fixes a silent bug where schema-fetched field names were incompatible with their respective mapToN8nFormat() mappers.
Ticketing Auto-Switch
When a Freshdesk integration is successfully created, agent.ticketingSystem is automatically set to FRESHDESK.
New Endpoints
-
GET /agents/{agentUid}/ticketing-system— query ticketing provider by agent UID -
GET /validate-freshdesk— validate Freshdesk credentials against N8N
Testing checklist
-
Create Freshdesk integration → verify ticketingSystemset toFRESHDESK -
Verify Freshdesk fake credential created in N8N with type httpBasicAuth -
GET /{agentUid}/ticketing-systemreturns correct type -
GET /validate-freshdeskpasses and fails appropriately -
Existing integrations (WhatsApp, Instagram, WooCommerce, Telegram) unaffected -
Delete Freshdesk integration → agent reverts to IAVIAticketing