What is a Namespace?
Simply put, the Namespace is a method in which metafields can be identified. Think of them like a box that you put all of your metafields into. When trying to retrieve the metafields, the box can be identified using the namespace.
Metafields need a namespace to allow them to be seen and used by apps like ours.
So in our example, we name all of our namespaces:
customer_hub
Then within our app we look for anything inside of the customer_hub namespace:
If these don't match, no fields will appear. So for example, if the namespace that was created was:
customer_fields
And our app was looking for:
customer_hub
No fields would be retrieved because our app has been told to look in the wrong namespace. So the namespace within our app would need to be updated to:
customer_fields
How to make sure you're using the correct namespace?
Simply make sure the metafield you've created and our app are using the same namespaces in these two locations:
Shopify Metafield:
Customer Accounts Hub profile builder: