Employee Model Overview
The Employee object represents a real estate broker or agent in Destinet. It's a master entity stored in its own collection, referenced by Estate, Department, and Project entities.
What is an Employee?
An Employee represents:
- An individual person who sells or rents properties
- Their professional profile (photo, bio, qualifications, specializations)
- Their contact information (email, phone, mobile)
- Their affiliation with one or more departments
- Their track record (sold properties, awards, experience)
Design Principles
1. Master Entity with Multiple Affiliations
Each employee is stored once and can work at multiple departments:
DepartmentIds: List of departments the employee belongs to (["3005093", "3005094"])- Estates reference employees via
BrokersIdWithRoleslist - Projects reference employees as project contacts
Benefit: An employee can work at multiple office locations without data duplication.
2. Professional Profile and Marketing
Employees need rich profiles to build trust and credibility:
- Personal Information: Name, title, photo, bio, qualifications
- Media: Profile photos, signature images, video presentations
- Track Record:
SoldPropertieslist for showcasing experience - Specializations:
IsProjectBroker,IsRentalBrokerflags
Use Case: Display an employee's full profile page with biography, qualifications, and properties they've sold.
3. Flexible Contact Methods
Multiple contact options for different situations:
MobilePhone: Direct line for urgent inquiriesPhone: Office/landline numberEmail: Primary email for leads and communication
Clients can choose how to reach the employee based on urgency and preference.
4. Employee Specialization Support
Track what types of properties employees specialize in:
IsProjectBroker(Prosjektmegler): Specializes in new build/housing projectsIsRentalBroker(Utleiemegler): Specializes in rental properties
Use Case: Filter and assign employees based on property type (new build vs. resale vs. rental).
Core Structure
public class Employee
{
// Identification
public string Id { get; set; }
public string Name { get; set; }
public string Title { get; set; }
// Contact information
public string? WorkPhone { get; set; }
public string? Email { get; set; }
public string? MobilePhone { get; set; }
// Image
public string? PhotoUrl { get; set; }
public DateTime? ImageTimestamp { get; set; }
// Description
public string? Description { get; set; }
public string? Qualifications { get; set; }
public string? VideoUrl { get; set; }
// Positions & Roles
public List<EmployeePosition>? Positions { get; set; }
// Details
public int? Order { get; set; }
public bool? IsProjectBroker { get; set; }
public bool? IsRentalBroker { get; set; }
public List<string>? DepartmentIds { get; set; }
public List<string>? SoldProperties { get; set; }
// Status
public bool? IsActive { get; set; }
public DateTime? LastModifiedOrigin { get; set; }
public DateTime? LastModifiedLocal { get; set; }
// Media
public ImageCollection? Images { get; set; }
// External Integration
public string? Origin { get; set; }
public Dictionary<string, object>? CustomData { get; set; }
}
Note: The Employee model uses the
EmployeePositionclass to track an employee's roles within the organization. For detailed documentation of this class, see Employee Classes.
Working with Media
Image
Fetch images: GET /{installationId}/Employees/{employeeId}/Picture
public class Image
{
public string Id { get; set; }
public string OriginalUrl { get; set; }
public string Filename { get; set; }
public string FileExtension { get; set; }
public string ExternalProviderUrl { get; set; }
public string Caption { get; set; }
public string AltText { get; set; }
public string Category { get; set; } // "Profile Photo", "Signature", "Award Photo"
public int Order { get; set; }
public int Width { get; set; }
public int Height { get; set; }
public DateTime LastModified { get; set; }
}
Usage:
employee.Images.Add(new Image
{
Id = "4821283",
OriginalUrl = "https://cdn.example.com/employee-profile.jpg",
Filename = "profile-photo.jpg",
FileExtension = "jpg",
Caption = "Professional headshot",
AltText = "Jonas Haugen - Senior Real Estate Broker",
Category = "Profile Photo",
Order = 1,
Width = 800,
Height = 1000,
LastModified = DateTime.Parse("2025-10-25")
});
Relationship to Other Models
Employee → Department (Many-to-Many)
// Employees can belong to multiple departments
employee.DepartmentIds = new List<string> { "3005093", "3005094" };
// Find all employees in a department
var employeesInDept = employees.Where(e => e.DepartmentIds.Contains("3005093"));
Employee → Estate (Many-to-Many via BrokerWithRole)
// Estates reference employees through BrokerWithRole
estate.BrokersIdWithRoles.Add(new BrokerWithRole
{
EmployeeId = "3006722",
BrokerRole = 1 // Primary broker
});
// Find all estates for an employee
var employeeEstates = estates.Where(e =>
e.BrokersIdWithRoles.Any(b => b.EmployeeId == "3006722")
);