using System.Collections.Generic; namespace FrameworkDAL.DTO.EIPConversation { /// /// Configuration for a QUALIFY step — runs the GOP Qualifier engine against /// selected context variables, then optionally transforms the enriched facts /// through a Mapper. Supports lookup, validation, and enrichment use cases. /// public class EIPQualifyConfigDTO { /// /// Entity code registered in MQUALIFIERENTITY (e.g. "EIPCustomer", "EIPLead"). /// Maps to QualifierExecutionContext.EntityCode. /// public string BoundToType { get; set; } = ""; /// /// Context variable key holding the entity primary key (int). /// Pass "0" or omit for new-entity qualification. /// public string? BoundToIdContextKey { get; set; } /// /// Context variable keys to serialize into the qualifier payload JSON. /// E.g. ["Name", "Phone", "Email"] → { "Name": "...", "Phone": "..." } /// When empty, the entire context.Variables dict is serialized. /// public List InputKeys { get; set; } = new(); /// Qualifier execution stage byte (1=PreValidate, 2=PreWorkflow, 3=PrePersist). Default 1. public byte Stage { get; set; } = 1; /// Qualifier scope byte (0=default). Match MQUALIFIERENTITY.SCOPE. public byte Scope { get; set; } = 0; /// /// Context key to store the serialized QualifierFactBag.ExportAll() dict after execution. /// Available for dot-notation in subsequent steps: {CustomerFacts.Document.CreditLimit} /// public string? OutputFactKey { get; set; } /// Optional mapper code to run on the fact export JSON after successful qualification. public string? MapperCode { get; set; } /// Context key to store the mapped output JSON when MapperCode is set. public string? OutputMapKey { get; set; } /// /// Step to route to when the qualifier returns any Error-severity finding. /// context.Variables["_QualifyError"] will contain the first error message. /// When null, errors are stored but flow continues to NextStepCode. /// public string? OnValidationErrorStepCode { get; set; } } }