Skip to main content

MultiView Microservice

The MultiView microservice enables the grouping and management of multiple reports under a conceptual “view,” enriched with contextual metadata like risk grades and scoring dimensions. It is ideal for users who need to organize and assess multiple risk reports through a unified lens.


Model (models.go)

MultiView

Represents a user's collection of related reports with risk and scoring dimensions.

FieldTypeDescription
IDObjectID (MongoDB)Unique ID of the MultiView (BSON _id)
NamestringName/title of the MultiView
MultiViewSets[]MultiViewSetsList of associated report metadata
CreatedAttime.TimeCreation timestamp
UpdatedAttime.TimeLast updated timestamp
CreatedByuint32ID of the creator
UpdatedByuint32ID of the last updater

MultiViewSets

Represents metadata for a report within a MultiView.

FieldTypeDescription
ReportIDstringUnique identifier for the report
ReportNamestringName/title of the report
RiskGradestringRisk grade associated with the report
Dimension[]ScorecardDimensionEnumList of scored dimensions for this report

Enums

ScorecardDimensionEnum

These enumerated dimensions capture key areas used in scoring:

enum ScorecardDimensionEnum {
CORPORATE_STRUCTURE_AND_OPERATIONAL_CAPABILITY = 0;
FINANCIAL_HEALTH = 1;
CREDIT_HISTORY = 2;
COMPLIANCE_RIGOR = 3;
LITIGATION_HISTORY = 4;
DEFAULTER_AND_BLACKLIST_MENTIONS = 5;
SANCTIONS_AND_PEP_MENTIONS = 6;
PROMOTER_AND_RELATED_PARTY_QUALITY = 7;
MARKET_SENTIMENT = 8;
}

gRPC API (multiview.proto)

Messages

Requests

  • CreateMultiViewRequest – Creates a new MultiView entry.
  • UpdateMultiViewRequest – Updates an existing MultiView by its ID.
  • GetMultiViewsByCreatedByRequest – Returns all MultiViews created by a specific user.

Response

  • MultiViewResponse
    • message: Status or description.
    • code: Response code (e.g., "200", "ERR_NOT_FOUND").
    • data: List of MultiView objects.
    • total: Total number of matching records.

Services

service MultiViewService {
rpc CreateMultiView(CreateMultiViewRequest) returns (MultiViewResponse);
rpc GetMultiViewsByCreatedBy(GetMultiViewsByCreatedByRequest) returns (MultiViewResponse);
rpc UpdateMultiView(UpdateMultiViewRequest) returns (MultiViewResponse);
}

These models are typically referenced via IDs in MultiViewSets:

Report

Describes a detailed risk report and metadata.

FieldTypeDescription
IDuuid.UUIDReport's UUID
TitlestringReport title
LegacyReportTypestringClassification of the report
OrganizationID*intLinked organization ID (nullable)
StatusstringStatus of the report (e.g., "Draft")
YearsToCrawl*intHistorical depth of data

RiskScore

Provides scores and grades for specific metrics within reports.

FieldTypeDescription
MetricNamestringName of the evaluated metric
Scorefloat64Risk score (numeric)
GradestringRisk grade (e.g., "A", "B-", etc.)
ReportID*uuid.UUIDAssociated report ID