Skip to main content

Linnworks Product Variant Inventory From iPaaS.com

Map product variant inventory from iPaaS.com to Linnworks

Updated today

Overview

When a Product Variant 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 Variant Inventory Add and Product Variant Inventory Update are the only active mappings for Linnworks Product Variant Inventory sync from iPaaS.

Supported Product Variant Inventory Add/Update Collections From iPaaS.com

  • Product Variant Inventory Add From iPaaS

  • Product Variant Inventory Update From iPaaS

Id Format

When manually transferring Product Variant Inventory from iPaaS.com, you need to enter the valid iPaaS.com Product Variant Inventory ID (internal ID) into the iPaaS.com input field on the iPaaS.com manual sync page. For example, use: 176900|22710.

Mappings

Product Variant Inventory Add From iPaaS

Mapping Filter

string locationName = await ConvertIPaaSLocationIdToLinnworksLocationNameAsync(LocationId);
string linnworksLocationId = await GetLinnworksLocationIdByNameAsync(locationName);
if(string.IsNullOrWhiteSpace(linnworksLocationId))
{
return false;
}
return true;

Description

To obtain the Linnworks LocationId, we first need the Linnworks location name. Because the Product Variant 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 Variant Inventory record.

Mapping Type

Source Field (iPaaS.com)

Destination Field (Linnworks)

Description

Dynamic Formula

return await ConvertIPaaSProductVariantParentIdToSKUAsync(ParentId);

SKU

Required: The Product Variant 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

string locationName = await ConvertIPaaSLocationIdToLinnworksLocationNameAsync(LocationId); return await GetLinnworksLocationIdByNameAsync(locationName);

LocationId

Required: To obtain the Linnworks LocationId, we first need the Linnworks location name. Because the Product Variant 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 Variant Inventory", SpaceportSystemId);
string[] externalIdSplit = inventoryExternalId?.Split('|');
if(string.IsNullOrWhiteSpace(linnworksLocationId) ZZ_BAR_ZZZZ_BAR_ZZ string.IsNullOrWhiteSpace(inventoryExternalId))
{
return false;
}
else if (QtyOnHand <= 0 && (externalIdSplit.Length < 2 ZZ_BAR_ZZZZ_BAR_ZZ externalIdSplit[1] != linnworksLocationId))
{
return false;
}
else
{
return true;
}

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 Variant 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

return await ConvertIPaaSProductVariantParentIdToSKUAsync(ParentId);

SKU

Required: The Product Variant 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

string locationName = await ConvertIPaaSLocationIdToLinnworksLocationNameAsync(LocationId); return await GetLinnworksLocationIdByNameAsync(locationName);

LocationId

Required: To obtain the Linnworks LocationId, we first need the Linnworks location name. Because the Product Variant 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 Variant 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 Variant 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 Variant 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.

Did this answer your question?