Menu
inventoryActivate
Activates an inventory item at a Location by creating an InventoryLevel that tracks stock quantities.
Use it in a workflow
- Add a step and choose the Shopify connector.
- Pick the inventoryActivate action (under Inventory).
- Fill in the fields below, then reference the result from later steps as
{{inventoryactivate.response.data}}.
Query
This is the mutation the action sends by default. Edit it in the step's Query field to change which fields come back.
mutation InventoryActivate($inventoryItemId: ID!, $locationId: ID!, $available: Int, $onHand: Int, $stockAtLegacyLocation: Boolean) {
inventoryActivate(
inventoryItemId: $inventoryItemId
locationId: $locationId
available: $available
onHand: $onHand
stockAtLegacyLocation: $stockAtLegacyLocation
) {
inventoryLevel {
canDeactivate
createdAt
deactivationAlert
id
isActive
item {
countryCodeOfOrigin
createdAt
duplicateSkuCount
harmonizedSystemCode
id
inventoryHistoryUrl
legacyResourceId
locationsCount
measurement
provinceCodeOfOrigin
requiresShipping
sku
tracked
trackedEditable
unitCost
updatedAt
variant
}
location {
activatable
address
addressVerified
createdAt
deactivatable
deactivatedAt
deletable
fulfillmentService
fulfillsOnlineOrders
hasActiveInventory
hasUnfulfilledOrders
id
isActive
isFulfillmentService
isPrimary
legacyResourceId
localPickupSettingsV2
name
shipsInventory
suggestedAddresses
updatedAt
}
updatedAt
}
userErrors {
field
message
}
}
}
Variables
Pass these as a JSON object in the step's Variables field.
{
"inventoryItemId": "string",
"locationId": "string",
"available": 0,
"onHand": 0,
"stockAtLegacyLocation": false
}
Response
Read the result with {{inventoryactivate.response.data.data.inventoryActivate}}. If the API returns errors, the step fails and they are at {{inventoryactivate.response.data.errors}}.
Need more? See the Shopify guide for connection setup and behaviour shared by every action.
Was this page helpful?