younifyd
Menu

discountAutomaticDeactivate

Deactivates an automatic discount.

Use it in a workflow

  1. Add a step and choose the Shopify connector.
  2. Pick the discountAutomaticDeactivate action (under Discount).
  3. Fill in the fields below, then reference the result from later steps as {{discountautomaticdeactivate.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 DiscountAutomaticDeactivate($id: ID!) {
  discountAutomaticDeactivate(id: $id) {
    automaticDiscountNode {
      automaticDiscount
      id
    }
    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 deactivate.

json
{
  "id": "string"
}

Response

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

automaticDiscountNodeobject
automaticDiscountobject30 fields

This field can return one of several different object shapes — properties from every possible shape are shown together.

idstring
userErrorsarray<object>
codeobject
extraInfoobject
fieldobject
messageobject

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

discountAutomaticDeactivate — Shopify — Documentation