Have run into an interesting problem on Shopify. Basically, I have custom fields in customer registration that are saved as metafields and the customer's price needs to vary based on these fields for all products.
In order to integrate with other apps and be maintainable, I want to be able to get this customer data at the highest level possible so that all the other shopify code can rely on this pricing data.
I've had a few ideas for how to solve this, but I'm not really sure what the best approach is. Here are my ideas:
This seems really involved and there may be better ways to handle this, but I can't think of any other way to make sure that the pricing is correct for each customer based on their personal information. Does anyone have any ideas on how I can make this happen or feedback on my ideas.
Any help will be greatly appreciated! 😀
Unless the number of customers is bounded and that you are sure it won't grow beyond a given limit, it may work, but I would personally do not go this way as it's not only quite complex to manage, but you may also reach the limits of products/collections. Also, it would prevent any simple analytics due to the duplicate product.
Instead, I think I would explore the automatic discount way. If you could create one automatic discount whose percentage varies based on customer, it would be automatically applied to your products. Unfortunately, as of today there are no way to create automatic discounts through the API, but according to this discussion, this should be exposed in the API before the end of summer (so soon?): https://community.shopify.com/c/Shopify-APIs-SDKs/Automatically-apply-discount-to-cart-using-API/td-...
Yea, my solution was very involved and had lots of potential downsides so I think this would be the almost optimal way to go about it. Unfortunately, since it's not yet available, I need another solution for the next couple months at least. For now, I'm going to tag customers by tier, have a multiplier for each tier, and use a discount by tag app.