Hemi Connectors / Fuse5 Technical Scope / Fuse5 Get Stock

Fuse5 Get Stock

Version Date Created / Updated Notes
v1.0 03.04.2025 Bogomil Pavlov First publish

The get stock simply is a request which generate a URL to a csv file which we need to import in MCP. File should be processed automatically by this functionality following standard Stock concepts in MCP - if SKU doesn’t exist don’t import in Product Location Quantities, If quantity value is changed and we update the record - date_created should be updated for sure, If quantity hasn’t changed don’t update the record. More on the flow and details below

Get Stock

The first run of the cron should get all stock levels and we do not want to specify changedsince identifier in MM-DD-YYYY HH:MM:SS format. If we have a record in last_date_run for the cron we want to overlap with 30mins.

API Docs : https://greenteam.fuse5live.com/f5apidoc/standalone/#api-Product-Export_All_Products

API Call : product/export

Sample Request:

{
   "authenticate":{
       "apikey":"API KEY"
   },
   "services":[
         {
             "call":"product/export",
             "params": ["line_code","product_number","unit_barcode","location_name","all_location_total_available"],
             "identifier":{"location_name":"Fiji","changedsince":"09-30-2015 16:20:59"}
         }
    ]

}

Request Mapping: identifier > location_name - This will be a list of our Fuse5 Connector > Fuse5 Locations. We need to make a call per each mapped Location in the Connector identifier > changedsince - This will be picked from last_date_run params - we want to always use the parameters from the sample request

Sample Response:

{
  authenticate: {
     "apikey":"API KEY",
     status: "success"
  },
  services: [
     {
        request: {
           call: "product/export",
           params: null,
           identifier: null    
        },
        response: {
           status: true,
           msg: {
              code: "M003",
              msg: "Data retrieved successfully"
           },
           data: "https://test.test.com/properties/dev/exports/files/products_20150225_104658am.csv"
        }
     }
  ]
}

From the response we want to use the generated .csv file form the data and import it in MCP.

Sample File:

products_20250427_020536pm.csv

Sample File Mapping (please note not all columns from the CSV are mapped):

File Header Hemi Field Comment
line_code Products Location Quantities > Product Identifier Based on the Fuse5 Connector > SKU Delimiter we will generate the SKU like line_code[delimeter]product_number
product_number Products Location Quantities > Product Identifier Based on the Fuse5 Connector > SKU Delimiter we will generate the SKU like line_code[delimeter]product_number
unit_barcode N/A
location_name N/A
all_location_total_available Products Location Quantity > Quantity

Please note when we are importing the quantities in Hemi we want to have the following logic for picking the Location.

  • We should pick each Fuse5 connector location separately and pull down the information and import in the mapped MCP location
  • It should have nothing to do with Channel, everything should go through the Connector only itself. If no Location is set script should log an error and stop. Script should run through every mapped location. If a location is a problem then we should finish with it and move to the next location

We want to update the quantity only if there is a difference.

Is this article helpful?
0 0 0