# Customer metafield

**What You'll Need**

* A published form in the **Powerful Form Builder** app.
* A **Shopify customer metafield** already created.\
  (*You can create one via Shopify Admin → Settings → Custom data → Customers → Add definition.*)

### ⭐ Step 1: Create and Use Customer Metafields

1\. From Shopify admin page > go to store **Settings** > click **Metafields and metaobjects**

2\. Click **Customers** > add a  customers metafield or use an existing one.&#x20;

For example: the key is **custom.gender** > copy the **Namespace and Key**

Click **Add definition** (or similar) to define a new custom field. You’ll need to specify:

* A **name** (e.g. “Birthday”, “Preferred Language”, “VIP Tier”, etc.)
* A **namespace & key** (internal identifiers for Shopify)
* A **content type** (text, number, date, boolean, etc.) — choose based on the data you want to store.
* (Optional) Description — helps clarify what this metafield is used for

3. Save it.&#x20;

<figure><img src="/files/jmsCNu5WsZnaFcAtQeuD" alt=""><figcaption></figcaption></figure>

### ⭐ Step 2: Connect Your Form Field to the Metafield

1. Go to Powerful Contact Form Builder app > click **Forms** > open a form you want to edit > click **Settings** >  enable **Shopify** and click on **Shopify** option

<figure><img src="/files/coBjP21tGOCMg8ypM7c4" alt=""><figcaption></figcaption></figure>

2. Map form field with metafield.Select the shopify attributes (on the right) to map with form fields (on the left). For example the **Last** **name** field of the form should be mapped with Shopify **last name** attribute.&#x20;

⚠️ **Note**: **Email** field on the form is required to be mapped with **email** attribute of Shopify.

<figure><img src="/files/d1y2I66ouzPUMkYdgJT2" alt=""><figcaption></figcaption></figure>

5\. Tick on checkbox **Set metafields for created customer** > map form field with metafields.&#x20;

Click **add mapping metafield row** to add more

You’ll see two dropdown lists:

* Left side = your **Form fields**
* Right side = your **Shopify metafield definitions**

<figure><img src="/files/bTgJsD0F3cXRtKRF1Ssr" alt=""><figcaption></figcaption></figure>

Example mapping:&#x20;

| Form Field | Shopify Metafield |
| ---------- | ----------------- |
| Gender     | custom.gender     |
| Hobby      | custom.hobby      |
| Number     | custom.number     |

6. Click **Save** to apply your metafield mappings.

### ✅ How It Works

When a customer fills out the form and submits it: The data from the field you linked will be automatically saved to their **Shopify customer metafield**.

### Example Scenario

Your form includes a **Gender** field:

* Male
* Female
* Others

<figure><img src="/files/oIkLQEQtetakhBC997MV" alt=""><figcaption></figcaption></figure>

You mapped this field to a Shopify metafield:\
**Namespace.key = custom.gender**

A customer fills in the form and selects:

> **Gender: Male**

Then they submit the form.

The app will:

1. Create or update the Shopify customer profile
2. Save the customer’s answer directly into the metafield you set up

So inside Shopify → Customers → (This Customer):\
You will now see:

**Gender = Male**

<figure><img src="/files/P1UjCLbmf5bJqfwVyIbt" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.powerfulform.com/~/revisions/KRfi0fHdeAFeAhiPrH7G/customer-fields/customer-metafield.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
