SAP ERP
Sincronización bidireccional entre OmniBuy y SAP ERP. Soporta tanto SAP Business One como SAP S/4HANA.
Configuración
POST /api/v1/integrations/sap
{
"enabled": true,
"flavor": "b1",
"base_url": "https://sap.example.com:50000",
"company_db": "SBODemoUS",
"username": "manager",
"password": "****",
"sync_orders": true,
"sync_products": true,
"sync_contacts": true
}
| Campo | Tipo | Requerido | Descripción |
|---|---|---|---|
enabled | bool | No | Activar/desactivar |
flavor | string | Sí | Variante de SAP: b1 (Business One) o s4 (S/4HANA) |
base_url | string | Sí | URL base de la API de SAP |
company_db | string | No | Base de datos de la compañía (B1) |
username | string | Sí | Usuario de SAP |
password | string | Sí | Contraseña |
sync_orders | bool | No | Sincronizar órdenes como documentos de venta |
sync_products | bool | No | Sincronizar productos como artículos |
sync_contacts | bool | No | Sincronizar contactos como socios de negocio |
Endpoints de sincronización
Sync individual
POST /api/v1/integrations/sap/sync/orders/:order_id
POST /api/v1/integrations/sap/sync/products/:product_id
POST /api/v1/integrations/sap/sync/contacts/:customer_id
Sync masivo
POST /api/v1/integrations/sap/sync/products/all
POST /api/v1/integrations/sap/sync/contacts/all
Consultar registros y reintentar
GET /api/v1/integrations/sap/sync/records
POST /api/v1/integrations/sap/sync/retry
Mapeo de campos
| OmniBuy | SAP B1 | SAP S/4 | Dirección |
|---|---|---|---|
| Order | Sales Order | Sales Order | OmniBuy → SAP |
| Product | Item | Material | Bidireccional |
| Customer | Business Partner | Business Partner | Bidireccional |
Errores
| Código | Descripción |
|---|---|
SAP_NOT_CONFIGURED | SAP no configurado |
SAP_CONNECTION_FAILED | No se pudo conectar con SAP |
SYNC_FAILED | Error durante la sincronización |