> For the complete documentation index, see [llms.txt](https://help.littledata.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.littledata.io/integrations/shopify-to-segment/customer-metafields-as-userid-for-segment.md).

# How to use Customer metafields as userID for Segment

### Why use customer metafields?

Customer metafields can be used by companies that have custom non-Shopify identifier for their customers, for example a **Single Sign-On** (**SSO) system** that unifies the customer identifiers across multiple apps or sites.

### How do I link the customer metafield definition with Littledata?

After you've created the customer metafield definition, go to the **Littledata dashboard**, click on the **Segment** connection settings , and open the **Tracking Customization** tab. Here you’ll find the **User ID** setting:

![](/files/vLbRppu08m13nTTPFE6q)

{% hint style="info" %}
When you select this setting, no `userId` will be sent on client-side events because Customer metafields can’t be accessed from the web page.
{% endhint %}

Select **Customer metafield**. After you choose this option, an input field will appear where you can enter the **namespace** and **key** from your Customer metafield definition:

![See where to define the Customer metafield](/files/EGHy0EICyCWceofJmrDT)

After you save the setting, all server-side events sent by Littledata will include the **userId** property using the value from your Shopify customer metafield.

![Validate Customer metafield change](/files/kKbNOaIsnpzvwQzUo5OB)

![Segment raw event including the new Customer metafield definition](/files/R8MdMYPYPpx0FuhwQ797)

### Troubleshooting

To use this feature, make sure the Customer metafield is created and defined in Shopify, then enter the same namespace and key in the Littledata app.

If the metafield is not created in Shopify but you enable it in Littledata, the **userId** will still be sent - but only on server-side events - and will fall back to the **Shopify customer ID**.

To link the metafield to your customers, you must add a value for that metafield on each customer profile you want associated with the identifier. For example:

![Customer profile linked to metafield](/files/pfTuQ6EPocQMUZ05YtWB)
