App reviews, troubleshooting, and recommendations
Hi,
We are trying to achieve a feature within our custom app where we can create and merge two coupons into one as some of the apps doing now. But we are not able to achieve that using API resources. Can you please more information when we're trying to get functionId using appDiscountTypes but we are getting an error in response Shop requires beta flag to access this.
Solved! Go to the solution
This is an accepted solution.
Helping Hand 🙂
I had found an alternate solution for this. where I use graphQL to generate draft orders and combine both codes in a single order.
Here is snippet:
mutation draftOrderCreate($input: DraftOrderInput!) {
draftOrderCreate(input: $input) {
draftOrder {
id
totalPrice
}
userErrors {
field
message
}
}
}
{
"input": {
"appliedDiscount": {
"amount": "1.00",
"description": "Coupon Combine APP",
"title": "IJ6H3azA4SVsIyX3FxzW + FhWzxd3kl0y5spnBGiTV",
"value": 0.80,
"valueType": "FIXED_AMOUNT"
},
"email": "sample@email.net",
"lineItems": [
{
"originalUnitPrice": "416.67",
"quantity": 1,
"requiresShipping": true,
"sku": "sku",
"taxable": true,
"title": "title",
"variantId": "gid://shopify/ProductVariant/xxxxxx"
}
],
"note": "",
"shippingLine": {
"price": "0.00",
"shippingRateHandle": "",
"title": "FREESHIP"
},
"useCustomerDefaultAddress": true
}
}
Have the same issue
This is an accepted solution.
Helping Hand 🙂
I had found an alternate solution for this. where I use graphQL to generate draft orders and combine both codes in a single order.
Here is snippet:
mutation draftOrderCreate($input: DraftOrderInput!) {
draftOrderCreate(input: $input) {
draftOrder {
id
totalPrice
}
userErrors {
field
message
}
}
}
{
"input": {
"appliedDiscount": {
"amount": "1.00",
"description": "Coupon Combine APP",
"title": "IJ6H3azA4SVsIyX3FxzW + FhWzxd3kl0y5spnBGiTV",
"value": 0.80,
"valueType": "FIXED_AMOUNT"
},
"email": "sample@email.net",
"lineItems": [
{
"originalUnitPrice": "416.67",
"quantity": 1,
"requiresShipping": true,
"sku": "sku",
"taxable": true,
"title": "title",
"variantId": "gid://shopify/ProductVariant/xxxxxx"
}
],
"note": "",
"shippingLine": {
"price": "0.00",
"shippingRateHandle": "",
"title": "FREESHIP"
},
"useCustomerDefaultAddress": true
}
}
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025