Skip to main content

Customer Support Microservice

The Customer Support microservice is responsible for handling support tickets and related comments. It includes MongoDB-backed models and a gRPC API for creating, updating, and tracking support issues submitted by users.

Models (customer_support.go)

Ticket

Represents a customer support request or issue.

FieldTypeDescription
IDObjectIDUnique MongoDB identifier
UserIDuint32ID of the user who submitted the ticket
ApplicationstringName or ID of the application related to the ticket
SubjectstringShort title/subject of the issue
DescriptionstringDetailed description of the issue
StatusTicketStatusCurrent status: open, in_progress, resolved, closed
PriorityPriorityPriority level: low, medium, high, critical
CreatedAttime.TimeTimestamp when the ticket was created
UpdatedAttime.TimeLast updated timestamp
CreatedByuint32ID of the user who created the ticket
UpdatedByuint32ID of the user who last updated the ticket
AssignedTouint32ID of the user currently assigned to the ticket (optional)

Comment

Stores user or support agent comments on a support ticket.

FieldTypeDescription
IDObjectIDUnique MongoDB identifier
TicketIDstringID of the ticket the comment is attached to
UserIDuint32ID of the commenting user
ContentstringText of the comment
CreatedAttime.TimeTimestamp of creation
UpdatedAttime.TimeTimestamp of last update
CreatedByuint32ID of creator
UpdatedByuint32ID of last updater

gRPC Service (customer_support.proto)

The .proto file defines services for managing tickets and comments via gRPC.

Messages

  • Ticket, Comment: Mirror the Go struct fields.
  • TicketId, CommentId: Used to fetch individual records.
  • TicketList, CommentList: Collections of records.
  • TicketRequest, CommentRequest: For creating or updating tickets/comments.
  • Empty: Placeholder for requests or responses without fields.

Services

  • CreateTicket(TicketRequest) returns (Ticket)
  • UpdateTicket(TicketRequest) returns (Ticket)
  • GetTicket(TicketId) returns (Ticket)
  • ListTickets(Empty) returns (TicketList)
  • AddComment(CommentRequest) returns (Comment)
  • ListComments(TicketId) returns (CommentList)

These services allow for managing the lifecycle of customer support tickets and enabling threaded discussions via comments.