The solution (TELS.TicketExceptions.sln) contains 12 projects organized in a layered architecture:
| Project | Type | Framework | Description |
|---|---|---|---|
| TELS.TicketExceptions.API | ASP.NET Core Web API | .NET 8.0 | REST API for querying/managing ticket exceptions |
| TELS.TicketExceptions.MQServices | Worker Service | .NET 8.0 | Message queue consumer service (27 consumers for exception detection) |
| TELS.TicketExceptions.DAL | Class Library | .NET 8.0 | Data access layer (Dapper + PostgreSQL) |
| TELS.TicketExceptions.Models | Class Library | .NET 8.0 | Shared data models |
| TELS.TicketExceptions.Contracts | Class Library | .NET Standard 2.0 | Published API contracts & MQ events (NuGet package) |
| TELS.TicketExceptions.DbUp | Console App | .NET 8.0 | Database migrations (DbUp) |
| TELS.TicketExceptions.ServiceProviderEscalationProcessor | Console App | .NET 8.0 | Batch job (currently disabled) |
| Project | Type | Description |
|---|---|---|
| TELS.TicketExceptions.API.UnitTesting | Unit Tests | API controller tests |
| TELS.TicketExceptions.DAL.UnitTesting | Unit Tests | Data access layer tests |
| TELS.TicketExceptions.MQServices.UnitTesting | Unit Tests | Consumer handler tests |
| TELS.TicketExceptions.IntegrationTesting | Integration Tests | Full-stack API + DB tests |
| TELS.TicketExceptions.ServiceProviderEscalationProcessor.UnitTesting | Unit Tests | Escalation processor tests |
TicketExceptions is an event-driven microservice that manages Zendesk ticket exceptions for dispatch list tickets within business-defined exception states. It isolates exception handling to decouple the web farm and integrates with the TELS platform's ticketing and operations infrastructure.
┌─────────────────────────────────────────────┐
│ API Controllers (3) │
│ Controllers/*.cs │
├─────────────────────────────────────────────┤
│ MQ Consumers (27 consumers) │
│ MQServices/Consumers/*.cs │
├─────────────────────────────────────────────┤
│ Business Logic / Services │
│ Logic/*, Handlers/* │
├─────────────────────────────────────────────┤
│ Data Access Layer (Dapper) │
│ DAL/PostgresDataContext.cs │
├─────────────────────────────────────────────┤
│ PostgreSQL Aurora │
│ (Shared with CloudAPI - tels_building_ │
│ _services_cloudapi database) │
└─────────────────────────────────────────────┘
tels_building_services_cloudapiticket_exceptions + quartz (for job scheduler)tels.mqservices.ticketexceptionsticket-exceptions-message-scheduler (for delayed/scheduled messages)27 specialized consumers monitor dispatch list tickets for exception conditions: - ETA-related: Missing ETA, customer notification needed - Bid-related: Bid not received, automation failures, clarification/revalidation missing - Checkout-related: Missed check-in, missed checkout, tech departed - Parts-related: Lead time exceeded, parts not ordered - NTE-related: Extension not approved, approval follow-up needed - D2Q: Invoice/quote not received, quote approval follow-up - Assignment: Service provider not assigned - Compliance: Article notification outcomes, contracted service documents - Status: Completion automation, priority changes, status events
3 controllers exposing endpoints under ticketExceptions/v1/:
| Category | Technology |
|---|---|
| Runtime | .NET 8.0 |
| Web Framework | ASP.NET Core 8.0 |
| Data Access | Dapper 2.1.44 + Npgsql 8.0.5 |
| Database | PostgreSQL Aurora Serverless V2 (shared with CloudAPI) |
| Messaging | RabbitMQ + MassTransit 8.3.3 |
| Scheduling | Quartz.NET 3.13.1 (PostgreSQL persistence) |
| Migration | DbUp 5.0.40 |
| HTTP Clients | RestSharp 112.1.0, TELS.WebServiceClients |
| Mapping | AutoMapper 13.0.1 |
| Resilience | Polly 8.4.2 |
| Logging | NLog 5.3.12 |
| Monitoring | New Relic APM |
| Auth | JWT Bearer |
| Testing | xUnit, Moq |
| Containerization | Docker |
| CI/CD | GitLab CI |
| Infrastructure | AWS ECS, Terraform |
| Secrets | HashiCorp Vault |
| Environment | API Tasks | API Memory | API CPU | MQ Tasks | MQ Memory | MQ CPU |
|---|---|---|---|---|---|---|
| Sandbox/Testing | 2 | Variable | Variable | 1 | Variable | Variable |
| Prod | 2 | 2GB each | 0.5 vCPU each | 1 | 2GB | 0.5 vCPU |
1.0.${CI_PIPELINE_ID}| Configuration Group | Key Variables |
|---|---|
| Database | SQLDATABASE__ConnectionString (PostgreSQL via CloudAPI) |
| RabbitMQ | RMQTELS__Host, RMQTELS__Username, RMQTELS__Password |
| External Services | APP__AuthorizationServiceEndpoint, APP__CustomersServiceEndpoint, APP__BuildingServicesServiceEndpoint |
| Auth | APP__SIGNING_KEY (Base64 JWT key), APP__HostAccountRefreshToken |
| Feature Toggles | Managed in CloudAPI PostgreSQL database (ticketing_configuration table) |
| Integration | Mechanism | Description |
|---|---|---|
| Zendesk | REST API via RestSharp | Ticket creation, status updates, comment posting |
| Auth Service | HTTP | JWT token validation and refresh |
| Customers Service | HTTP | Customer/facility data queries |
| Building Services | HTTP | Work item status, dispatch list queries |
| Bidding Service | MQ Events | Bid conversation, status changes, modifications |
| Compliance Service | MQ Events | Article notification outcomes |
| Contracted Services | MQ Events | Document upload tracking |
sp_escalation_notification tableAPI Layer:
- /TELS.TicketExceptions.API/Controllers/
- /TELS.TicketExceptions.API/Startup.cs
MQ Services:
- /TELS.TicketExceptions.MQServices/Consumers/ (27 consumer files)
- /TELS.TicketExceptions.MQServices/Program.cs
Data Access:
- /TELS.TicketExceptions.DAL/PostgresDataContext.cs
- /TELS.TicketExceptions.DAL/Repositories/
Migrations:
- /TELS.TicketExceptions.DbUp/Scripts/
Configuration:
- /TELS.TicketExceptions.sln
- /README.md
| Test Type | Project | Execution |
|---|---|---|
| Unit Tests | API.UnitTesting | Controller/service logic |
| Unit Tests | DAL.UnitTesting | Data access layer |
| Unit Tests | MQServices.UnitTesting | Consumer handlers |
| Integration Tests | IntegrationTesting | Full API + DB (Docker) |
LocalSetup.ps1 - Complete local environment setupDBSetup.ps1 - Database initializationLocalDockerSetup.ps1 - Build Docker images locallyRunDockerIntegrationTests.ps1 - Run integration tests in Dockertels_building_services_cloudapi)