Skip to main content

ContactDivision

Introduction

ContactDivision is a junction entity that enables multi-division access control for contacts. This allows a single contact (customer, vendor, carrier) to have access to multiple divisions within an organization, supporting complex organizational structures and shared customer scenarios.

Entity Structure

Properties

Property NameTypeRequiredDescription
ContactDivisionIdintYesPrimary key
ContactIdintYesForeign key to Contact
DivisionIdintYesForeign key to Division
CreatedDateTimeYesCreation timestamp
CreatedBystringYesUser who created the record
LastModifiedDateTimeYesLast modification timestamp
LastModifiedBystringYesUser who last modified

Relationships

RelationshipTypeDescription
ContactContactParent contact
DivisionDivisionDivision with access

YAML Configuration

Multi-division access is managed through Contact update operations:

# Assign contact to multiple divisions
- task: Contact/Update@1
name: assignMultipleDivisions
inputs:
organizationId: ${organizationId}
contactId: ${contactId}
contact:
contactDivisions:
- divisionId: ${eastDivisionId}
- divisionId: ${westDivisionId}
- divisionId: ${centralDivisionId}

Usage

This junction entity is managed automatically when divisions are assigned to contacts. It supports scenarios where:

  • A customer operates in multiple regions served by different divisions
  • A carrier provides services across multiple business units
  • An employee has responsibilities spanning multiple divisions

Domain Events

The Contact entity publishes a ContactChangedDivisions domain event when division assignments change, allowing downstream systems to react to access control modifications.