# Metafields

All metafields saved by the app are stored under the "**serializer**" namespace. Learn more about Shopify [metafields](https://help.shopify.com/en/manual/custom-data/metafields).

{% hint style="warning" %}
The data first saved in the app's database is updated in the Shopify metafields. Metafield edits **are not** synchronised with the database. Therefore, please do not edit or delete the metafields. Please get in touch with me if you wish to sync the metafields with the app's database.
{% endhint %}

{% hint style="warning" %}
**Please only rely on the metafields documented on this page.**&#x20;

The app may populate other metafields for other purposes, e.g. settings. Please do not rely on such metafields, as the shape of the data may change.
{% endhint %}

## Order

Order metafields are stored in JSON format under the "**properties**" key. When populated, the following fields are available:

| Field name                | Type           | Description                                                                                                                                                                                                                                                      |
| ------------------------- | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **currentTotalTrackable** | Integer        | It highlights how many items within the order are currently trackable. Note that more items may be stored than currentTotalTrackable due to order edits outside the app. When this value is lower than the number of items stored, a warning appears in the app. |
| **items**                 | Array of items | See the table below for the information about item fields.                                                                                                                                                                                                       |

### Item fields

| Field name           | Type                                                                                                                                                                                                                                                                             | Description                                                                      |
| -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| **lineItemId**       | Integer                                                                                                                                                                                                                                                                          | Shopify's numeric line item ID.                                                  |
| **productVariantId** | Integer                                                                                                                                                                                                                                                                          | Shopify's numeric product variant ID.                                            |
| **itemId**           | String                                                                                                                                                                                                                                                                           | Globally unique item ID generated by the app. It can be used as a serial number. |
| **serialNumber**     | String or undefined (not populated)                                                                                                                                                                                                                                              | Manually entered serial number                                                   |
| **warrantyDuration** | <p>Undefined (not populated), null or JSON object containing the following fields:<br></p><ul><li><strong>unit</strong> - string. Possible values are "day", "month" or "year".</li><li><strong>value</strong> - integer, the minimum value is 1.</li></ul>                      | It contains a warranty duration for the item.                                    |
| **customFields**     | <p>Undefined (not populated for the saved items before the "Custom fields" feature release) or an array of JSON objects containing the following fields:<br></p><ul><li>key - string. Max length - 30 characters.</li><li>value - string. Max length - 200 characters.</li></ul> | It contains a list of all custom field values and keys associated with the item. |


---

# 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://galmis.gitbook.io/serializer-product-tracking/getting-started/sharing-and-integration/development-api-reference/metafields.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.
