Skip to main content

Communication: hbf-lcm

1-hop view of how this service communicates with its siblings. For the full system view, see service-communication.md.

Calls Out To

ServiceProtocolPurposeKey calls / queues
hbf-coreHTTP BearerUser auth, org/tenant lookups, user groups, tags, contacts, chat sessions, translations, audit logs20+ methods via CoreClientService
hbf-lcgHTTP POSTLivechat lifecycle eventsMESSAGE, CONVERSATION_BEGIN, CONVERSATION_END, CONVERSATION_TYPING, TRANSFER_REQUEST, REQUEST_MISSED via BotClientService -> HBF_BOT_EVENT_URL -> POST /events/helvia-livechat (LCG forwards to hbf-bot)
hbf-event-publisherHTTP POSTFlow triggerslivechat-request-missed, livechat-conversation-finished via PublisherClientService -> HBF_EVENT_PUBLISHER_URL
MS TeamsOAuth + Bot FrameworkToken exchange, bot callbacksOAuth token exchange, Bot Framework activity callbacks
TwilioHTTPVideo call supportToken generation, room management
S3/MinIOHTTPFile attachment storageSigned URL generation

Called By

ServiceProtocolHow
hbf-botHTTP POSTPOST /livechat-requests, POST /organizations/:orgId/livechat-messages, GET requests
hbf-lcgHTTP POSTPOST /livechat-requests (upstream livechat from Helvia, Genesys, Cisco, Zendesk)
hbf-consoleSocket.IOMessage and event channels for agent connections
hbf-coreHTTP DELETEDELETE /organizations/{orgId}/data, DELETE /organizations/:orgId/data-retention (cascade deletion)

Contracts

Inbound

HTTP (REST)

  • POST /livechat-requests -- create request (LCM token)
  • GET /users/:userId/livechat-requests -- query user requests (LCM token)
  • GET /organizations/:orgId/livechat-requests -- query org requests (LCM token)
  • POST /organizations/:orgId/livechat-messages -- post message (LCM token)
  • GET /agent/organizations/:orgId/livechat-conversations -- list conversations (HBF token)
  • GET /organizations/:orgId/livechat-conversations/:id -- conversation detail
  • GET /organizations/:orgId/livechat-messages -- get messages (CSV/PDF export)
  • POST /livechat-attachments -- upload attachment
  • GET /organizations/:orgId/livechat-settings -- get settings
  • PUT /organizations/:orgId/livechat-settings -- update settings
  • GET, POST, PATCH, DELETE /organizations/:organizationId/user-groups/:userGroupId/business-hours -- business hours CRUD
  • DELETE /organizations/:orgId/data-retention -- purge data (LCM token)

Socket.IO (browser-facing, hbf-console agents)

Inbound from agents:

  • connection -- JWT auth
  • message -- text/system message
  • event -- REQUEST_CREATE, REQUEST_ACCEPT, CONVERSATION_JOIN, CONVERSATION_END, CONVERSATION_TYPING, CONVERSATION_READ, PARTICIPANT_FLAG, CONVERSATION_LEAVE

Outbound to agents:

  • message -- broadcast
  • event -- AUTHORIZATION_GRANTED, REQUEST_CREATE_ACK, NOTIFICATION, ERROR

Outbound

  • hbf-lcg: POST {HBF_BOT_EVENT_URL} (value: http://hbf-lcg:<port>/events/helvia-livechat) -- { type: "MESSAGE"|"CONVERSATION_BEGIN"|"CONVERSATION_END"|"CONVERSATION_TYPING"|"TRANSFER_REQUEST"|"REQUEST_MISSED", data: CallbackEvent } (LCG transforms and forwards to hbf-bot via POST /livechat-events)
  • hbf-event-publisher: POST /connectors/flows:trigger?triggerType=<type>&organizationId=<id>&tenantId=<id> -- event payload

Env vars:

  • HBF_CORE_URL -> hbf-core
  • HBF_BOT_EVENT_URL -> hbf-lcg (/events/helvia-livechat)
  • HBF_EVENT_PUBLISHER_URL -> hbf-event-publisher
  • REDIS_URL -> Redis (Socket.IO adapter)

Flows Involving This Service