Tenant
A single chatbot instance within an Organization. Contains all bot content, settings, deployment config, and NLP mappings. Collection:
tenants| DB: MongoDB Source:hbf-core/src/main/java/gr/helvia/hbf/core/domain/Tenant.ktTypeScript:hbf-core-api/src/datamodel/tenant.ts
Fields
| Field | Type | Required | Indexed | Notes |
|---|---|---|---|---|
id | String | yes | PK | MongoDB document ID |
displayName | String | no | Friendly name | |
description | String | no | ||
settings | TenantSettings | yes | User-editable settings | |
systemSettings | TenantSystemSettings | yes | Moderator-level settings | |
image | String | no | Image URL | |
timezone | String | no | Default: "UTC" | |
story | com.mongodb.DBRef | no | Deprecated | |
content | BotContent | no | @DBRef lazy | |
contentCompiled | BotContentCompiled | no | @DBRef lazy | |
organization | Organization | no | @DBRef lazy | |
tenantStats | TenantStats | no | @DBRef lazy | |
nluSync | Boolean | no | Default: false | |
nluCachingEnabled | Boolean | no | Default: false | |
nlpMap | HashMap<String, String> | no | Language code to NLPPipeline ID | |
nlpTrees | List<NLPPipelineTreeData> | no | @DBRef lazy | |
createdAt | Date | yes | yes | @CreatedDate |
updatedAt | Date | yes | @LastModifiedDate | |
lastModifiedBy | HashMap<String, String?> | no | Audit info (id, email, name, type) | |
dataRetentionPeriod | Int | no | In days | |
tags | List<String> | no | Default empty list | |
powerups | List<Powerup> | yes | Enabled feature flags | |
componentTree | BasicDBObject | no | UI component tree | |
disabled | Boolean | no | Bot is disabled | |
integrations | List<Integration> | no | @DBRef lazy, default empty | |
pluginSettings | Map<String, PluginSettings?> | no | Per-plugin config | |
sourceTemplateId | String | no | Template this tenant was created from | |
space | Space | yes | BOT_LAB, CX, or EX | |
plugins | List<IntegrationPlugin> | no | Computed from integrations, private |
Nested Objects
TenantSettings
User-editable settings.
| Field | Type | Notes |
|---|---|---|
autoTrain | Boolean | Auto-train NLP on content changes |
session | SessionSettings | Session expiration config |
monitoring | MonitoringSettings | |
externalAnalytics | ExternalAnalytics | |
privacy | PrivacySettings | Input censoring, anonymization |
languages | LanguageSettings | Primary + additional languages |
feedback | FeedbackSettings | |
nluLocal | LocalNluSettings | Local NLU settings |
nlp | NLPSettings | Fallback NLP flow |
SessionSettings
| Field | Type | Notes |
|---|---|---|
expireInactiveSessionAfter | Int | In minutes (hbf-core) or seconds (hbf-core-api). Min 0 |
LanguageSettings
| Field | Type | Notes |
|---|---|---|
primary | LanguageCode | Primary bot language |
additional | List<LanguageCode> | Additional supported languages |
LocalNluSettings
| Field | Type | Notes |
|---|---|---|
intents | Map<String, List<String>> | Intent name to example phrases |
similarityAlgorithm | TextSimilarityAlgorithm | LEVENSHTEIN or JARO_WINKLER |
similarityThreshold | Double |
PrivacySettings
| Field | Type | Notes |
|---|---|---|
censorUserInput | Boolean | |
maskExpressions | List<MaskExpression> | |
anonymizationSettings | AnonymizationSettings |
MaskExpression
| Field | Type | Notes |
|---|---|---|
name | String | @NotNull |
regex | String | @NotNull, regex pattern |
substitute | String | 1-15 chars, no $ signs |
AnonymizationSettings
| Field | Type | Notes |
|---|---|---|
namedEntities | List<AnonymizationNamedEntity> | |
regexEntities | List<AnonymizationRegexEntity> | |
defaultReplacement | String | |
serviceConfiguration | AnonymizationServiceConfiguration |
AnonymizationNamedEntity
| Field | Type | Notes |
|---|---|---|
name | String | |
type | AnonymizationNamedEntityType | See enum below |
replacement | String |
AnonymizationRegexEntity
| Field | Type | Notes |
|---|---|---|
name | String | |
pattern | String | Regex |
replacement | String |
MonitoringSettings
| Field | Type | Notes |
|---|---|---|
enabled | Boolean | Read-only |
monitorId | String | Internal |
alertEmail | String |
NLPSettings
| Field | Type | Notes |
|---|---|---|
fallbackNlpFlowId | String |
TenantSystemSettings
Moderator-level settings.
| Field | Type | Notes |
|---|---|---|
convManager | ConversationManagerSettings | |
languageDetection | LanguageDetectionSettings | |
nlg | NlgSettings | |
liveChat | LiveChatSystemSettings | |
microsoftDataverse | Map<String, Any> | |
microsoftSharepoint | Map<String, Any> | |
dialogFlowDirect | DialogFlowDirectSettings | |
maxNumOfUserMessages | Int | |
maxNumOfSessions | Int | |
nlpService | NLPService | HBF_CORE or HBF_NLP (default: HBF_CORE) |
useAutomatedAnswerTags | Boolean | Default: true |
readOnly | Boolean | Tenant cannot compile/edit |
isAgent | Boolean | Default: false |
nlpServiceUrl | String | |
nlpPipelineId | String | |
nlpAccessToken | String |
ConversationManagerSettings
| Field | Type | Notes |
|---|---|---|
url | String | |
defaultFallbackOutputContexts | Map<String, ContextFull> |
ContextFull
| Field | Type | Notes |
|---|---|---|
lifespan | Int | In messages |
duration | Int | In seconds |
commands | String |
LanguageDetectionSettings
| Field | Type | Notes |
|---|---|---|
enabled | Boolean | Default: false |
defaultLanguage | LanguageCode | @NotNull |
googleTranslateProjectId | String | @NotNull |
googleTranslateKey | String | @NotNull |
confidenceThreshold | Double | @NotNull |
NlgSettings
| Field | Type | Notes |
|---|---|---|
language | String |
DialogFlowDirectSettings
| Field | Type | Notes |
|---|---|---|
projectId | String | @NotNull |
privateKey | String | @NotNull |
clientEmail | String | @NotNull |
language | String | @NotNull |
LiveChatSystemSettings
| Field | Type | Notes |
|---|---|---|
type | LivechatType | SOURCE or TARGET |
sourceSettings | LivechatSourceSettings | |
targetSettings | LivechatTargetSettings |
LivechatSourceSettings
| Field | Type | Notes |
|---|---|---|
manager | LiveChatSourceManager |
LiveChatSourceManager
| Field | Type | Notes |
|---|---|---|
targetTenantHandle | String | |
specialCommandConvNodeIds | List<String> |
LivechatTargetSettings
| Field | Type | Notes |
|---|---|---|
manager | LiveChatTargetManager | |
requestBuilder | LivechatRequestBuilderSettings |
LiveChatTargetManager
| Field | Type | Notes |
|---|---|---|
specialCommandConvNodeIds | List<String> | |
itcPrefixType | ItcPrefixType | |
transcriptTextures | LivechatTranscriptTextures | |
transferTextures | LivechatTransferRequestTextures |
Enums
Powerup
| Value | Description |
|---|---|
HRWIZ | HR Wizard feature |
FAQS | FAQ management |
BROADCASTS | Broadcast messaging |
FLOWS | Decision tree flows |
LIVECHAT | Live chat support |
SURVEYS | Survey collection |
INTERVIEWS | Interview flows |
CHAT_SESSIONS | Chat session tracking |
SENTIMENT_ANALYSIS | Sentiment analysis |
ANALYTICS | Analytics dashboard |
SETTINGS | Settings management |
BACKUPS | Backup/restore |
INTEGRATIONS | External integrations |
BILLING | Billing management |
MONITORING | Bot monitoring |
NLU_CACHING | NLU response caching |
CONNECTORS | Connector plugins |
Space
| Value | Description |
|---|---|
BOT_LAB | Development/lab workspace |
CX | Customer Experience |
EX | Employee Experience |
NLPService
| Value | Description |
|---|---|
HBF_CORE | Built-in NLP service |
HBF_NLP | External Helvia NLP service |
TextSimilarityAlgorithm
| Value | Description |
|---|---|
LEVENSHTEIN | Levenshtein distance |
JARO_WINKLER | Jaro-Winkler similarity |
AnonymizationNamedEntityType
| Value |
|---|
PERSON |
GPE |
NORP |
FAC |
ORG |
LOC |
PRODUCT |
EVENT |
WORK_OF_ART |
LAW |
LANGUAGE |
DATE |
TIME |
PERCENT |
MONEY |
QUANTITY |
ORDINAL |
CARDINAL |
Relationships
- Belongs to: Organization (via @DBRef)
- Owns: BotContent, BotContentCompiled, TenantStats (via @DBRef)
- Contains: Subscriber, ChatSession, Group, BotDeployment, Broadcast, Survey, TestSet
- References: NLPPipeline (via nlpMap), Integration (via integrations list)
TypeScript Mapping
| hbf-core (Kotlin) | hbf-core-api (TypeScript) | Notes |
|---|---|---|
| Tenant | Tenant | Aligned. TS adds organizationId, customerId, subscriptionPlan, nluAgents, nlpTreeMap |
| TenantSettings | TenantSettings | Aligned. TS has deprecated liveChat, nlu fields |
| TenantSystemSettings | TenantSystemSettings | Aligned. TS omits liveChat, readOnly |
| Powerup | Powerup | Aligned. TS omits SENTIMENT_ANALYSIS, NLU_CACHING |
| Space | (not in TS) | Gap: Space enum not exported in hbf-core-api |
| LiveChatSystemSettings | (not in TS) | Gap: LiveChat system settings not in TS types |
| PluginSettings | (not directly) | TS uses Plugin<S> generic with settings |