Summary
When a Product Inventory is added or updated in iPaaS.com, the corresponding Stock level is created or updated in Linnworks.
Mapping Collection Status
Enabled
Duplicate or Conflicting Collections
Product Inventory Add and Product Inventory Update are the only active mappings for Linnworks Product Inventory sync from iPaaS.
Supported Product Inventory Add/Update Collections From iPaaS.com.
Product Inventory Add From iPaaS
Product Inventory Update From iPaaS
Id Format
When manually transferring Product Inventory from iPaaS.com, you need to enter the valid iPaaS.com Product Inventory ID (internal ID) into input field on the iPaaS.com manual sync page. For example, use: 176900|22710
Mappings
Product Inventory Add From iPaaS
Mapping Filter
string locationName = await ConvertIPaaSLocationIdToLinnworksLocationNameAsync(LocationId);
string linnworksLocationId = await GetLinnworksLocationIdByNameAsync(locationName);
if(string.IsNullOrWhiteSpace(linnworksLocationId))
{
return false;
}
return true;
Filter Description: To obtain the Linnworks LocationId, we first need the Linnworks location name. Because the Product Inventory model does not provide the location name directly, we use the iPaaS LocationId to resolve it to the Linnworks location name. We then use that name to look up the corresponding LocationId in Linnworks. If no matching Linnworks LocationId is found, the process is terminated. Otherwise, we continue with creating the Product Inventory record.
Mapping Type | Source Field (iPaaS.com) | Destination Field (Linnworks) | Description |
Dynamic Formula |
| SKU | Required: The Product Inventory model does not provide the SKU directly. To obtain it, we use the ParentId value and resolve it to the corresponding SKU. |
Dynamic Formula |
| LocationId | Required: To obtain the Linnworks LocationId, we first need the Linnworks location name. Because the Product Inventory model does not provide the location name directly, we use the iPaaS LocationId to resolve it to the Linnworks location name. We then use that name to look up the corresponding LocationId in Linnworks. |
Field | QtyOnHand | Level | Required: This is the value Linnworks stock level will be set to. |
Product Inventory Update From iPaaS
Mapping Filter
string locationName = await ConvertIPaaSLocationIdToLinnworksLocationNameAsync(LocationId);
string linnworksLocationId = await GetLinnworksLocationIdByNameAsync(locationName);
string inventoryExternalId = await GetExternalIdAsync(Id, "Product Inventory", SpaceportSystemId);
string[] externalIdSplit = inventoryExternalId?.Split('|');
if(string.IsNullOrWhiteSpace(linnworksLocationId) || string.IsNullOrWhiteSpace(inventoryExternalId))
{
return false;
}
else if (QtyOnHand <= 0 && (externalIdSplit.Length < 2 || externalIdSplit[1] != linnworksLocationId))
{
return false;
}
else
{
return true;
}
Filter Description: First, resolve the Linnworks LocationId from the iPaaS LocationId. Using await ConvertIPaaSLocationIdToLinnworksLocationNameAsync(LocationId), we obtain the Linnworks location name and then call await GetLinnworksLocationIdByNameAsync(locationName) to retrieve the corresponding Linnworks LocationId.
Next, we retrieve the Product Inventory external ID via:
await GetExternalIdAsync(Id, "Product Inventory", SpaceportSystemId);
The external ID is expected to be in the format StockItemId|LinnworksLocationId. We split this value by the pipe (|) and use the second element as the stored Linnworks LocationId.
The update is only allowed if both the resolved Linnworks LocationId and the external ID are present. When QtyOnHand <= 0, we additionally verify that the LinnworksLocationId from the external ID matches the current resolved Linnworks LocationId. If the IDs are missing, the external ID is malformed, or the locations donβt match while QtyOnHand <= 0, the process is not allowed to continue. This ensures we do not execute an update when the location has changed and a zero quantity is being sent.
Mapping Type | Source Field (iPaaS.com) | Destination Field (Linnworks) | Description |
Dynamic Formula |
| SKU | Required: The Product Inventory model does not provide the SKU directly. To obtain it, we use the ParentId value and resolve it to the corresponding SKU. |
Dynamic Formula |
| LocationId | Required: To obtain the Linnworks LocationId, we first need the Linnworks location name. Because the Product Inventory model does not provide the location name directly, we use the iPaaS LocationId to resolve it to the Linnworks location name. We then use that name to look up the corresponding LocationId in Linnworks. |
Field | QtyOnHand | Level | Required: This is the value Linnworks stock level will be set to. |
Error Handling
Collection: Product Inventory From iPaaS Create or Update
Empty SKU or LocationId or QtyOnHand.
Description: SKU, LocationId, and Level are required to properly create inventory and must not be null or empty.
Resolution: Ensure all three values are populated in iPaaS when creating or updating Product Inventory from iPaaS.
Unexpected API response.
Description: Unexpected response from API. StockItemId and StockLocationId were either not returned, or we were unable to extract them from the API response.
Resolution: Reach out to iPaaS support Most likely Linnworks changed the endpoint response structure.
Testing & Validation
Test Scenarios
Valid Product Inventory with required fields populated β Syncs successfully.
Missing SKU or LocationId or QtyOnHand β Error logged, no sync.
Validation Checklist
SKU, LocationId, and QtyOnHand must not be null.
Mapping filters for create and update should be implemented as explained.
