Skip to main content

Introduction

The Orden Compra (Purchase Order) module provides comprehensive functionality for managing purchase orders and integrating with procurement systems, including SAP. This module handles the complete lifecycle of purchase orders from creation to approval and blocking/unblocking operations.

Key Features

Purchase Order Management

  • Order Creation: Create purchase orders directly from procurement requisitions (SOLPED)
  • Order Tracking: Query and retrieve purchase orders by beneficiary code
  • Order Control: Block and unblock purchase orders as needed

SAP Integration

The module integrates with SAP procurement systems to:
  • Create purchase orders (OC) from requisitions
  • Synchronize order status and information
  • Handle procurement document classes and organizational structures
  • Manage INCOTERMS and supplier relationships

Data Models

Purchase Order (IndAntOrdenCompra)

The primary data model for purchase orders includes:
  • Order Identification: Unique order ID and code
  • Financial Information: Purchase value and amount
  • Beneficiary Relationship: Links to beneficiary information
  • Tracking: Creation and modification timestamps

Integration Points

External Systems

SAP Procurement

Integration with SAP for order creation and synchronization via API Procurement Registry

Authentication Service

Secured API calls using OAuth 2.0 bearer token authentication
  • Anticipos: Purchase orders are linked to advance payment requests
  • Supply Management: Integration with supply chain requisitions
  • Beneficiarios: Purchase orders are associated with beneficiary entities

Security and Authentication

All purchase order operations require proper authentication:
  • Bearer token authentication for external API calls
  • Role-based access control for mutations
  • Secure transmission of sensitive financial data

Workflow

  1. Requisition (SOLPED): Purchase requisition is created in the system
  2. Order Creation: The CreateOcProcurment mutation converts the requisition into a purchase order
  3. SAP Processing: Order is sent to SAP for processing and approval
  4. Status Management: Orders can be blocked or unblocked using the DesbloquearPedido mutation
  5. Tracking: Orders can be queried by beneficiary for monitoring and reporting

Error Handling

The module provides comprehensive error responses including:
  • Service Errors: Flags for external service failures
  • Validation Messages: Detailed error messages with type, ID, and description
  • Warning System: Non-critical warnings for data quality issues
  • Success Indicators: Clear success/failure status for all operations

Queries

Learn how to query purchase order data

Mutations

Create and manage purchase orders

Build docs developers (and LLMs) love