The loyalty API feature doesn't appear to have much visibility in regard to the user's cart. Other than pushing a loyalty amount to it. Which obviously defeats the purpose from a practicality standpoint.
If it were me, one thing I would do in terms of the Embedded POS SDK is directly download the pos_app.js script file. Place that as a static file on your host that's running your own code. Reference that static file and you might not have to worry about that package being deprecated and ultimately retired by Shopify.
Sorry, best I can do!
Thanks again Greg. Yeah, we're currently using App Bridge and it works great. I'm not concerned about that being deprecated and we're no longer using the Embedded POS SDK so I think we're all good on that front
Really was just hoping to get some insight from someone on the technical team at Shopify purely to know if this is the intended functionality of the "Cart Extension" that they released. It seems like it's missing some vital pieces but maybe that was intended and I'm looking at it all wrong.
Either way, thank you for all of the back and forth! I do appreciate your time. Hopefully the additional responses will help catch someone's attention at Shopify. In the meantime, I think I might take @policenauts recommendation and open up a issue on Github somewhere. Seems like a likely place for them to be hanging out
First of all, sorry it took so long for you to hear back from Shopify on this! You are correct in your understanding of how the POS cart app extension works. It was built to handle use cases where knowing the shop_id and customer_id was enough to generate discount options. To create a discount based on the contents of the cart you'll need to continue using a POS embedded app via Shopify App Bridge.
Hey Dave, thanks a bunch for taking the time to respond. I sincerely appreciate it. I know you guys are busy and wasn't trying to be a pain. I was really just looking to get some insight.
I understand what you're saying and that's what I've figured but I truly can't figure out what use case that would work for. Would it be too much to ask for some clarification here? Let's assume that you know the shop_id and the customer_id, what kind of discounts could you possibly provide with that information, without knowing the value of an item or items in cart?
The best use case I've been able to come up with is, perhaps, a loyalty program offers different levels of discount based on "points" that have been accrued. In fact, I believe this is the example that you sort of provide in the documentation using this image: https://shopify.dev/assets/api/pos/loyalty-next.jpg. Let's use that image to play out this scenario. With a POS Cart Extension, I receive the shop id and the customer id and am able to determine that this particular customer has accrued 28,867 points. Based on my software, that equates to a $5.00. What happens in this scenario if the value of the cart is only $3.00? Further more, let's assume the staff member ringing up this customer goes ahead and applies that $5.00 discount. It's been a while since I've actually tried this but my guess is that, only $3.00 would be discounted but the customer was entitled to a $5.00, correct?
I guess my point here is that, this functionality seems to be kind of half baked in its current form. I'm truly genuinely interested, am I missing something obvious by chance?
Thanks again for your time Dave!
I still don't get it. We have all agreed that the current POS Cart Extension doesn't provide visibility to the user's actual Cart. So either the Embedded POS SDK or the App Bridge is required in order to provide this functionality. While Shopify can/should improve the POS Cart Extension to be a one-stop solution, for the time being the proposed workaround should work, right? If so, the thread is turning into a recursive argument...lol.
Hey Conrad, don't worry you're still not missing something obvious. The primary use case that drove this feature was points based loyalty programs. It's up to the retail staff member using the POS client to only apply discounts that make sense based on the cart total. In other words, the $5 discount will appear but should not be applied to a $3 order.
While I appreciate your original feedback Greg, feel free to unsubscribe from the thread. I'm not worried about what you think or don't think is a recursive argument "lol". I've specifically asked for someone from Shopify to give me some insight to the functionality that is obviously not helpful for any sort of real-world use case. You're not helping the conversation so if it isn't related to you, feel free to move along.
For whatever reason you seem to be missing the part where I've said 3 or 4 times, I do not need a workaround. What I have in place (WITH THE APP BRIDGE) works just fine - however, it comes with very obvious pitfalls that the POS Cart Extension could easily solve.
Thanks again for the response Dave. Okay...so that is how this was meant to function. Man, it seems like it could be such a great feature but, as it stands, wouldn't you agree it's pretty lackluster?
I can't imagine that this plays out perfectly very often and with nothing keeping a staff member from over applying discounts, it seems like it leaves a lot of room for human error. I was really hoping I was missing something obvious but I appreciate you confirming that I wasn't. I know the team has done some work to extend that functionality to include product recommendations. Is there any chance we can expect to see any improvements to this functionality?
Really, my only issue with using App Bridge to apply discounts in this manner is that it means we have to use a cart discount and there can be no other cart discounts applied during check out. I was hoping this would solve that problem once and for all.
All good, I guess we'll have to keep working with what's available to us. Thanks again for your time Dave.