TELS Quoting Service - Event Catalog

🏠 Home quoting / Quoting / docs

TELS Quoting Service - Event Catalog

Overview

TELS Quoting uses RabbitMQ via MassTransit 8.2.5 for asynchronous messaging. One subscriber service hosts two consumers processing 7 message types. The API publishes 6 event types via BusProxy.

Message Bus Architecture

Queue Consumer Messages
tels.bidding.mqservices BiddingConsumer 5 message types (expiration, fairness, PDF gen)
tels.bidding.mqservices WorkItemConsumer 2 message types (status, fulfillment)

Delivery Mechanism

Component Purpose Configuration
MassTransit 8.2.5 Consumer/publisher framework RabbitMQ transport
RabbitMQ Message broker Multi-bus configuration
BusProxy Outbound event publishing TELS.BusProxy.Client 2.2.0 with S3 fallback

Consumed Events (Inbound)

IBidAccepted

Property Value
Source Self (API publishes on bid acceptance)
Queue tels.bidding.mqservices
Consumer BiddingConsumer
Contract TELS.Bidding.Contracts.V1.Events
Trigger A bid is accepted via the API
Action Schedules a CheckForBidExpiration message for future expiration check

ICheckForBidExpiration

Property Value
Source Self (scheduled by BiddingConsumer on bid acceptance)
Queue tels.bidding.mqservices
Consumer BiddingConsumer
Contract TELS.Bidding.Contracts.V1.Events
Trigger Scheduled expiration check fires
Action Expires the bid if expiration date has passed

IBidRevalidationExpiration

Property Value
Source Self (published with EarliestPublicationDate on revalidation)
Queue tels.bidding.mqservices
Consumer BiddingConsumer
Contract TELS.Bidding.Contracts.V1.Events
Trigger Revalidation expiration date reached
Action Expires bid with expired revalidation

Schema:

{
  "bidId": "guid",
  "expirationDate": "2026-06-01",
  "triggeringRevalidationEventCreationDate": "2026-03-11T10:00:00Z"
}

IBidModification

Property Value
Source Self (API publishes on every bid mutation)
Queue tels.bidding.mqservices
Consumer BiddingConsumer
Contract TELS.Bidding.Contracts.V1.Events
Trigger Any bid create, update, accept, cancel, expire, revalidate, lose, or win
Action Calculates bid fairness score using AI

Schema:

{
  "oldBid": { "bidId": "guid", "status": 1, "totalAmount": 5000.00 },
  "updatedBid": { "bidId": "guid", "status": 2, "totalAmount": 5500.00 },
  "saveIntent": "Update"
}

IGenerateBidFromPdfCommand

Property Value
Source API (published on PDF upload)
Queue tels.bidding.mqservices
Consumer BiddingConsumer
Contract TELS.Bidding.Contracts.V1.Events
Trigger User uploads PDF for bid generation
Action Extracts PDF text, calls LLM (AWS Bedrock/OpenAI), saves structured bid data

Schema:

{
  "generatedBidFromPdfId": "guid",
  "sourceFileId": "guid"
}

IStatusEventV1

Property Value
Source Work Items domain (via RabbitMQ)
Queue tels.bidding.mqservices
Consumer WorkItemConsumer
Contract TELS.WorkItems.Events NuGet
Trigger Work item status changes to Cancelled or CustomerDeclined
Action Cancels associated bids

INewWorkItemV1

Property Value
Source Work Items domain (via RabbitMQ)
Queue tels.bidding.mqservices
Consumer WorkItemConsumer
Contract TELS.WorkItems.Events NuGet
Trigger New work item created with RequestType.Fulfillment
Action Processes win/loss outcomes for bids associated with the fulfilled work item

Published Events (Outbound)

BidModification

Property Value
Source API (on every bid mutation)
Delivery BusProxy (S3 fallback)
Known Consumers Self (fairness calculation), TicketExceptions (BiddingConsumer)

BidStatusChanged

Property Value
Source API (on accept, cancel, expire, lose, win)
Delivery BusProxy (S3 fallback)
Known Consumers TicketExceptions (BiddingConsumer)

Schema:

{
  "bid": { "bidId": "guid", "status": 3 },
  "oldStatus": 1
}

BidAccepted

Property Value
Source API (on bid acceptance)
Delivery BusProxy (S3 fallback)
Known Consumers Self (schedules expiration check)

Schema:

{
  "bid": { "bidId": "guid", "status": 2 },
  "purpose": "Acceptance"
}

BidConversationAdded

Property Value
Source API (on clarification request or fairness explanation)
Delivery BusProxy (S3 fallback)
Known Consumers TicketExceptions (BiddingConsumer)

Schema:

{
  "bid": { "bidId": "guid" },
  "conversation": { "message": "Please clarify warranty terms.", "author": "John Smith" }
}

BidRevalidationExpiration

Property Value
Source API (on revalidation, with EarliestPublicationDate)
Delivery BusProxy (S3 fallback)
Known Consumers Self (expires bid at revalidation expiration)

GenerateBidFromPdfCommand

Property Value
Source API (on PDF upload)
Delivery BusProxy (S3 fallback)
Known Consumers Self (BiddingConsumer processes PDF extraction)

Message Flow Diagrams

Bid Lifecycle Flow

User creates/updates bid via API
  -> Saves to PostgreSQL
  -> Publishes BidModification via BusProxy
  -> Queue: tels.bidding.mqservices
  -> BiddingConsumer calculates fairness score
  -> Updates bid with fairness_score and fairness_confidence

Bid Acceptance Flow

User accepts bid via API
  -> Saves status change to PostgreSQL
  -> Publishes BidAccepted, BidModification, BidStatusChanged via BusProxy
  -> BiddingConsumer receives BidAccepted
  -> Schedules CheckForBidExpiration for future date
  -> (Later) CheckForBidExpiration fires
  -> BiddingConsumer expires bid if past expiration date

PDF-to-Bid Flow

User uploads PDF via API
  -> Saves generated_bids record (status: Submitted)
  -> Publishes GenerateBidFromPdfCommand via BusProxy
  -> Queue: tels.bidding.mqservices
  -> BiddingConsumer processes:
     1. Fetches PDF from Files Service
     2. Extracts text via PdfPig
     3. Calls LLM (AWS Bedrock/OpenAI) for structured extraction
     4. Saves generated bid data (status: Completed/Failed)
     5. Stores LLM chain-of-thought reasoning

Work Item Cancellation Flow

Work Items System
  -> Publishes IStatusEventV1 (Status.Cancelled / Status.CustomerDeclined)
  -> Queue: tels.bidding.mqservices
  -> WorkItemConsumer cancels associated bids

Contract Package

Package Version Messages
TELS.Quoting.Contracts (ns: TELS.Bidding.Contracts) 3.14.0 BidModification, BidStatusChanged, BidAccepted, BidConversationAdded, BidRevalidationExpiration, CheckForBidExpiration, GenerateBidFromPdfCommand
TELS.WorkItems.Events 2.0.x IStatusEventV1, INewWorkItemV1

Summary