younifyd
Menu

discountAutomaticDelete

Deletes an existing automatic discount from the store, permanently removing it from all future order calculations.

Use it in a workflow

  1. Add a step and choose the Shopify connector.
  2. Pick the discountAutomaticDelete action (under Discount).
  3. Fill in the fields below, then reference the result from later steps as {{discountautomaticdelete.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 DiscountAutomaticDelete($id: ID!) {
  discountAutomaticDelete(id: $id) {
    deletedAutomaticDiscountId
    userErrors {
      code
      extraInfo
      field
      message
    }
  }
}

Variables

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

idstringrequired

The ID of the automatic discount to delete.

json
{
  "id": "string"
}

Response

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

deletedAutomaticDiscountIdstring
userErrorsarray<object>
codeobject
extraInfoobject
fieldobject
messageobject

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

discountAutomaticDelete — Shopify — Documentation