Actions36
- 📦 Producto Actions
- 📊 Stock Actions
- 📋 Movimiento Actions
- 🛒 Venta Actions
- 📥 Recepción Actions
- 📥 Borrador Recepción (n8n) Actions
- 📝 Borrador (texto) Actions
- 🤖 Propuesta IA Actions
- 🏭 Bodega Actions
- 👤 Cliente Actions
- 📚 Catálogo Actions
- 📰 Reportes (legacy) Actions
📦 Producto → Crear o Actualizar (Upsert)
AI-generatedSummary
Creates or updates a product in the Ditextil inventory API: searches for an existing product by SKU, barcode, or name, then PATCHes it if found or POSTs a new one if not.
Inputs
- matchingKey (required) — Field used to find an existing product: SKU, Código de Barras, or Nombre. The matching value is taken from the corresponding field below (sku, barcode, or productName). If that value is empty, the item fails with an error.
- productName (required) — Product name. Used as the match value when the key is Nombre, as the name for a new product, and as a fallback name on update.
- productNameUpdate — New name applied when updating an existing product. Takes precedence over Nombre on update.
- sku — Product SKU. It is the match value when the key is SKU.
- barcode — Barcode. It is the match value when the key is Código de Barras.
- categoryName / supplierName / categoryId / supplierId — Category and supplier, given by name or by ID (ID dropdowns load from the API).
- systemName, matcherCode, matcherType, description, colorFamily, whatsappName — Optional descriptive and matching text fields.
- productStatus / catalogStatus — Estado (active, inactive, draft) and Estado Catálogo (no change, active, inactive). Both are shown in the UI, but the upsert request body does not send them.
- salesPrice, costPrice, metersPerRoll, minStock, maxStock, locationGrid, odooId — Pricing, roll length (default 30), stock limits, physical location, and Odoo ID. Empty strings and zero Odoo IDs are omitted. Numeric defaults such as 0 are still sent.
- originalImageUrl / catalogImageUrl — Image URLs. Google Drive share links are normalized to https://drive.google.com/uc?id=…
- fields — Comma-separated list of fields to return. Sent to the API and also applied client-side to filter the response.
Output shape
One item per input item, containing the product record returned by the API after the create (POST) or update (PATCH).
The lookup is a GET /api/products?q=
. It picks the first result whose chosen field matches exactly, ignoring case. Otherwise a new product is created. Empty string and null values are dropped from the body. If 'fields' is set, only those keys are kept. With Continue On Fail enabled, failed items return {error: message}. The response does not say whether the product was created or updated.
Examples
Example 1: Sync products from a spreadsheet by SKU
matchingKey=sku; sku, productName, salesPrice, costPrice mapped from the row; fields='id,name,sku'.
Example 2: Update prices for items identified by barcode
matchingKey=barcode; barcode and productName set; salesPrice set to the new price.