Customer Tags on Checkout extensibility

Solved

Customer Tags on Checkout extensibility

Ahsan-ah-med
Shopify Partner
27 3 3

I'm building checkout UI extension for client that wants to show different text to different customer based on customers tag example: If customer has premium tag then text will be "you're a premium member" or if customer has basic tag then text will be "Great you just joined the team"

 

Ahsanahmed_0-1712048692282.png

 

 

Ahsan Ahmed
Shopify Developer | 2 Years of Experience
Shopify App Developer | 1 Year Experience
I'm Build Custom App for Client Requirements Using Shopify Functions, Shopify Checkout Ui Extensions, Remix App,
Transforming Websites into Shopify
 Converting Existing Websites (WooCommerce, Figma, Magento, etc.) to Shopify
️ Developing Custom Shopify Apps for Unique Client Needs
 Enhancing Shopify Functions with Checkout Extensions for Plus Users
Let's Build Your Dream Store Together!
Accepted Solution (1)
Ahsan-ah-med
Shopify Partner
27 3 3

This is an accepted solution.

Yes 
you use this Shopify function/hooks useAppMetafields in this function have filters for helping specific part metafields data retrieve 

customer filter get customer metafields 

Ahsanahmed_0-1716881921075.png

useAppMetafields

Ahsan Ahmed
Shopify Developer | 2 Years of Experience
Shopify App Developer | 1 Year Experience
I'm Build Custom App for Client Requirements Using Shopify Functions, Shopify Checkout Ui Extensions, Remix App,
Transforming Websites into Shopify
 Converting Existing Websites (WooCommerce, Figma, Magento, etc.) to Shopify
️ Developing Custom Shopify Apps for Unique Client Needs
 Enhancing Shopify Functions with Checkout Extensions for Plus Users
Let's Build Your Dream Store Together!

View solution in original post

Replies 7 (7)

km2024
Shopify Partner
1 0 0

Hi! I also want to implement certain checkout UI extensions for customers with specific tags. Were you able to find a solution for this?

Ahsan-ah-med
Shopify Partner
27 3 3

This is an accepted solution.

Yes 
you use this Shopify function/hooks useAppMetafields in this function have filters for helping specific part metafields data retrieve 

customer filter get customer metafields 

Ahsanahmed_0-1716881921075.png

useAppMetafields

Ahsan Ahmed
Shopify Developer | 2 Years of Experience
Shopify App Developer | 1 Year Experience
I'm Build Custom App for Client Requirements Using Shopify Functions, Shopify Checkout Ui Extensions, Remix App,
Transforming Websites into Shopify
 Converting Existing Websites (WooCommerce, Figma, Magento, etc.) to Shopify
️ Developing Custom Shopify Apps for Unique Client Needs
 Enhancing Shopify Functions with Checkout Extensions for Plus Users
Let's Build Your Dream Store Together!
Khasim1
Shopify Partner
30 0 0

HI @Ahsan-ah-med 

 

When I use useAppMetafields to get the Company object metafield it returns empty array. Can you let me know how I can get the value of the metafield?

Khasim1_0-1722349292418.png

 

Ahsan-ah-med
Shopify Partner
27 3 3

can you share more code 

Ahsan Ahmed
Shopify Developer | 2 Years of Experience
Shopify App Developer | 1 Year Experience
I'm Build Custom App for Client Requirements Using Shopify Functions, Shopify Checkout Ui Extensions, Remix App,
Transforming Websites into Shopify
 Converting Existing Websites (WooCommerce, Figma, Magento, etc.) to Shopify
️ Developing Custom Shopify Apps for Unique Client Needs
 Enhancing Shopify Functions with Checkout Extensions for Plus Users
Let's Build Your Dream Store Together!
mrtienv
Shopify Partner
4 0 1

Can You give the example code?

Ahsan-ah-med
Shopify Partner
27 3 3
const appMetafields = useAppMetafields({
    type: "customer",
    namespace: "custom",
    key: "customerTag",
  });
Ahsan Ahmed
Shopify Developer | 2 Years of Experience
Shopify App Developer | 1 Year Experience
I'm Build Custom App for Client Requirements Using Shopify Functions, Shopify Checkout Ui Extensions, Remix App,
Transforming Websites into Shopify
 Converting Existing Websites (WooCommerce, Figma, Magento, etc.) to Shopify
️ Developing Custom Shopify Apps for Unique Client Needs
 Enhancing Shopify Functions with Checkout Extensions for Plus Users
Let's Build Your Dream Store Together!

JohnWF
Shopify Partner
15 0 3

Nobody wants to propagate tags to a metafield to access it. Tags is basic categorisation of customers, let's have it on useCustomer(), please Shopify.