Skip to main content

Definitions

This section covers the most important type of the Data Designer, Entity Definitions. But first of all lets get clear about what Entity Definitions even do.

Entity Definitions

What is a Entity Definition?

Entity Definitions ensure that all data is stored in a structured format and therefor reading and writing data is controlled. This consistency underpins everything from application integration to data security:

  • Consistency: By defining which fields exist and their data types, you remove guesswork and maintain uniformity across records in your system.
  • Validation: Entity Definitions allow you to set rules for which data is acceptable. That way, you can ensure that any new entries or updates match your standards.
  • Scalability: Whether you handle a single dataset or many, having a formal definition for each entity type helps Vyndara’s services adapt as your system grows.
  • Maintainability: Well-defined data models make it simpler to integrate new features (e.g., AI-enabled fields, advanced workflows) without breaking existing data.

Key Components of an Entity Definition

  1. Entity Name
    A unique identifier for the entity in your system (for instance, “Customer,” “Product,” or “SubscriptionRecord”).

  2. Fields and Types
    Each entity can have multiple fields—like firstName or email—with defined data types (e.g., string, integer, boolean, or custom types such as references to other entities). The data type ensures consistent validation and usage of those fields.

  3. Relationships
    In many cases, you need to link one entity to another. For example, a “Customer” entity may have a relationship to an “Order” entity. Relationships in Vyndara store these links so you can query or navigate between connected datasets.

  4. Validation Rules
    You can set rules—such as “email must be unique” or “price must be greater than zero”—that the system uses to validate input. These rules ensure data consistency and accuracy across the platform.

  5. Lifecycle Hooks and Custom Logic
    Vyndara provides extension points within Entity Definitions so you can attach custom logic at various points in an entity’s lifecycle (e.g., “When a record is created” or “Before a record is updated”). This makes it possible to perform tasks like sending notifications or updating external systems.

How to Create a New Entity Definition

  1. Open the Data Designer
    Navigate to the “Data Designer” section in your Vyndara admin console. Make sure you have the right permissions to add or modify definitions.

  2. Click on “Create Entity Definition”
    You’ll see a form asking for the entity’s name, fields, and any initial validation rules.

  3. Configure Fields
    Add as many fields as you need, specifying their data type (string, number, boolean, JSON, etc.). You can also set constraints like min/max length or range values.

  4. Add Relationships (Optional)
    If your new entity needs to link to existing entities—for example, a “Customer Support Ticket” entity linking to a “Customer” entity—define those relationships here.

  5. Define Permissions
    For each action (create, read, update, delete), decide who can perform it. You can apply broad rules for all users or get extremely granular (e.g., “Only administrators can delete, but all users can read”).

  6. Save and Deploy
    When you finish configuring fields, validation, and permissions, click Save. In a multi-tenant setup, be sure to select which tenant(s) this new entity definition applies to.

Example: “Order” Entity Definition

Here is a simplified example that might appear in your Data Designer:

  • Entity Name: Order
  • Fields:
    • orderNumber: string, required, unique
    • customerId: string, required (references the Customer entity)
    • status: string, required, default: Pending
    • orderDate: date/time, required
    • items: array of object, each object can have fields like productId, quantity, and price
  • Validation Rules:
    • orderNumber must be unique
    • status must be one of: [Pending, Shipped, Delivered, Canceled]
  • Permissions:
    • Create: Customer role, Sales Rep role
    • Read: Customer who created the order, Sales Rep, and Administrator roles
    • Update: Sales Rep, Administrator roles
    • Delete: Administrator role only

Entity Definition Fields

Each Entity Definition can have multiple fields.