Skip to main content

Data Model: hbf-core

Domain objects owned by this service (source of truth). Java/Spring Boot application backed by MongoDB.

Objects This Service Owns

hbf-core is the central data store. It owns all MongoDB collections and exposes them via REST API. Other services access these objects through the hbf-core HTTP API (often via the hbf-core-api client library).

ObjectCollection/ResourceKey Fields
Organizationorganizationsid, displayName, image, timezone, dataRetentionPeriod, auditLogsRetentionPeriod
Tenanttenantsid, handle, displayName, organizationId, settings, systemSettings, plugins, contentCompiled, tenantStats, dataRetentionPeriod
Userusersid, email, fullName, isModerator, tenantRoles, organizationRoles, effectiveRoles
UserGroupuser-groupsid, name, description, organizationId, users, tenantRoles, organizationRoles
ChatSessionchat-sessionsid, status, messages, subscriberHandle, tenantId, tags, duration, messageCount, lastInteraction
Subscribersubscribershandle, tenantId, contact info
BotDeploymentbot-deploymentsid, tenantId, organizationId, settings
BotContentbot-contentsid, contentCompiled, activities
Activityactivities (nested)id, type, tenantId
Broadcastbroadcastsid, tenantId, platform, status, groups
Responseresponsesid, broadcastId, subscriberHandle, status
Surveysurveysid, tenantId, organizationId, type, sections
NLPPipelinenlp-pipelinesid, tenantId, status, failedReason
KnowledgeBaseknowledge-basesid, tenantId, organizationId
KnowledgeBaseArticleknowledge-base-articles (nested)id, title, body, group, tags
ArticleMetadata(embedded in KnowledgeBaseArticle)Polymorphic via Jackson @JsonTypeInfo on type field. Lives in domain/ArticleMetadata.kt. Currently: SharePointArticleMetadata (managedMetadata: ManagedMetadataEntry[]?, permissions: SharePointPermissions?)
Integrationintegrationsid, type, enabled, category
MissedQuestionmissed-questionsid, organizationId
MessagingAppmessaging-appsid, tenantId
Groupgroupsid, tenantId
HandoverLinkhandoverid, tenantId, status
AuditLogaudit-logsid, organizationId, description, category
TestSettest-setsid, tenantId, organizationId
Analyticsanalyticssummary, liveChat, automatedAnswers, interviews, decisionTrees, userFeedback, missedQuestions, CSAT
Tagtagslabel, scope
Contactcontactsid, subscriberHandle
Ticketticketingid

Undocumented Collections

The following 15 collections exist in code but are not yet fully documented above:

api-tokens, automated-tests, automated-test-results, bot-contents-compiled, bot-templates, csat-sections, fb-handovers, jobs, knowledge-base-articles, knowledge-base-groups, missed-questions-occurrences, nlp-pipeline-trees, tenant-backups, tenant-stats, user-invitations

Notes

  • hbf-core is a Java (Maven/Spring Boot) application, not Node.js.
  • All other services treat hbf-core as the single source of truth for these objects.
  • The REST API supports pagination, filtering, and includes (e.g., includeMessages, includeSettings, includePlugins).
  • MongoDB with replica set support. Liquibase manages schema migrations.
  • ArticleMetadata was extracted to its own file (domain/ArticleMetadata.kt) with Jackson polymorphic deserialization (@JsonTypeInfo/@JsonSubTypes). Custom MongoDB converters (ArticleMetadataReadingConverter, ArticleMetadataWritingConverter) handle BSON round-tripping, registered in MongoConfig.java.