> For the complete documentation index, see [llms.txt](https://docs.samita.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.samita.io/bulk-price-editor-sami/field-guides/custom-metafields.md).

# Custom metafields

Bulk edit any product or variant metafield that has a definition in Shopify.

Use **Custom product metafield** (product fields) or **Custom variant metafield** (variant fields) to edit metafields you have defined in **Shopify admin › Settings › Custom data**.

## Pick the definition

In the **Field to edit** card click **Choose a metafield definition**, search, and select the definition. The card then shows its type, for example *Type: single\_line\_text\_field*. One task edits one metafield definition.

## Edit methods depend on the type

| Metafield type                                                                                          | Edit methods                                                                                                                                                                                                                                                     |
| ------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Text, number, date, URL and similar single-value types                                                  | The text methods (Find and replace, Replace entire text, Add text at beginning, Add text at end, Remove …), plus **Increase by amount**, **Decrease by amount**, **Increase by percentage**, **Decrease by percentage** for numbers, plus **Set to null/blank**. |
| Types with a fixed set of choices, boolean, money, rating, JSON, rich text, measurements and references | **Replace entire text** and **Set to null/blank**.                                                                                                                                                                                                               |
| List types (`list.*`)                                                                                   | **Set list to values**, **Add and remove values**, **Set to null/blank**.                                                                                                                                                                                        |

**Set to null/blank** removes the metafield from the product or variant.

## Value inputs

The value input matches the type:

* Choices become radio buttons; booleans become **Yes** / **No**.
* Dates and date-times get a date picker; colours get a colour picker; money shows your store currency; ratings show the allowed scale.
* Measurements (weight, volume, dimension and others) get a number box and a unit list.
* Rich text opens a formatting editor. JSON must be valid JSON.
* References open a picker for the right resource: products, variants, collections, pages, blog posts, files, customers, companies or metaobject entries.

{% hint style="warning" %}
Make sure the edit method matches the metafield's data type. Using a text operation on a number or date metafield can produce a value Shopify rejects, and that product is skipped when the task runs.
{% endhint %}

## Revert

Reverting restores the previous metafield value, or removes the metafield if the product or variant did not have one before the task.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.samita.io/bulk-price-editor-sami/field-guides/custom-metafields.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
