Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
I have an interesting use case where I am seeking validation that this is even possible without violating TOS or there existing the technology to do so. I apologize for just word dumping here however I have been pursuing multiple paths to solve this problem it is appearing this might not be supported.
In short: I need the ability to allow the customer to choose how much of a discount they would like to take advantage of at checkout in exchange for receiving rewards proportional to the discount amount
Example: As a customer I a have a 20% off discount code at checkout. I apply the code, however I see a checkout extension with a Stepper component that allows me to exchange 10% of the 20% for rewards in a 3rd party service. Now I see 10% off in the cart then the other 10% is seen inside a 3rd party app. Upon paying, I go to the 3rd party service and observe the 10% worth of rewards in my account.
Shorter Example: As a customer I have a 15% discount code, I want to take 5% in reward points via the 3rd party service then have 10% off the cart.
There are many questions here:
shopify app = shapp
1. This Shapp that gets installed to do this MUST have external API keys stored within shapp memory, is this a violation of TOS since this means the Shopify app relies on a 3rd party service?
2. Right now in my development Shapp I have the Admin side enabling the saving of the API key, then a checkout extension that enables the input of a number 0-20 (ideally the max is the percentage of the discount code, is this possible?)
3. I have investigated Shopify functions rather intensely however I am not certain it is the right tool for the job to be able to update the discount applied in the checkout screen as there exists this clause here (Apps that provide dynamic editing and execution of function code aren't permitted on the Shopi... What would be the right tool to enable an interaction between the cart amount and the discount code?
4. The webhook for 'orders/paid' is where I would receive the data of the checkout with my order meta field dictated by checkout extension, then retrieve 3rd party api credentials and make the request. Is this a violation of TOS?
There's to many moving parts here for other people to solve for you.
Think the problem through and break it down into simpler parts, and research individual posts.
Correct link
Additionally: "Network access isn't supported. For example, you can't send HTTP requests to your app's backend as part of the function's logic."
For the "dynamic editing" part of prohibited functions you probably want to hop on the dev discord, or the partner slack and get clarification of what that means; /grainofsalt: through roughly I take it to mean the output of a function should not then be modifying the function code itself.
Simplest approach is these things should be decided by the customer BEFORE checkout.
Then either generate the discount code, or use draft orders, or set flags the checkout function can use.
There's probably another missing part here where the customer has to authenticate who they are for the other service possibly before checkout even finished which is not something that's supported.
@Cantum2 wrote:Shapp that gets installed to do this MUST have external API keys stored within shapp memory
is this a violation of TOS since this means the Shopify app relies on a 3rd party service
Shopify apps are not hosted by shopify , you host them elsewhere so they can contain whatever api keys you need. The second part about TOS makes no sense as that would pretty much invalidate more than half the integration service apps on the app store.
Parts of an app such as a scripttag, or theme block, should not contain sensitive private api keys as they can get exposed to the frontend.
Good Luck with this.
Contact [email protected] for the solutions you need
Save time & money ,Ask Questions The Smart Way
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Thank Paul with a ☕ Coffee for more answers or donate to eff.org
I am not looking for someone to solve this for me as I am more than capable of solving this problem so long as the Shopify API's exist and TOS supports this. The problem has been broken down: Does Shopify support dynamically updating discounts or not.
I understand how Shopify apps are hosted and interacted with and how technically speaking API keys can be stored however I asked if there are TOS implications of this. Thanks for clarity.
Thank you for your input and I will keep prototyping with your idea of solving this pre-checkout in mind.
We recently spoke with Zopi developers @Zopi about how dropshipping businesses can enha...
By JasonH Oct 23, 2024A big shout out to all of the merchants who participated in our AMA with 2H Media: Holi...
By Jacqui Oct 21, 2024We want to take a moment to celebrate the incredible ways you all engage with the Shopi...
By JasonH Oct 15, 2024