Menu
discountCodeFreeShippingUpdate
Updates a free shipping discount that's applied on a cart and at checkout when a customer enters a code.
Use it in a workflow
- Add a step and choose the Shopify connector.
- Pick the discountCodeFreeShippingUpdate action (under Discount).
- Fill in the fields below, then reference the result from later steps as
{{discountcodefreeshippingupdate.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 DiscountCodeFreeShippingUpdate($id: ID!, $freeShippingCodeDiscount: DiscountCodeFreeShippingInput!) {
discountCodeFreeShippingUpdate(
id: $id
freeShippingCodeDiscount: $freeShippingCodeDiscount
) {
codeDiscountNode {
codeDiscount
id
}
userErrors {
code
extraInfo
field
message
}
}
}
Variables
Pass these as a JSON object in the step's Variables field.
{
"id": "string",
"freeShippingCodeDiscount": {
"combinesWith": {
"productDiscounts": false,
"orderDiscounts": false,
"shippingDiscounts": false,
"productDiscountsWithTagsOnSameCartLine": {
"add": "string",
"remove": "string"
}
},
"title": "string",
"startsAt": "string",
"endsAt": "string",
"appliesOncePerCustomer": false,
"code": "string",
"customerSelection": {
"all": false,
"customers": {
"add": "string",
"remove": "string"
},
"customerSegments": {
"add": "string",
"remove": "string"
}
},
"usageLimit": 0,
"context": {
"all": "ALL",
"customers": {
"add": "string",
"remove": "string"
},
"customerSegments": {
"add": "string",
"remove": "string"
},
"markets": {
"add": "string",
"remove": "string"
}
},
"tags": [
"string"
],
"minimumRequirement": {
"quantity": {
"greaterThanOrEqualToQuantity": "string"
},
"subtotal": {
"greaterThanOrEqualToSubtotal": "string"
}
},
"destination": {
"all": false,
"countries": {
"add": "string",
"remove": "string",
"includeRestOfWorld": "string"
}
}
}
}
Response
Read the result with {{discountcodefreeshippingupdate.response.data.data.discountCodeFreeShippingUpdate}}. If the API returns errors, the step fails and they are at {{discountcodefreeshippingupdate.response.data.errors}}.
Need more? See the Shopify guide for connection setup and behaviour shared by every action.
Was this page helpful?