Menu
discountAutomaticFreeShippingCreate
Creates automatic free shipping discounts that apply to qualifying orders without requiring discount codes.
Use it in a workflow
- Add a step and choose the Shopify connector.
- Pick the discountAutomaticFreeShippingCreate action (under Discount).
- Fill in the fields below, then reference the result from later steps as
{{discountautomaticfreeshippingcreate.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.
mutation DiscountAutomaticFreeShippingCreate($freeShippingAutomaticDiscount: DiscountAutomaticFreeShippingInput!) {
discountAutomaticFreeShippingCreate(
freeShippingAutomaticDiscount: $freeShippingAutomaticDiscount
) {
automaticDiscountNode {
automaticDiscount
id
}
userErrors {
code
extraInfo
field
message
}
}
}
Variables
Pass these as a JSON object in the step's Variables field.
{
"freeShippingAutomaticDiscount": {
"title": "string",
"startsAt": "string",
"endsAt": "string",
"context": {
"all": "ALL",
"customers": {
"add": "string",
"remove": "string"
},
"customerSegments": {
"add": "string",
"remove": "string"
},
"markets": {
"add": "string",
"remove": "string"
}
},
"combinesWith": {
"productDiscounts": false,
"orderDiscounts": false,
"shippingDiscounts": false,
"productDiscountsWithTagsOnSameCartLine": {
"add": "string",
"remove": "string"
}
},
"tags": [
"string"
],
"minimumRequirement": {
"quantity": {
"greaterThanOrEqualToQuantity": "string"
},
"subtotal": {
"greaterThanOrEqualToSubtotal": "string"
}
},
"destination": {
"all": false,
"countries": {
"add": "string",
"remove": "string",
"includeRestOfWorld": "string"
}
},
"maximumShippingPrice": "string",
"appliesOnOneTimePurchase": false,
"appliesOnSubscription": false,
"recurringCycleLimit": 0
}
}
Response
Read the result with {{discountautomaticfreeshippingcreate.response.data.data.discountAutomaticFreeShippingCreate}}. If the API returns errors, the step fails and they are at {{discountautomaticfreeshippingcreate.response.data.errors}}.
Need more? See the Shopify guide for connection setup and behaviour shared by every action.
Was this page helpful?