App reviews, troubleshooting, and recommendations
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
I've made a shipping discount app using a tutorial and a dev shop to test. The tests ran fine and now I installed the app on a live shop. But I'm unsure how to add the discount. In the tutorial graphql was used to set up the discount. Trying to create a discount in the admin and choosing the app as a type just links back to the app itself, it doesn't create a new discount.
Is there any other way than using graphql? How do I use graphql on a live shop?
Hi @OliLei
To offer a discount in a live shop, your application must integrate a Function extension such as product-discount or shipping-discount, which can be registered through Shopify Functions. Use the Shopify CLI for deployment, and then connect it within the Discounts > Create process. You will still require GraphQL to modify discount configurations – for this purpose, consider using tools like Postman or the GraphiQL app.
Hi!
Thank you for answering. Yes, I have created a function extension shipping discount. Using the CLI for deployment. Then I installed the app in a live shop.
That part is not the problem, simply actually creating the discount with the created extension on the live shop. How do I connect to the shop to be able to use GraphQL in that case? Is there really no option for a simpler creation of the discount?
We checked around more, apparently the function doesnt show up using:
query {
shopifyFunctions(first: 10) {
edges {
node {
id
title
}
}
}
}
Despite having deployed the newest version with shopify app deploy. Something seems to have gone wrong registering it.