younifyd
Menu

draftOrderBulkDelete

Deletes multiple draft orders.

Use it in a workflow

  1. Add a step and choose the Shopify connector.
  2. Pick the draftOrderBulkDelete action (under Draft).
  3. Fill in the fields below, then reference the result from later steps as {{draftorderbulkdelete.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 DraftOrderBulkDelete($search: String, $savedSearchId: ID, $ids: [ID!]) {
  draftOrderBulkDelete(search: $search, savedSearchId: $savedSearchId, ids: $ids) {
    job {
      done
      id
      query {
        appDiscountTypes
        availableBackupRegions
        availableCarrierServices
        availableLocales
        backupRegion
        businessEntities
        catalogOperations
        collectionConditionMetafieldDefinitions
        collectionRulesConditions
        consentPolicyRegions
        currentAppInstallation
        currentStaffMember
        deliveryPromiseSettings
        financeAppAccessPolicy
        financeKycInformation
        fulfillmentConstraintRules
        giftCardConfiguration
        inventoryProperties
        locationsAvailableForDeliveryProfiles
        metafieldDefinitionTypes
        onlineStore
        pendingOrdersCount
        primaryMarket
        privacySettings
        publicApiVersions
        serverPixel
        shop
        shopBillingPreferences
        shopifyPaymentsAccount
        storeCreditConfiguration
        taxonomy
      }
    }
    userErrors {
      field
      message
    }
  }
}

Variables

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

searchstring

The conditions for filtering draft orders on. See the detailed [search syntax](https://shopify.dev/api/usage/search-syntax).

savedSearchIdstring

The ID of the draft order saved search for filtering draft orders on.

idsarray<string>

The IDs of the draft orders to delete.

json
{
  "search": "string",
  "savedSearchId": "string",
  "ids": [
    "string"
  ]
}

Response

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

jobobject
doneboolean
idstring
queryobject31 fields
userErrorsarray<object>
fieldobject
messageobject

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

draftOrderBulkDelete — Shopify — Documentation