Skip to content

Inventory Upsert

Standard model for recording and updating inventory in Fracttal ETL.


General information:

Module Category
Inventory Update and Insertion

Molecule details

Input parameters:

  • code : str, required

Input schema:

Field Type Required Description Default value Examples
code str Unique inventory code. PydanticUndefined INV001, ITM-12345
id_type_item Optional[str] Type of asset/inventory. None 1, 2
field_1 str Name or main description of the inventory. PydanticUndefined Repuesto A, Material B
field_2 Optional[str] Additional field 2. None Marca X, Categoría Y
field_3 Optional[str] Additional field 3. None Modelo Y, Tipo Z
field_4 Optional[str] Additional field 4. None Serial Z, Versión 1.0
field_5 Optional[str] Additional field 5. None Estado Nuevo, Condición Usado
field_6 Optional[str] Additional field 6. None País Chile, Origen USA
active Optional[bool] Indicates whether the asset is active or not. None -
barcode Optional[str] Inventory barcode. None 1234567890, 0987654321
notes Optional[str] Notes or comments. None Inventario en almacén principal, Requiere revisión periódica
weight Optional[str] Asset weight (for spare parts and tools only) None -
purchase_date Optional[str] Purchase date. None -
is_serial_control Optional[bool] true if the item is controlled by serial, false otherwise. None -
group Optional[str] Asset type. None -
group_1 Optional[str] Classification 1. None -
group_2 Optional[str] Classification 2. None -
priorities Optional[str] Description of priority. None -
id_priority Optional[Priority] Priority ID: 1: Very High, 2: High, 3: Medium, 4: Low, 5: Very Low None -
code_parent_location Optional[str] Parent location code. None ACT.LOC-008, LOC-123
latitude Optional[str] Latitude. None -
longitud Optional[str] Length. None -
unit_code Optional[str] Unit code. None U001, KG
unit_description Optional[str] Description of the unit. None Unidad estándar, Kilogramos
visible_to_all Optional[bool] Global visibility. None True, False
total_cost Optional[str] Total cost of the asset. None -
startup_date Optional[str] Start date for depreciation. None -
costs_center Optional[str] Description of the cost center. None -
budgets Optional[str] Total cost of straight-line depreciation. None -
id_custom_field_group Optional[int] Custom field group id. None -
hours_average_daily_use Optional[int] Average daily usage hours (seconds, between 0 and 86400) None -
equivalence Optional[str] Inventory equivalence code. None EQ-98765, EQ-001
location Optional[str] Physical location within the warehouse. None Estante 5, Zona A
max_stock_level Optional[str] Maximum stock allowed. None 500, 1000
min_stock_level Optional[str] Minimum stock allowed. None 10, 20
stock Optional[str] Quantity of stock available. 0 100, 250
unit_cost_stock Optional[str] Unit cost of stock. None 50.00, 75.25

Usage example:

{
  "code": "testCode",
  "equivalence": "test",
  "id_type_item": "4",
  "field_1": "Repuesto A",
  "field_2": "Marca X",
  "field_3": "Modelo Y",
  "field_4": "Serial Z",
  "field_5": "Estado Nuevo",
  "field_6": "País Chile",
  "barcode": "1234567890",
  "notes": "Inventarimo en almacén principal",
  "location": "Estante 5",
  "max_stock_level": "500",
  "min_stock_level": "10",
  "stock": "100",
  "unit_cost_stock": "50.00",
  "unit_code": "U001",
  "unit_description": "Unidad estándar",
  "visible_to_all": true,
  "code_parent_location": "ACT.LOC-008",
  "id_warehouse": 1,
  "code_warehouse": "WH-001"
}

Notes:

The required fields are code and field_1.