Skip to main content

Organization

Top-level container for all resources. Defines the multi-tenant boundary, login settings, and external identity mappings. Collection: organizations | DB: MongoDB Source: hbf-core/src/main/java/gr/helvia/hbf/core/domain/Organization.kt TypeScript: hbf-core-api/src/datamodel/organization.ts

Fields

FieldTypeRequiredIndexedNotes
idStringyesPKMongoDB document ID
displayNameStringyesOrganization name
imageStringnoLogo URL
timezoneStringnoDefault: "UTC"
auditLogsNotificationEmailStringnoEmail for audit notifications
auditLogsNotificationsEnabledBooleanno
externalOrganizationsList<ExternalEntity>noMS Teams org mappings
externalAnalyticsList<ExternalAnalytics>no
dataRetentionPeriodIntnoIn days
auditLogsRetentionPeriodIntnoIn days
loginSettingsLoginSettingsnoWith defaults
createdAtDateyes@CreatedDate
updatedAtDateyes@LastModifiedDate

Nested Objects

LoginSettings

FieldTypeNotes
isOrganizationNameVisibleBoolean
isOrganizationLogoVisibleBoolean
isCustomMessageVisibleBoolean
customMessageString
isCredentialLoginVisibleBoolean
isGoogleLoginVisibleBoolean
isMicrosoftLoginVisibleBoolean
isSkipNativeLoginEnabledBoolean
failedAuthenticationRedirectUrlString
integrationsList<Integration>@DBRef lazy, read-only. Auth integrations
pluginsList<IntegrationPlugin>Private, computed
isAutoUserCreationEnabledBoolean@PrivateProperty
defaultAutoCreationRoleOrganizationRole@PrivateProperty
suppressWelcomeEmailBoolean@PrivateProperty
isPostAuthenticationEnabledBoolean@PrivateProperty
postAuthenticationRequestUrlString@PrivateProperty
postAuthenticationRequestHeadersMap<String, String>@PrivateProperty
roleMapMap<String, OrganizationRole>@PrivateProperty, maps external claims to roles
pluginRefsList<String>@Transient, @WriteOnly

ExternalEntity (polymorphic)

Base fields:

FieldTypeNotes
idString
createdAtDate

Subtypes:

  • NoneType - no additional fields
  • MsTeamsChannel - channelId, azureTenantId, aadGroupId
  • MsTeamsOrganization - azureTenantId
  • MsTeamsUser - aadObjectId

Enums

OrganizationRole

ValueDescription
HBF_ORG_ADMINOrganization administrator
HBF_ORG_EDITOROrganization editor
HBF_ORG_VIEWEROrganization viewer (read-only)
HBF_ORG_LIVE_AGENTLive chat agent
HRWIZ_EMPLOYEEHR Wizard employee
HBF_ORG_LIVECHAT_ADMINLive chat administrator

Relationships

  • Contains: User (1..), Tenant (1..), AuditLog (0..), ApiToken (0..), KnowledgeBase (0..), Integration (0..), Tag (0..), UserInvitation (0..)
  • Configures: LoginSettings with Integration plugins

TypeScript Mapping

hbf-core (Kotlin)hbf-core-api (TypeScript)Notes
OrganizationOrganizationTS has analytics, users, externalId. Missing loginSettings, auditLogs*, externalOrganizations
LoginSettings(not exported)Gap: not in hbf-core-api types
ExternalEntityExternalChannel + MSTeamsExternalChannelDifferent naming. In userGroup.ts
OrganizationRoleOrganizationRoleAligned