Skip to main content

Communication: hbf-session-manager

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 via hbf-core-api SDK + direct HTTPTenant list, chat session lookup, batch status updates, NLP pipeline queriesMultiple SDK clients + direct HTTP
hbf-event-publisherHTTP POSTFlow triggers on session/survey completionPOST /connectors/flows:trigger (chat-session-completed, survey-completed)
hbf-nlpHTTP POSTLLM summarization of completed sessionsPOST /organizations/:orgId/tenants/:tenantId/sessions/:chatSessionId/analyze
Customer webhooksHTTP POSTCompleted session payloads to registered URLsPOST to registered webhook URLs with custom headers
SMTPnodemailerError notification emailsError alerts via configured SMTP

Called By

ServiceProtocolHow
Admin/moderator APIRESTCRUD for webhook integrations

Scheduled Jobs (Cron)

JobIntervalPurpose
Chat session expiry checkCHAT_SESSION_CHECK_INTERVAL_IN_MINSFinds inactive sessions, marks COMPLETED, triggers event-publisher, dispatches webhooks, initiates LLM summarization
NLP pipeline auto-train checkNLP_PIPELINE_CHECK_INTERVAL_IN_MINSTriggers training for out-of-date pipelines

Contracts

Inbound

  • POST /organizations/:orgId/integrations/ -- create webhook integration
  • GET /organizations/:orgId/integrations/ -- list integrations
  • GET /organizations/:orgId/integrations/:id -- get integration
  • PUT /organizations/:orgId/integrations/:id -- update integration
  • DELETE /organizations/:orgId/integrations/:id -- delete integration
  • GET /organizations/:orgId/integrations/errors/:id -- list webhook errors

Outbound

  • Customer webhook: POST {webhookUrl} -- ChatSessionDTO with messages, tenant, participants, contacts. Custom headers per integration.
  • hbf-event-publisher: POST /connectors/flows:trigger?triggerType=chat-session-completed|survey-completed&organizationId=<id>&tenantId=<id> -- session/survey DTO
  • hbf-nlp: POST /organizations/:orgId/tenants/:tenantId/sessions/:sessionId/analyze -- Bearer token
  • hbf-core: GET /nlp-pipelines/:id (poll training status), POST hbf-nlp /nlp-pipelines/:id/train

Env vars:

  • CORE_URL -> hbf-core
  • CORE_TOKEN -> hbf-core
  • EVENT_PUBLISHER_URL -> hbf-event-publisher
  • NLP_URL -> hbf-nlp

Flows Involving This Service