Saltar al contenido principal

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
}
CampoTipoRequeridoDescripción
enabledboolNoActivar/desactivar
flavorstringVariante de SAP: b1 (Business One) o s4 (S/4HANA)
base_urlstringURL base de la API de SAP
company_dbstringNoBase de datos de la compañía (B1)
usernamestringUsuario de SAP
passwordstringContraseña
sync_ordersboolNoSincronizar órdenes como documentos de venta
sync_productsboolNoSincronizar productos como artículos
sync_contactsboolNoSincronizar 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

OmniBuySAP B1SAP S/4Dirección
OrderSales OrderSales OrderOmniBuy → SAP
ProductItemMaterialBidireccional
CustomerBusiness PartnerBusiness PartnerBidireccional

Errores

CódigoDescripción
SAP_NOT_CONFIGUREDSAP no configurado
SAP_CONNECTION_FAILEDNo se pudo conectar con SAP
SYNC_FAILEDError durante la sincronización