younifyd
Menu

inventorySetQuantities

Set on-hand / available inventory to absolute values at one or more locations.

Use it in a workflow

  1. Add a step and choose the Shopify connector.
  2. Pick the inventorySetQuantities action (under Inventory).
  3. Fill in the fields below, then reference the result from later steps as {{inventorysetquantities.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 InventorySetQuantities($input: InventorySetQuantitiesInput!) {
  inventorySetQuantities(input: $input) {
    inventoryAdjustmentGroup {
      app {
        apiKey
        appStoreAppUrl
        appStoreDeveloperUrl
        availableAccessScopes
        banner
        description
        developerName
        developerType
        developerUrl
        embedded
        failedRequirements
        features
        feedback
        handle
        icon
        id
        installUrl
        installation
        isPostPurchaseAppInUse
        launchUrl
        navigationItems
        optionalAccessScopes
        previouslyInstalled
        pricingDetails
        pricingDetailsSummary
        privacyPolicyUrl
        publicCategory
        published
        requestedAccessScopes
        screenshots
        shopifyDeveloped
        title
        uninstallMessage
        uninstallUrl
        webhookApiVersion
      }
      createdAt
      id
      reason
      referenceDocumentUri
      staffMember {
        accountType
        active
        email
        exists
        firstName
        id
        initials
        isShopOwner
        lastName
        locale
        name
        phone
        privateData
      }
    }
    userErrors {
      code
      field
      message
    }
  }
}

Variables

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

inputobjectrequired

The information required to set inventory quantities.

reasonstringrequired
namestringrequired
referenceDocumentUristring
quantitiesarray<object>required4 fields
json
{
  "input": {
    "reason": "string",
    "name": "string",
    "quantities": [
      {
        "inventoryItemId": "string",
        "locationId": "string",
        "quantity": "string",
        "changeFromQuantity": "string"
      }
    ],
    "referenceDocumentUri": "string"
  }
}

Response

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

inventoryAdjustmentGroupobject
appobject35 fields
createdAtstring
idstring
reasonstring
referenceDocumentUristring
staffMemberobject13 fields
userErrorsarray<object>
codeobject
fieldobject
messageobject

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

inventorySetQuantities — Shopify — Documentation