Database Schema

15 models · 16 relations

Core
CRM
B2B Shop
Lookup
B2C
Catalog
1-to-many optional FKHover a model to highlight its edges
kamcontacts[]b2bUsers[]b2bEvents[]leads[]activities[]periodSales[]brands[]segments[]activities[]responsibleauthororders[]manager
UserCore
20

Internal CRM users

PKid
cuid
··email
UQString
··name
String
··role
EUserRole
··createdAt
DateTime
AccountLeadActivityB2cOrder
AccountCore
514

B2B customers (companies)

PKid
cuid
··name
String
··country
String
FKkamId
String?
··relationStatus
ERelationStatus
··debtorTpaStatus
ETpaStatus
··soldYtdUsd
Float?
··overdueDays
Int?
··sanctions
Boolean
UserContactB2bUserB2bEventLead+4
ContactCRM
0

People at accounts

PKid
cuid
FKaccountId
String
··firstName
String
··lastName
String
··jobTitle
String?
··isKdm
Boolean
Account
B2bUserB2B Shop
0

B2B shop logins

PKid
cuid
FKaccountId
String
··email
String
··lastLogin
DateTime?
··loginsInPeriod
Int
··ordersCreated
Int
Account
B2bEventB2B Shop
0

Intent signals from shop

PKid
cuid
FKaccountId
String
··type
EB2bEventType
··productSku
String?
··category
String?
··occurredAt
DateTime
Account
LeadCRM
0

B2B sales opportunities

PKid
cuid
FKaccountId
String
··name
String
··status
ELeadStatus
··level
ELeadLevel
··budgetUsd
Float?
FKresponsibleId
String?
AccountActivityUser
ActivityCRM
0

Timeline: calls, meetings…

PKid
cuid
FKaccountId
String
FKleadId
String?
FKauthorId
String?
··type
EActivityType
··subject
String
··nextAction
String?
AccountLeadUser
PeriodSalesCRM
514

Quarterly revenue cache

PKid
cuid
FKaccountId
String
··year
Int
··quarter
Int
··soldUsd
Float
··gmPct
Float
Account
BrandLookup
1

Product brands

PKid
cuid
··name
UQString
AccountBrand
AccountBrandLookup
514

Account ↔ Brand junction

PKaccountId
String
PKbrandId
String
··toSell
Boolean
AccountBrand
TargetGroupLookup
0

Customer segments

PKid
cuid
··name
UQString
··isAuto
Boolean
AccountTargetGroup
AccountTargetGroupLookup
0

Account ↔ Segment junction

PKaccountId
String
PKtargetGroupId
String
AccountTargetGroup
ConsumerB2C
30

B2C end customers

PKid
cuid
··firstName
String
··lastName
String
··phone
String?
··country
String
B2cOrder
B2cOrderB2C
45

B2C sales orders

PKid
cuid
FKconsumerId
String
··stage
EB2cStage
··productName
String?
··budgetUsd
Float?
FKmanagerId
String?
··paymentPaid
Boolean
ConsumerUser
ProductCatalog
593

Product catalog

PKid
cuid
··sku
UQString
··name
String
··brand
String
··category
String
··priceUsd
Float?