|
| 1 | +--- |
| 2 | +sidebar_position: 1 |
| 3 | +title: Core Entities |
| 4 | +--- |
| 5 | + |
| 6 | +import EntitySchemaViewer from '@site/src/components/EntitySchemaViewer'; |
| 7 | + |
| 8 | +# Core Entities |
| 9 | + |
| 10 | +This page provides comprehensive documentation for epilot's core entity data models. Each entity includes a description, interactive example viewer, and the full JSON Schema definition. |
| 11 | + |
| 12 | +## Customer Relations |
| 13 | + |
| 14 | +<EntitySchemaViewer |
| 15 | + schema="contact" |
| 16 | + displayName="Contact" |
| 17 | + description="Contacts store details about customers or individuals managed by the epilot organization." |
| 18 | + apiLink="/api/customer#tag/contact_schema" |
| 19 | +/> |
| 20 | + |
| 21 | +<EntitySchemaViewer |
| 22 | + schema="account" |
| 23 | + displayName="Account" |
| 24 | + description="Accounts store details about companies. Contacts can be linked to an account to represent a business customer." |
| 25 | + apiLink="/api/customer#tag/account_schema" |
| 26 | +/> |
| 27 | + |
| 28 | +<EntitySchemaViewer |
| 29 | + schema="partner" |
| 30 | + displayName="Partner" |
| 31 | + description="Partners store details about collaborating third parties, such as installation partners, OEMs and other business partners." |
| 32 | + apiLink="/api/partner#tag/partner_schema" |
| 33 | +/> |
| 34 | + |
| 35 | +## Sales |
| 36 | + |
| 37 | +<EntitySchemaViewer |
| 38 | + schema="opportunity" |
| 39 | + displayName="Opportunity" |
| 40 | + description="Opportunities store details about sales leads or product inquiries usually made through journeys." |
| 41 | + apiLink="/api/opportunity#tag/opportunity_schema" |
| 42 | +/> |
| 43 | + |
| 44 | +<EntitySchemaViewer |
| 45 | + schema="order" |
| 46 | + displayName="Order" |
| 47 | + description="Orders store details about requested products, pricing and past orders placed by customers." |
| 48 | + apiLink="/api/order#tag/order_schema" |
| 49 | +/> |
| 50 | + |
| 51 | +## Product Hub |
| 52 | + |
| 53 | +<EntitySchemaViewer |
| 54 | + schema="product" |
| 55 | + displayName="Product" |
| 56 | + description="Products represent services or products sold by the epilot organization." |
| 57 | + apiLink="/api/product#tag/product_schema" |
| 58 | +/> |
| 59 | + |
| 60 | +<EntitySchemaViewer |
| 61 | + schema="price" |
| 62 | + displayName="Price" |
| 63 | + description="Prices configure the pricing models for products." |
| 64 | + apiLink="/api/product#tag/price_schema" |
| 65 | +/> |
| 66 | + |
| 67 | +<EntitySchemaViewer |
| 68 | + schema="tax" |
| 69 | + displayName="Tax" |
| 70 | + description="Taxes represent the tax rates applied to prices." |
| 71 | + apiLink="/api/product#tag/tax_schema" |
| 72 | +/> |
| 73 | + |
| 74 | +<EntitySchemaViewer |
| 75 | + schema="coupon" |
| 76 | + displayName="Coupon" |
| 77 | + description="Coupons represent discounts or promotions that can be applied to products." |
| 78 | + apiLink="/api/pricing#tag/coupon_schema" |
| 79 | +/> |
| 80 | + |
| 81 | +## Contracts & Billing |
| 82 | + |
| 83 | +<EntitySchemaViewer |
| 84 | + schema="contract" |
| 85 | + displayName="Contract" |
| 86 | + description="Contracts store details about service agreements, tariffs and other agreements between customers and the epilot organization." |
| 87 | + apiLink="/api/billing#tag/contract_schema" |
| 88 | +/> |
| 89 | + |
| 90 | +<EntitySchemaViewer |
| 91 | + schema="billing_account" |
| 92 | + displayName="Billing Account" |
| 93 | + description="Billing accounts store billing information and payment details for customers." |
| 94 | + apiLink="/api/billing#tag/billing_account_schema" |
| 95 | +/> |
| 96 | + |
| 97 | +<EntitySchemaViewer |
| 98 | + schema="billing_event" |
| 99 | + displayName="Billing Event" |
| 100 | + description="Billing events store records of financial transactions, including payments, invoices, and credit notes." |
| 101 | + apiLink="/api/billing#tag/billing_event_schema" |
| 102 | +/> |
| 103 | + |
| 104 | + |
| 105 | +## Metering |
| 106 | + |
| 107 | +<EntitySchemaViewer |
| 108 | + schema="meter" |
| 109 | + displayName="Meter" |
| 110 | + description="Meters store details about power, gas or water or other devices used to meter consumption." |
| 111 | + apiLink="/api/metering#tag/meter_schema" |
| 112 | +/> |
| 113 | + |
| 114 | +<EntitySchemaViewer |
| 115 | + schema="meter_counter" |
| 116 | + displayName="Meter Counter" |
| 117 | + description="Meter counters represent the counters used in meter devices, allowing separate tracking for different consumption types or purposes, such as peak and off-peak energy usage." |
| 118 | + apiLink="/api/metering#tag/meter_counter_schema" |
| 119 | +/> |
| 120 | + |
| 121 | +## Journeys |
| 122 | + |
| 123 | +<EntitySchemaViewer |
| 124 | + schema="journey" |
| 125 | + displayName="Journey" |
| 126 | + description="Journeys contain the configuration of a customer journey, which is used to collect data from customers." |
| 127 | + apiLink="/api/journey#tag/journey_schema" |
| 128 | +/> |
| 129 | + |
| 130 | +<EntitySchemaViewer |
| 131 | + schema="submission" |
| 132 | + displayName="Submission" |
| 133 | + description="Submissions store raw data collected from Journeys or other outside data sources into epilot." |
| 134 | + apiLink="/api/submission#tag/submission_schema" |
| 135 | +/> |
| 136 | + |
| 137 | +## Messaging |
| 138 | + |
| 139 | +<EntitySchemaViewer |
| 140 | + schema="message" |
| 141 | + displayName="Message" |
| 142 | + description="Messages are email communications sent and received through the epilot platform." |
| 143 | + apiLink="/api/message#tag/message_schema" |
| 144 | +/> |
| 145 | + |
| 146 | +<EntitySchemaViewer |
| 147 | + schema="email_template" |
| 148 | + displayName="Email Template" |
| 149 | + description="Email templates are used as templates containing variables for emails sent from epilot." |
| 150 | + apiLink="/api/email-template#tag/email_template_schema" |
| 151 | +/> |
| 152 | + |
| 153 | +## System |
| 154 | + |
| 155 | +<EntitySchemaViewer |
| 156 | + schema="file" |
| 157 | + displayName="File" |
| 158 | + description="Files store details about documents, images, templates and other files uploaded to the epilot platform." |
| 159 | + apiLink="/api/file#tag/file_schema" |
| 160 | +/> |
| 161 | + |
| 162 | +<EntitySchemaViewer |
| 163 | + schema="comment" |
| 164 | + displayName="Comment" |
| 165 | + description="Comments allow users to add notes and have discussions across the platform." |
| 166 | + apiLink="/api/notes" |
| 167 | +/> |
| 168 | + |
| 169 | +<EntitySchemaViewer |
| 170 | + schema="portal_user" |
| 171 | + displayName="Portal User" |
| 172 | + description="Portal users are users registered to use end customer portals or installer portals." |
| 173 | + apiLink="/api/customer-portal#tag/portal_user_schema" |
| 174 | +/> |
| 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 | +/> |
| 201 | + |
| 202 | +## Common Entity Fields |
| 203 | + |
| 204 | +All entities share the following common fields: |
| 205 | + |
| 206 | +- `_id` - Unique identifier for the entity |
| 207 | +- `_org` - Organization ID that owns the entity |
| 208 | +- `_schema` - Schema slug identifying the entity type |
| 209 | +- `_title` - Human-readable title/name for the entity |
| 210 | +- `_created_at` - Timestamp when the entity was created |
| 211 | +- `_updated_at` - Timestamp when the entity was last updated |
| 212 | +- `_tags` - Array of tags for categorization |
| 213 | +- `_owners` - Array of user/org ownership information |
| 214 | +- `_acl` - Access control list defining view/edit/delete permissions |
| 215 | +- `_files` - Relations to associated file entities |
| 216 | + |
| 217 | +## Working with Entities |
| 218 | + |
| 219 | +To interact with these entities programmatically, use the [Entity API](/api/entity) or the [@epilot/entity-client](https://github.com/epilot-dev/sdk-js) SDK. |
| 220 | + |
| 221 | +For more information about entity schemas, see the [Schemas List](/docs/entities/schemas-list). |
0 commit comments