younifyd
Menu

inventoryBulkToggleActivation

Activates or deactivates an inventory item at multiple locations. When you activate an InventoryItem at a Location, that location can stock and track quantities for that item.

Use it in a workflow

  1. Add a step and choose the Shopify connector.
  2. Pick the inventoryBulkToggleActivation action (under Inventory).
  3. Fill in the fields below, then reference the result from later steps as {{inventorybulktoggleactivation.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 InventoryBulkToggleActivation($inventoryItemId: ID!, $inventoryItemUpdates: [InventoryBulkToggleActivationInput!]!) {
  inventoryBulkToggleActivation(
    inventoryItemId: $inventoryItemId
    inventoryItemUpdates: $inventoryItemUpdates
  ) {
    inventoryItem {
      countryCodeOfOrigin
      createdAt
      duplicateSkuCount
      harmonizedSystemCode
      id
      inventoryHistoryUrl
      legacyResourceId
      locationsCount {
        count
        precision
      }
      measurement {
        id
        weight
      }
      provinceCodeOfOrigin
      requiresShipping
      sku
      tracked
      trackedEditable {
        locked
        reason
      }
      unitCost {
        amount
        currencyCode
      }
      updatedAt
      variant {
        availableForSale
        availablePublicationsCount
        barcode
        compareAtPrice
        createdAt
        defaultCursor
        deliveryProfile
        displayName
        id
        inventoryItem
        inventoryPolicy
        inventoryQuantity
        legacyResourceId
        position
        price
        product
        publishedOnCurrentChannel
        publishedOnCurrentPublication
        requiresComponents
        selectedOptions
        sellableOnlineQuantity
        sellingPlanGroupCount
        sellingPlanGroupsCount
        showUnitPrice
        sku
        storefrontId
        taxCode
        taxable
        title
        unitPrice
        unitPriceMeasurement
        updatedAt
      }
    }
    inventoryLevels {
      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 {
      code
      field
      message
    }
  }
}

Variables

Pass these as a JSON object in the step's Variables field.

inventoryItemIdstringrequired

The ID of the inventory item to modify the activation status locations for.

inventoryItemUpdatesarray<object>required

A list of pairs of locations and activate status to update for the specified inventory item.

locationIdstringrequired
activatebooleanrequired
json
{
  "inventoryItemId": "string",
  "inventoryItemUpdates": [
    {
      "locationId": "string",
      "activate": false
    }
  ]
}

Response

Read the result with {{inventorybulktoggleactivation.response.data.data.inventoryBulkToggleActivation}}. If the API returns errors, the step fails and they are at {{inventorybulktoggleactivation.response.data.errors}}.

inventoryItemobject
countryCodeOfOriginstring

One ofAFAXALDZADAOAIAGARAMAWACAUATAZBSBHBDBBBYBEBZBJBMBTBOBABWBVBRIOBNBGBFBIKHCACVBQKY

createdAtstring
duplicateSkuCountnumber
harmonizedSystemCodestring
idstring
inventoryHistoryUrlstring
legacyResourceIdstring
locationsCountobject2 fields
measurementobject2 fields
provinceCodeOfOriginstring
requiresShippingboolean
skustring
trackedboolean
trackedEditableobject2 fields
unitCostobject2 fields
updatedAtstring
variantobject32 fields
inventoryLevelsarray<object>
canDeactivateobject
createdAtobject
deactivationAlertobject
idobject
isActiveobject
itemobject
locationobject
updatedAtobject
userErrorsarray<object>
codeobject
fieldobject
messageobject

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

inventoryBulkToggleActivation — Shopify — Documentation