Price based on customer metafield

Highlighted
Tourist
3 0 0

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:

  • Create a custom collection dynamically for the customer when they're created and create duplicates of all products with the custom price attached in this collection. Collection is the only one visible for the customer and after checkout (or a certain period of inactivity) it is removed from the store. When the same customer logs back on, reach out again to my server and recreate the custom collection.
  • Create custom products tied to the customer and only show these. Same concept as above basically, but at the product level.

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!  😀

0 Likes
Shopify Partner
62 6 5

@ripped_einstein ,

 

You can tag your customers and use app Selly to offer different price based on customer tags:

 

https://apps.shopify.com/selly

★ SELLY UNITED - The front solution to increase sales for online store and POS - https://apps.shopify.com/selly
0 Likes
Tourist
3 0 0

Looks like it could be promising Risa. Not 100% sure that this app will do what I need. Basically I need to multiply the price by a somewhat unique number based on the customers registration.

0 Likes
Shopify Expert
71 1 34

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-...

2 Likes
Tourist
3 0 0

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.

0 Likes