Skip to main content

Overview

The Plan Comercial module provides GraphQL queries to retrieve commercial plans, parametrization settings, and homologated data from external systems.

Queries

getOrganizacionCanalHomologadoSp

Retrieves homologated organization and channel data from the external data warehouse. Authorization: Not required Returns: [OrganizacioneCanalHomologadoSP!]!
OrganizacionVentas
string
Sales organization code
DescripcionCanal
string
Channel description
CodigoCliente
string
Client code identifier
NombreCliente
string
Client name
Example Query:
query {
  getOrganizacionCanalHomologadoSp {
    organizacionVentas
    descripcionCanal
    codigoCliente
    nombreCliente
  }
}

getMaterialesHomologadosSp

Retrieves homologated materials from the external data warehouse with pricing and categorization. Authorization: Not required Returns: [MaterialesHomologadosSP!]!
CodigoCanal
string
Channel code
ListaPrecios
string
Price list identifier
CodigoMaterial
string
Material code
NombreMaterial
string
Material name
NombreFamilia
string
Product family name
Cluster
string
Product cluster
Categoria
string
Product category
Negocio
string
Business unit
Tipo
string
Material type
Subtipo
string
Material subtype
Marca
string
Brand name
CategoriaExco
string
EXCO category classification
PropioPrivadoHomologado
string
Material ownership classification (proprietary/private/homologated)
PrecioActual
decimal
Current price
Pvp
decimal
Public sale price (PVP)
Example Query:
query {
  getMaterialesHomologadosSp {
    codigoMaterial
    nombreMaterial
    nombreFamilia
    negocio
    categoria
    precioActual
    pvp
  }
}

getParametrizacionPlanComercial

Retrieves all parametrization configurations for commercial plans. Authorization: Not required Returns: [ParametrizacionPlanComercialDTO!]!
Id
int
Unique identifier
Canal
string
Sales channel
Cliente
string
Client identifier
NumeroDiasAntes
int
Number of days before target date allowed for planning
NumeroDiasDespues
int
Number of days after target date allowed for planning
CreatedAt
DateTime
Creation timestamp
UpdatedAt
DateTime
Last update timestamp
Example Query:
query {
  getParametrizacionPlanComercial {
    id
    canal
    cliente
    numeroDiasAntes
    numeroDiasDespues
  }
}

getParametrizacionPlanComercialByCliente

Retrieves parametrization configuration for a specific client. Authorization: Not required
cliente
string
required
Client identifier
Returns: ParametrizacionPlanComercialDTO Example Query:
query {
  getParametrizacionPlanComercialByCliente(cliente: "CLIENT001") {
    id
    canal
    cliente
    numeroDiasAntes
    numeroDiasDespues
  }
}

getPlanComercialEstados

Retrieves all available commercial plan states. Authorization: Not required Returns: [PlanComercialEstadosDTO!]!
Id
int
State identifier
Nombre
string
State name
Tipo
TipoEstado
State type (enum)
EtapaId
int
Associated approval stage identifier
Etapa
CatSateliteAprobadoresEtapaEntity
Approval stage details
Example Query:
query {
  getPlanComercialEstados {
    id
    nombre
    tipo
    etapaId
  }
}

getPlanesComercialCreados

Requires authentication
Retrieves all commercial plans created by the current authenticated user. Authorization: Required Returns: [PlanComercialDTO!]!
Id
int
Plan identifier
Mes
string
Plan month
MesObjetivo
string
Target month
MesCruce
string
Cross-reference month
Anio
int
Plan year
TipoCanal
string
Sales channel type
TipoCliente
string
Client type
TotalInversion
decimal
Total investment amount
TotalSellOut
decimal
Total sell-out amount
TotalProvision
decimal
Total provision amount
EstadoId
int
Current state identifier
Estado
PlanComercialEstadosDTO
Current state details
UsuarioId
int
User identifier who created the plan
Promociones
[PromocionesPlanComercialDTO!]!
List of promotional activities
Example Query:
query {
  getPlanesComercialCreados {
    id
    mes
    anio
    tipoCanal
    tipoCliente
    totalInversion
    totalSellOut
    estado {
      nombre
    }
    promociones {
      nombrePromocion
      fechaInicio
      fechaFin
    }
  }
}

getPlanesComercialesForApproval

Requires authentication
Retrieves commercial plans pending approval for a specific stage. Authorization: Required
stage
string
required
Approval stage name
Returns: [PlanComercialDTO!]! Example Query:
query {
  getPlanesComercialesForApproval(stage: "Gerencia") {
    id
    mes
    anio
    tipoCliente
    totalInversion
    estado {
      nombre
    }
    usuario {
      nombre
      email
    }
  }
}

getPlanComercialApproverByStage

Requires authentication
Retrieves approvers configured for a specific approval stage. Authorization: Required
stage
string
required
Approval stage name
Returns: [SateliteAprobadoresDto!]! Example Query:
query {
  getPlanComercialApproverByStage(stage: "Gerencia") {
    id
    nombre
    email
    etapa
    cluster
  }
}

getCreatedPlanById

Requires authentication
Retrieves a specific commercial plan by ID, accessible only by the creating user. Authorization: Required
id
int
required
Plan identifier
Returns: PlanComercialDTO Example Query:
query {
  getCreatedPlanById(id: 123) {
    id
    mes
    mesObjetivo
    anio
    tipoCanal
    tipoCliente
    totalInversion
    totalSellOut
    totalProvision
    promociones {
      id
      nombrePromocion
      actividad
      mecanica
      fechaInicio
      fechaFin
      totalInversion
      materiales {
        codigoMaterial
        nombreMaterial
        cantidad
      }
    }
    observaciones {
      observacion
      etapaId
      usuario {
        nombre
      }
    }
    flujos {
      etapaId
      estadoId
      fechaAprobacion
    }
  }
}

getNegociosPlanComercial

Requires authentication
Retrieves unique business units (Negocios) available for commercial planning. Authorization: Required Returns: [String!]! Example Query:
query {
  getNegociosPlanComercial
}
Example Response:
[
  "Alimentos",
  "Bebidas",
  "Snacks",
  "Lácteos"
]

getUniqueMaterialsWithNegocio

Requires authentication
Retrieves unique materials with their associated business units. Authorization: Required Returns: [MaterialesHomologadosSP!]!
CodigoMaterial
string
Material code
NombreMaterial
string
Material name
Negocio
string
Business unit
Example Query:
query {
  getUniqueMaterialsWithNegocio {
    codigoMaterial
    nombreMaterial
    negocio
  }
}

getPlanesForProvision

Retrieves commercial plans ready for provision processing. Authorization: Not required Returns: [PlanComercialDTO!]! Example Query:
query {
  getPlanesForProvision {
    id
    mes
    anio
    totalProvision
    estado {
      nombre
    }
  }
}

getProvisionesForApprovalByStage

Retrieves provisions pending approval for a specific stage. Authorization: Not required
stage
string
required
Approval stage name for provisions
Returns: [PlanComercialDTO!]! Example Query:
query {
  getProvisionesForApprovalByStage(stage: "Finanzas") {
    id
    mes
    totalProvision
    estadoProvision {
      nombre
    }
  }
}

Build docs developers (and LLMs) love