Integración Shopify → SAP Business One (snobbycl y on-chile)
Pipeline de integración de órdenes de Shopify a SAP Service Layer:
Invoice de reserva, pago con tarjeta o transferencia por transacción,
solicitud de traslado, traslado de stock y entrega.
- Invoice igual a lo cobrado; fulfillments limitados a lo facturado
- Estados terminales integrated, timeout, ignored y cancelled
- Idempotencia contra SAP: adopta documentos existentes en vez de duplicar
- Reintentos de red en el cliente de Shopify
- Secretos fuera de los JSON de tienda (${VARIABLE} resuelta desde .env)
- Herramientas de consulta, integración puntual y carga de pruebas
- Documentación en docs/ (flujo, casos especiales, mapeo, configuración)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
901dd8763d
47 files changed
+4709
No files matched your search
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"store_code": "TIENDA1",
|
||||
"shopify": {
|
||||
"api_id": "TODO",
|
||||
"store": "TODO-nombre-de-la-tienda-myshopify",
|
||||
"api_version": "2026-07",
|
||||
"access_token": "${TIENDA1_SHOPIFY_ACCESS_TOKEN}",
|
||||
"page_limit": 50,
|
||||
"initial_since_id": "TODO-id-de-orden-desde-el-que-se-integra (piso del cursor: max(id en BD, este valor))"
|
||||
},
|
||||
"sap_connection": {
|
||||
"url": "https://TODO-servidor:50000/b1s/v1",
|
||||
"company_db": "TODO-SBO_COMPANYDB",
|
||||
"username": "TODO",
|
||||
"password": "${TIENDA1_SAP_PASSWORD}",
|
||||
"timeout": 15,
|
||||
"verify_ssl": false
|
||||
},
|
||||
"sap": {
|
||||
"default_warehouse_invoice": "TODO-bodega-virtual-de-esta-tienda",
|
||||
"generic_card_code": "TODO-CardCode-generico-si-el-RUT-no-es-valido",
|
||||
"numbering_series": {
|
||||
"INVOICE": null,
|
||||
"INCOMING_PAYMENT": null,
|
||||
"INVENTORY_TRANSFER_REQUEST": null,
|
||||
"STOCK_TRANSFER": null,
|
||||
"DELIVERY": null
|
||||
},
|
||||
"locations": {
|
||||
"TODO-location_id-de-shopify": {
|
||||
"is_store": true,
|
||||
"warehouse_code": "TODO-bodega-SAP-de-esa-tienda-fisica"
|
||||
},
|
||||
"TODO-location_id-del-CD": {
|
||||
"is_store": false,
|
||||
"warehouse_code": "TODO-bodega-SAP-del-CD"
|
||||
}
|
||||
},
|
||||
"payment_methods": {
|
||||
"TODO-nombre-exacto-del-gateway-en-Shopify": {
|
||||
"type": "credit_card",
|
||||
"credit_card": 0,
|
||||
"split_payment": true,
|
||||
"num_of_payments": 1
|
||||
},
|
||||
"TODO-gateway-por-transferencia": {
|
||||
"type": "transfer",
|
||||
"transfer_account": "TODO-cuenta-contable"
|
||||
}
|
||||
}
|
||||
},
|
||||
"timeout_days": 30,
|
||||
"max_orders_per_cycle": 50
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
{
|
||||
"store_code": "on-chile-distributor-prod",
|
||||
"shopify": {
|
||||
"api_id": "5541a00589b2b1b40afb62433f385891",
|
||||
"store": "on-chile-distributor-prod",
|
||||
"api_version": "2026-07",
|
||||
"access_token": "${ON_CHILE_SHOPIFY_ACCESS_TOKEN}",
|
||||
"page_limit": 50,
|
||||
"initial_since_id": "8103221690695"
|
||||
},
|
||||
"sap_connection": {
|
||||
"url": "https://sap10:50000/b1s/v1",
|
||||
"company_db": "SBODemoCL",
|
||||
"username": "manager",
|
||||
"password": "${ON_CHILE_SAP_PASSWORD}",
|
||||
"timeout": 30,
|
||||
"verify_ssl": false
|
||||
},
|
||||
"sap": {
|
||||
"default_warehouse_invoice": "9902",
|
||||
"generic_card_code": "C99998",
|
||||
"numbering_series": {
|
||||
"INVOICE": 1,
|
||||
"INCOMING_PAYMENT": 18,
|
||||
"INVENTORY_TRANSFER_REQUEST": 51,
|
||||
"STOCK_TRANSFER": 24,
|
||||
"DELIVERY": 8
|
||||
},
|
||||
"locations": {
|
||||
"102370836807": {
|
||||
"name": "On Parque Arauco",
|
||||
"is_store": true,
|
||||
"warehouse_code": "8803"
|
||||
},
|
||||
"101564121415": {
|
||||
"name": "Geodis",
|
||||
"is_store": false,
|
||||
"warehouse_code": "7702"
|
||||
}
|
||||
},
|
||||
"payment_methods": {
|
||||
"Transbank Webpay": {
|
||||
"type": "credit_card",
|
||||
"credit_card": 4,
|
||||
"split_payment": true,
|
||||
"num_of_payments": 1
|
||||
},
|
||||
"Transbank": {
|
||||
"type": "credit_card",
|
||||
"credit_card": 4,
|
||||
"split_payment": true,
|
||||
"num_of_payments": 1
|
||||
},
|
||||
"Checkout Mercado Pago": {
|
||||
"type": "credit_card",
|
||||
"credit_card": 5,
|
||||
"split_payment": true,
|
||||
"num_of_payments": 1
|
||||
},
|
||||
"VentiPay": {
|
||||
"type": "credit_card",
|
||||
"credit_card": 6,
|
||||
"split_payment": true,
|
||||
"num_of_payments": 1
|
||||
},
|
||||
"Venti": {
|
||||
"type": "credit_card",
|
||||
"credit_card": 6,
|
||||
"split_payment": true,
|
||||
"num_of_payments": 1
|
||||
},
|
||||
"Fintoc": {
|
||||
"type": "credit_card",
|
||||
"credit_card": 7,
|
||||
"split_payment": true,
|
||||
"num_of_payments": 1
|
||||
},
|
||||
"Mercado Pago Tarjetas": {
|
||||
"type": "credit_card",
|
||||
"credit_card": 8,
|
||||
"split_payment": true,
|
||||
"num_of_payments": 1
|
||||
},
|
||||
"PayPal": {
|
||||
"type": "credit_card",
|
||||
"credit_card": 9,
|
||||
"split_payment": true,
|
||||
"num_of_payments": 1
|
||||
},
|
||||
"Mercado Pago Checkout Pro": {
|
||||
"type": "credit_card",
|
||||
"credit_card": 10,
|
||||
"split_payment": true,
|
||||
"num_of_payments": 1
|
||||
},
|
||||
"reversso": {
|
||||
"type": "transfer",
|
||||
"transfer_account": "1-1-010-20-000"
|
||||
}
|
||||
}
|
||||
},
|
||||
"timeout_days": 60,
|
||||
"max_orders_per_cycle": 50
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
{
|
||||
"store_code": "snobbycl",
|
||||
"shopify": {
|
||||
"api_id": "34936c643039076a0008433c3283e98a",
|
||||
"store": "snobbycl",
|
||||
"api_version": "2026-07",
|
||||
"access_token": "${SNOBBYCL_SHOPIFY_ACCESS_TOKEN}",
|
||||
"page_limit": 50,
|
||||
"initial_since_id": "7425850048790"
|
||||
},
|
||||
"sap_connection": {
|
||||
"url": "https://sap10:50000/b1s/v1",
|
||||
"company_db": "SBODemoCL",
|
||||
"username": "manager",
|
||||
"password": "${SNOBBYCL_SAP_PASSWORD}",
|
||||
"timeout": 30,
|
||||
"verify_ssl": false
|
||||
},
|
||||
"sap": {
|
||||
"default_warehouse_invoice": "9901",
|
||||
"generic_card_code": "C99998",
|
||||
"numbering_series": {
|
||||
"INVOICE": 1,
|
||||
"INCOMING_PAYMENT": 18,
|
||||
"INVENTORY_TRANSFER_REQUEST": 51,
|
||||
"STOCK_TRANSFER": 24,
|
||||
"DELIVERY": 8
|
||||
},
|
||||
"locations": {
|
||||
"113688871190": {
|
||||
"name": "Geodis",
|
||||
"is_store": false,
|
||||
"warehouse_code": "7701"
|
||||
},
|
||||
"90870743318": {
|
||||
"name": "Snobby Casa Costanera",
|
||||
"is_store": true,
|
||||
"warehouse_code": "8801"
|
||||
},
|
||||
"115304300822": {
|
||||
"name": "Snobby Cenco Costanera",
|
||||
"is_store": true,
|
||||
"warehouse_code": "8802"
|
||||
}
|
||||
},
|
||||
"payment_methods": {
|
||||
"Transbank Webpay": {
|
||||
"type": "credit_card",
|
||||
"credit_card": 4,
|
||||
"split_payment": true,
|
||||
"num_of_payments": 1
|
||||
},
|
||||
"Checkout Mercado Pago": {
|
||||
"type": "credit_card",
|
||||
"credit_card": 5,
|
||||
"split_payment": true,
|
||||
"num_of_payments": 1
|
||||
},
|
||||
"VentiPay": {
|
||||
"type": "credit_card",
|
||||
"credit_card": 6,
|
||||
"split_payment": true,
|
||||
"num_of_payments": 1
|
||||
},
|
||||
"Fintoc": {
|
||||
"type": "credit_card",
|
||||
"credit_card": 7,
|
||||
"split_payment": true,
|
||||
"num_of_payments": 1
|
||||
},
|
||||
"Mercado Pago Tarjetas": {
|
||||
"type": "credit_card",
|
||||
"credit_card": 8,
|
||||
"split_payment": true,
|
||||
"num_of_payments": 1
|
||||
},
|
||||
"PayPal": {
|
||||
"type": "credit_card",
|
||||
"credit_card": 9,
|
||||
"split_payment": true,
|
||||
"num_of_payments": 1
|
||||
},
|
||||
"Mercado Pago Checkout Pro": {
|
||||
"type": "credit_card",
|
||||
"credit_card": 10,
|
||||
"split_payment": true,
|
||||
"num_of_payments": 1
|
||||
},
|
||||
"reversso": {
|
||||
"type": "transfer",
|
||||
"transfer_account": "1-1-010-20-000"
|
||||
}
|
||||
}
|
||||
},
|
||||
"timeout_days": 60,
|
||||
"max_orders_per_cycle": 50
|
||||
}
|
||||
Reference in new issue
Block a user