Hemi Connectors / ItsPerfect Technical Scope / ItsPerfect Get Stock

ItsPerfect Get Stock

Summary of Changes: (The purpose of this table is to keep traceability and Product team to highlight the things that were changed into the scope, based on comments or discussions)

Version Date Created / Updated Notes
v1.0 N/A Hristiyan First publish

API Docs : https://www.itsperfect-solutions.com/api-v2/stock API Call : GET /api/v2/stock

We want to always get full stock updates and not params like updateTimeStamp.

We want to do internal validation and ONLY keep quantity for products that are already created in Hemi. We want to map the ID that has been selected in the ItsPerfect Connector Locations ****and make the call per ID so we can get the stock. We want to be using the parameter warehouseId for that.

ItsPerfect keeps the items on some internal ids and a barcode level which we keep as EAN in Hemi. So basically if there is a EAN match between the response of the ItsPerfect Get Stock and Product > EAN ****, we then create/update records in Location Quantities in Hemi.

Example response :

{
    "stock": [
        {
            "itemId": 385,
            "itemNumber": "38248U",
            "warehouses": [
                {
                    "warehouseId": 3,
                    "warehouse": "Warehow",
                    "colors": [
                        {
                            "colorId": 234,
                            "colorNumber": "35",
                            "color": "Marine Blue",
                            "sizes": [
                                {
                                    "sizeId": 60,
                                    "size": "30",
                                    "secondSize": "",
                                    "barcode": "8718192021544",
                                    "stock": "20",
                                    "virtualStockReservation": "0",
                                    "availableStock": 0,
                                    "economicalStock": 0
                                },
                                {
                                    "sizeId": 61,
                                    "size": "32",
                                    "secondSize": "",
                                    "barcode": "8718192021551",
                                    "stock": "20",
                                    "virtualStockReservation": "0",
                                    "availableStock": "20",
                                    "economicalStock": "20"
                                },
                                {
                                    "sizeId": 62,
                                    "size": "34",
                                    "secondSize": "",
                                    "barcode": "8718192021568",
                                    "stock": "20",
                                    "virtualStockReservation": "0",
                                    "availableStock": 0,
                                    "economicalStock": 0
                                },
                                {
                                    "sizeId": 63,
                                    "size": "36",
                                    "secondSize": "",
                                    "barcode": "8718192021575",
                                    "stock": "20",
                                    "virtualStockReservation": "0",
                                    "availableStock": "20",
                                    "economicalStock": "20"
                                },
                                {
                                    "sizeId": 64,
                                    "size": "38",
                                    "secondSize": "",
                                    "barcode": "8718192021582",
                                    "stock": "20",
                                    "virtualStockReservation": "0",
                                    "availableStock": "20",
                                    "economicalStock": "20"
                                },
                                {
                                    "sizeId": 65,
                                    "size": "40",
                                    "secondSize": "",
                                    "barcode": "8718192021599",
                                    "stock": "20",
                                    "virtualStockReservation": "0",
                                    "availableStock": "20",
                                    "economicalStock": "20"
                                },
                                {
                                    "sizeId": 66,
                                    "size": "42",
                                    "secondSize": "",
                                    "barcode": "8718192021605",
                                    "stock": "20",
                                    "virtualStockReservation": "0",
                                    "availableStock": "20",
                                    "economicalStock": "20"
                                },
                                {
                                    "sizeId": 67,
                                    "size": "44",
                                    "secondSize": "",
                                    "barcode": "8718192021612",
                                    "stock": "20",
                                    "virtualStockReservation": "0",
                                    "availableStock": "20",
                                    "economicalStock": "20"
                                },
                                {
                                    "sizeId": 68,
                                    "size": "46",
                                    "secondSize": "",
                                    "barcode": "8718192021629",
                                    "stock": "20",
                                    "virtualStockReservation": "0",
                                    "availableStock": "20",
                                    "economicalStock": "20"
                                },
                                {
                                    "sizeId": 69,
                                    "size": "48",
                                    "secondSize": "",
                                    "barcode": "8718192021636",
                                    "stock": "30",
                                    "virtualStockReservation": "0",
                                    "availableStock": "30",
                                    "economicalStock": "30"
                                }
                            ]
                        }
                    ]
                }
            ]
        }
    ]
}

Response Mapping :

ItsPerfect Field Hemi Mapping Notes
stock
itemId N/A
itemNumber N/A
warehouses
warehouseId N/A
warehouse N/A
colors
colorId N/A
colorNumber N/A
color N/A
sizes
sizeId N/A
size N/A
secondSize N/A
barcode Product > EAN We want to use the EAN from the payload and map with our Product > EAN so we can obtain the SKU (or SKUS) to use.

We already have the location in which we should be posting from the Location mapping from where we picked which Warehouse ID to call for With those two (SKU and Location) we are to update/create the record in Item Location Quantities | | | | | | stock | N/A | | | | | | | virtualStockReservation | N/A | | | | | | | availableStock | Location Quantities > Quantity | | | | | | | economicalStock | N/A | |

If there are EANS which do not match any of our Product > EAN we skip them.

History need to be incorporated and keep track of all stock changes in Item Location Quantity.

Is this article helpful?
0 0 0