Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/gcsconsultores/centros-estrategicos-gcs/llms.txt

Use this file to discover all available pages before exploring further.

The Revisoría Fiscal evaluation at /evaluacion is a 6-question interactive assessment that determines whether a Colombian company must appoint a Revisor Fiscal under current commercial law. Rather than presenting a static form, Sally guides the user through each question as a natural chat conversation, collecting a yes/no answer before advancing to the next applicable question. Once all relevant answers are gathered, calculateRFResult() applies the decision rules and returns one of three result types with a tailored description, recommendations, and a call to action. The financial limits used to evaluate asset and income obligations are based on the 2026 Colombian minimum monthly wage (SMMLV). They are defined as constants in lib/evaluation.ts:
export const SMMLV_2026 = 1423500           // Colombian minimum wage 2026
export const ASSETS_LIMIT = 7117500000      // 5,000 SMMLV
export const INCOME_LIMIT = 4270500000      // 3,000 SMMLV
These constants are referenced in Question 3 and Question 4 to contextualise the thresholds with their COP equivalent directly inside the question text shown to the user.

The 6 Questions

Each RFQuestion has a numeric id, a question string shown to the user in the chat, and a legalBase that identifies the regulation behind it.
  1. ¿La razón social de su empresa es Sociedad Anónima (S.A.), comandita por acciones o sucursal de sociedad extranjera? Legal base: Código de Comercio
  2. ¿La razón social de su empresa es una S.A.S. o Limitada? Legal base: Clasificación especial
  3. ¿Al cierre de 2025 sus activos superaron los 5.000 SMMLV ($7.117.500.000 COP)? Legal base: Topes legales
  4. ¿Al cierre de 2025 sus ingresos superaron los 3.000 SMMLV ($4.270.500.000 COP)? Legal base: Topes legales
  5. ¿Sus estatutos o socios exigen tener Revisor Fiscal? Legal base: Estatutario
  6. ¿Su empresa pertenece a un sector con obligación especial de Revisoría Fiscal? Legal base: Norma especial
Not all six questions are presented to every user. The evaluation page implements branching logic — for example, if the user answers to Question 1 (S.A. or foreign branch), the result is determined immediately without asking the remaining questions.

Decision Logic

calculateRFResult() in lib/evaluation.ts applies five rules in order and returns the first matching result. The function receives an answers object keyed by question id.
// Rule 1: S.A., comandita por acciones, or foreign branch → always required
if (answers[1] === 'si') return RF_RESULTS.LEGALLY_REQUIRED

// Rule 2: S.A.S. or Ltda. AND exceeds asset OR income thresholds
if (answers[2] === 'si' && (answers[3] === 'si' || answers[4] === 'si'))
  return RF_RESULTS.HIGH_PROBABILITY

// Rule 3: Special sector regulation
if (answers[6] === 'si') return RF_RESULTS.LEGALLY_REQUIRED

// Rule 4: Statutory requirement by articles or shareholders
if (answers[5] === 'si') return RF_RESULTS.HIGH_PROBABILITY

// Rule 5: No flags triggered → voluntary
return RF_RESULTS.VOLUNTARY
Rules are evaluated in priority order. A company that is both an S.A. (Rule 1) and in a special sector (Rule 3) will always land on LEGALLY_REQUIRED via Rule 1 before Rule 3 is even checked.

Result Types

The three possible outcomes are defined in RF_RESULTS inside lib/evaluation.ts.
TypeKeyTitleLead Level
ALEGALLY_REQUIREDSu empresa podría estar obligada a tener Revisor Fiscal.alto
BHIGH_PROBABILITYSe identifican topes financieros que podrían generar obligación.medio
CVOLUNTARYNo se observa obligación inmediata.bajo
The leadLevel field is used by the GCS CRM pipeline to prioritise follow-up: a leadLevel: 'alto' result triggers an executive-review CTA, while 'bajo' surfaces a softer benefits-focused CTA.

RFResult Interface

Each result object contains everything needed to render the outcome card and route the lead:
export interface RFResult {
  type: 'A' | 'B' | 'C'
  title: string
  description: string
  recommendations: string[]
  cta: string
  leadLevel: 'alto' | 'medio' | 'bajo'
}
The recommendations array contains the action items shown in EvaluationResult with a checkmark prefix. The cta string is used as the label for the primary action button at the bottom of the result card.

Evaluation Flow

1

User visits /evaluacion

The page renders a header with the GCS logo, a title (Evaluación Revisoría Fiscal 2026), and the SallyEvaluationChat widget fixed to the bottom-right of the screen. Sally immediately sends her welcome message: “Hola 👋 Soy Sally, consultora virtual de GCS…”
2

EvaluationForm captures lead information

Before any questions are asked, EvaluationForm renders inside the chat panel and collects six fields: Empresa, Nombre contacto, Cargo, Correo, Teléfono, and Ciudad. The user submits by clicking Iniciar Evaluación.
3

Sally introduces the assessment and asks Q1

On form completion, onFormComplete is called. Sally sends the transition message “Perfecto. Ahora iniciaré la evaluación.” followed immediately by Question 1.
4

User answers Sí / No for each applicable question

Two large buttons — (green) and No (red) — appear at the bottom of the chat panel whenever there is an active currentQuestion. Each answer is appended to chatHistory and passed to handleAnswer(), which applies the branching logic to determine the next question or trigger the result.
5

calculateRFResult() determines the outcome

Once a terminal condition is reached, calculateRFResult(answers) is called with the accumulated answers map. It returns the matching RFResult object from RF_RESULTS.
6

EvaluationResult shows the outcome

The result card renders inside the chat panel with result.title, result.description, a checklist of result.recommendations, and the result.cta button. A separate leadLevel badge indicates priority for GCS follow-up.
The Compliance room (/rooms/compliance) also embeds a shorter version of this evaluation via SallyComplianceChat, allowing visitors to start a quick Revisoría Fiscal assessment directly from within the virtual office without navigating to /evaluacion.

Build docs developers (and LLMs) love