@@ -9,7 +9,77 @@ import EntitySchemaViewer from '@site/src/components/EntitySchemaViewer';
99
1010This page provides an overview for epilot's core entity data model with all of the built-in entity schemas, including examples and schema definitions.
1111
12- ## Customer Relations
12+ ## Relationship Diagram
13+
14+ ``` mermaid
15+ graph TB
16+ %% Customer Relations
17+ Account[Account]
18+ Contact[Contact]
19+
20+ %% Sales
21+ Opportunity[Opportunity]
22+ Order[Order]
23+
24+ %% Products
25+ Product[Product]
26+ Price[Price]
27+ Tax[Tax]
28+
29+ %% Contracts & Billing
30+ Contract[Contract]
31+ BillingAccount[Billing Account]
32+ BillingEvent[Billing Event]
33+
34+ %% Metering
35+ Meter[Meter]
36+ MeterCounter[Meter Counter]
37+
38+ %% Sales Flow
39+ Opportunity -->|has many| Order
40+
41+ %% Customer Relations
42+ Contact -->|has many| Opportunity
43+ Contact -->|has many| Order
44+ Contact -->|has one| Account
45+ Contact -->|has many| Contract
46+ Contact -->|has many| Ticket
47+ Contact -->|has many| BillingAccount
48+
49+ Order -->|has many| Product
50+
51+ %% Products
52+ Product -->|has many| Price
53+ Price -->|has one| Tax
54+
55+ %% Contracts & Billing
56+ Contract -->|has one| BillingAccount
57+ Contract -->|has one| Order
58+ Contract -->|has many| Meter
59+
60+ BillingAccount -->|has many| BillingEvent
61+
62+ %% Metering
63+ Meter -->|has many| MeterCounter
64+
65+ style Account fill:#e1f5ff
66+ style Contact fill:#e1f5ff
67+
68+ style Opportunity fill:#fff4e1
69+ style Order fill:#fff4e1
70+
71+ style Product fill:#f0e1ff
72+ style Price fill:#f0e1ff
73+ style Tax fill:#f0e1ff
74+
75+ style Contract fill:#e1ffe1
76+ style BillingAccount fill:#e1ffe1
77+ style BillingEvent fill:#e1ffe1
78+ ```
79+
80+ ## Built-in Entity Schemas
81+
82+ ### Customer Relations
1383
1484<EntitySchemaViewer
1585 schema="contact"
@@ -32,7 +102,13 @@ This page provides an overview for epilot's core entity data model with all of t
32102 apiLink="/api/partner#tag/partner_schema"
33103/>
34104
35- ## Sales
105+ <EntitySchemaViewer
106+ schema="ticket"
107+ displayName="Ticket"
108+ description="Tickets store customer support requests and help desk inquiries."
109+ />
110+
111+ ### Sales
36112
37113<EntitySchemaViewer
38114 schema="opportunity"
@@ -48,7 +124,7 @@ This page provides an overview for epilot's core entity data model with all of t
48124 apiLink="/api/order#tag/order_schema"
49125/>
50126
51- ## Product Hub
127+ ### Product Hub
52128
53129<EntitySchemaViewer
54130 schema="product"
@@ -78,7 +154,7 @@ This page provides an overview for epilot's core entity data model with all of t
78154 apiLink="/api/pricing#tag/coupon_schema"
79155/>
80156
81- ## Contracts & Billing
157+ ### Contracts & Billing
82158
83159<EntitySchemaViewer
84160 schema="contract"
@@ -102,7 +178,7 @@ This page provides an overview for epilot's core entity data model with all of t
102178/>
103179
104180
105- ## Metering
181+ ### Metering
106182
107183<EntitySchemaViewer
108184 schema="meter"
@@ -118,7 +194,7 @@ This page provides an overview for epilot's core entity data model with all of t
118194 apiLink="/api/metering#tag/meter_counter_schema"
119195/>
120196
121- ## Journeys
197+ ### Journeys
122198
123199<EntitySchemaViewer
124200 schema="journey"
@@ -134,7 +210,7 @@ This page provides an overview for epilot's core entity data model with all of t
134210 apiLink="/api/submission#tag/submission_schema"
135211/>
136212
137- ## Messaging
213+ ### Messaging
138214
139215<EntitySchemaViewer
140216 schema="message"
@@ -150,7 +226,27 @@ This page provides an overview for epilot's core entity data model with all of t
150226 apiLink="/api/email-template#tag/email_template_schema"
151227/>
152228
153- ## System
229+ ### Marketing & Analytics
230+
231+ <EntitySchemaViewer
232+ schema="campaign"
233+ displayName="Campaign"
234+ description="Campaigns store marketing campaign information and configurations."
235+ />
236+
237+ <EntitySchemaViewer
238+ schema="target"
239+ displayName="Target"
240+ description="Targets represent goals or milestones for sales and marketing activities."
241+ />
242+
243+ <EntitySchemaViewer
244+ schema="product_recommendation"
245+ displayName="Product Recommendation"
246+ description="Product recommendations suggest products to customers based on their preferences and behavior."
247+ />
248+
249+ ### System
154250
155251<EntitySchemaViewer
156252 schema="file"
@@ -172,29 +268,3 @@ This page provides an overview for epilot's core entity data model with all of t
172268 description="Portal users are users registered to use end customer portals or installer portals."
173269 apiLink="/api/customer-portal#tag/portal_user_schema"
174270/>
175-
176- <EntitySchemaViewer
177- schema="ticket"
178- displayName="Ticket"
179- description="Tickets store customer support requests and help desk inquiries."
180- />
181-
182- ## Marketing & Analytics
183-
184- <EntitySchemaViewer
185- schema="campaign"
186- displayName="Campaign"
187- description="Campaigns store marketing campaign information and configurations."
188- />
189-
190- <EntitySchemaViewer
191- schema="target"
192- displayName="Target"
193- description="Targets represent goals or milestones for sales and marketing activities."
194- />
195-
196- <EntitySchemaViewer
197- schema="product_recommendation"
198- displayName="Product Recommendation"
199- description="Product recommendations suggest products to customers based on their preferences and behavior."
200- />
0 commit comments