younifyd
Menu

inventoryActivate

Activates an inventory item at a Location by creating an InventoryLevel that tracks stock quantities.

Use it in a workflow

  1. Add a step and choose the Shopify connector.
  2. Pick the inventoryActivate action (under Inventory).
  3. 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.

graphql
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.

inventoryItemIdstringrequired

The ID of the inventory item to activate.

locationIdstringrequired

The ID of the location of the inventory item being activated.

availablenumber

The initial available quantity of the inventory item being activated at the location.

onHandnumber

The initial on_hand quantity of the inventory item being activated at the location.

stockAtLegacyLocationboolean

This argument is ignored and has no effect. Previously it allowed activation at or away from a fulfillment service location with SKU sharing off; all fulfillment services now permit SKU sharing.

json
{
  "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}}.

inventoryLevelobject
canDeactivateboolean
createdAtstring
deactivationAlertstring
idstring
isActiveboolean
itemobject17 fields
locationobject21 fields
updatedAtstring
userErrorsarray<object>
fieldobject
messageobject

Need more? See the Shopify guide for connection setup and behaviour shared by every action.