---
title: Metafields
slug: metafields
description: Metafields help you to customise the functionality and appearance of your store by letting you save specialised information that isn't usually captured within your eCommerce store. You can use metafields for internal tracking, or to display specialised in
docTags: 
createdAt: 2024-04-08T12:04:11.757Z
---

## Introduction

Metafields help you to customise the functionality and appearance of your store by letting you save specialised information that isn't usually captured within your eCommerce store. You can use metafields for internal tracking, or to display specialised information on your online store in a variety of ways.

In the context of SparkLayer, metafields are used to capture additional B2B data that you can then use in a variety of ways:

| Type                  | Details                                                                                                                                                                                             |
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Product metafields`  | Updating the [Frontend Interfaces](docId\:ccZ1vnH0O6D_722w35Xpa) by adding configurations such as [pack sizing](docId\:CmxfrPgjQxfz9vJzTVv0D), [RRP prices](docId\:S_VTlJBorGmnwjjfSMom9), and more |
| `Customer metafields` | Updating a customer's information by adding information such as [credit limits](docId\:yWm70oQUosyKOoIqb4Z4G)                                                                                       |
| `Order metafields`    | Updating an order with [invoicing information](docId\:yWm70oQUosyKOoIqb4Z4G)                                                                                                                        |

The following guide serves as an overview of all available metafields that can be configured within SparkLayer.

:::hint{type="info"}
**Platform-specific metafields**
You can learn more about metafields in the following guides:

- [Shopify Metafields & Data Mapping](docId\:BxWnGB6b1n7QFfhTnu7pk)
- [BigCommerce Metafields & Data Mapping](docId\:bkHor8d6QhgZX_yxsdt56)
:::



***

## Automatically configure metafields

Within the [SparkLayer Dashboard](https://app.sparklayer.io/configuration/integrations/platform), you can speed up the creation of metafields using our built-in tool to automatically configure them.

::::Tabs
:::Tab{title="🛍️ Using Shopify"}
To get started, go to **Integrations, Platform Connection** and click **Configure** within the **Configure metafields** section. You'll then see all available metafields that can be configured for **Product** and **Customer** data.&#x20;

![](https://api.archbee.com/api/optimize/kxppJrvFK15E9wXbMKaTP/77PPtnle394bKNefuREm4_screenshot-2025-03-07-at-060054.png)

When a metafield is enabled, this will automatically be added to the [Custom Data](https://admin.shopify.com/settings/custom_data) section of your Shopify admin and will be 'pinned' for easy access when configuring metafields for products or customers.

![](https://api.archbee.com/api/optimize/kxppJrvFK15E9wXbMKaTP/U8TldaNsA4KK5Zvo_vfGB_image.png)

Any metafields automatically created by SparkLayer in this way will be prefixed with `B2B - [name]` for example `B2B - Pack Size`

Should you need to modify or remove metafields, you can manage this via the [Custom Data](https://admin.shopify.com/settings/custom_data) section within your Shopify store.
:::
::::



***

## Product metafields

Please note that all product metafields must be applied at the variant level.

| Details                                                                                                                                                                                                                                                                             | Key                         | Type      |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------- | --------- |
| **Recommended Retail Price (RRP)**<br />Allows you to set a RRP ("MSRP") price for products at a variant level<br />[Learn more](docId\:S_VTlJBorGmnwjjfSMom9)                                                                                                                      | `rrp`                       | `json`    |
| **Pack Size**<br />Allows you to configure pack size rules for products, e.g. 6, 12, 18<br />[Learn more](docId\:CmxfrPgjQxfz9vJzTVv0D)                                                                                                                                             | `pack_size`                 | `integer` |
| **Minimum Purchasable Quantity (variant-level)**<br />Allows you to specify the required minimum quantity of the variant customers can purchase.<br />[Learn more](docId\:CmxfrPgjQxfz9vJzTVv0D)                                                                                    | `min_order_quantity`        | `integer` |
| **Maximum Purchasable Quantity (variant-level)**<br />Allows you to specify the maximum quantity of the variant customers can purchase.<br />[Learn more](docId\:CmxfrPgjQxfz9vJzTVv0D)                                                                                             | `max_order_quantity`        | `integer` |
| **Minimum Purchasable Quantity (product-level)**<br />Allows you to specify the required minimum quantity across all variants customers can purchase.<br />[Learn more](docId\:CmxfrPgjQxfz9vJzTVv0D)                                                                               | `min_order_parent_quantity` | `integer` |
| **Maximum Purchasable Quantity (product-level)**<br />Allows you to specify the maximum quantity across all variants customers can purchase.<br />[Learn more](docId\:CmxfrPgjQxfz9vJzTVv0D)                                                                                        | `max_order_parent_quantity` | `integer` |
| **Reserve stock for products**<br />Reserves a specified amount of stock that is not available for regular purchase. Useful for holding inventory for specific customers, events, or direct-to-consumer sales.<br />[Learn more](docId\:Gj_Ao_gQ6oA-jx0D27Hys)                      | `reserve_stock_quantity`    | `integer` |
| **Control product visibility and selling**<br />Controls whether a product variant is visible on the storefront. If disabled, the variant won’t appear to customers, even if it remains purchasable through other means.<br />[Learn more](docId\:m3DF4f0Eyc2rM-vUaRG9H)            | `display`                   | `boolean` |
| **Enable or disable purchasing**<br />Determines if a product variant can be added to the cart and purchased. When disabled, the product remains visible but cannot be bought, useful for showcasing upcoming or unavailable items.<br />[Learn more](docId\:m3DF4f0Eyc2rM-vUaRG9H) | `sell`                      | `boolean` |
| **Customer Group Product Rules**<br />Allows you to specify B2B product rules (e.g. pack size & orderable quantities) for specific customer groups<br />[Learn more](docId\:Cm9B1I6Cz0vOlc67g-fJI)<br /><font color="#ff6900">*This "supercedes" the above metafields*</font>       | `settings`                  | `json`    |
| **Reserved DTC Stock Quantity**<br />Allows you to specify a stock quantity to reserve for your DTC customers<br />[Learn more](docId\:Gj_Ao_gQ6oA-jx0D27Hys)                                                                                                                       | `min_stock_level`           | `integer` |
| **Restock Date**<br />Allows you to specify an exact date when a product in a pre-order status is expected to be available<br />[Learn more](docId\:Gj_Ao_gQ6oA-jx0D27Hys)                                                                                                          | `restock_date`              | `date`    |
| **Stock Location Settings**<br />Allows you to specify B2B stock settings (e.g. minimum stock level & restock date) for specific stock locations<br />[Learn more](docId\:Gj_Ao_gQ6oA-jx0D27Hys)                                                                                    | `stock_location_data`       | `json`    |

:::hint{type="info"}
**Learn more**
It's also possible to set **customer-specific product** metafields and you can learn more in [our guide here](docId\:Cm9B1I6Cz0vOlc67g-fJI).
:::



***

## Customer metafields

| Details                                                                                                                                                                                                                                                                               | Key                              | Type                                           |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- | ---------------------------------------------- |
| **Customer Title**<br />Captures the customer’s title (e.g., Mr., Ms., Dr.), which can be used for personalisation in invoices, emails, and account records, ensuring a professional and customized experience.<br />[Learn more](docId\:xXiWZ30EfVbKXnuF3j1G8)                       | `title`                          | `single line text`                             |
| **Company Name**<br />Allows you to specify the name of the company associated to a customer<br />[Learn more](docId\:xXiWZ30EfVbKXnuF3j1G8)                                                                                                                                          | `company_name`                   | `single line text`                             |
| **Assigned Groups**<br />Allows you to specify the group assigned to a customer<br /><font color="#ff6900">*This "supercedes*</font>"<font color="#ff6900"> any tags assigned to the customer</font>                                                                                  | `group`                          | `single line text`                             |
| **Customer Specific Price Lists**<br />Allows you to specify the price lists assigned to a customer<br />[Learn more](docId\:v8dVUcJ7Ju0fH7BvINrEw)<br /><font color="#ff6900">*This "supercedes*</font>"<font color="#ff6900"> any price lists assigned to the customer group</font> | `price_lists`                    | `json`<br />`single_line_text`                 |
| **Enable invoice payment&#x9;**<br />Stores JSON settings that define whether a customer can pay via invoice. Useful for B2B transactions, allowing approved customers to complete purchases without immediate payment.<br />[Learn more](docId\:yWm70oQUosyKOoIqb4Z4G)               | `payment_by_invoice`             | `json`                                         |
| **Credit Limit and Account Balance**<br />Contains the customers credit limit and account balance details<br />[Learn more](docId\:yWm70oQUosyKOoIqb4Z4G)                                                                                                                             | `payment_on_account`             | `json`                                         |
| **Accounting ID**<br />Allows you to specify a unique accounting ID for a customer<br />[Learn more](docId\:xXiWZ30EfVbKXnuF3j1G8)                                                                                                                                                    | `accounting_id`                  | `single line text`                             |
| **Additional Percentage Discount**<br />Allows you to specify a flat discount percentage to be applied in addition to other discounted pricing<br />[Learn more](docId\:v8dVUcJ7Ju0fH7BvINrEw)                                                                                        | `discount_percentage`            | `single line text`<br />`integer`<br />`float` |
| **Assign customer to sales agents**<br />Lists the sales agent groups assigned to a customer, helping manage accounts through dedicated representatives.<br />[Learn more](docId\:Uw8mDbMEfwWKqZrVB5CqX)                                                                              | `sales_agent_groups`             | `list.single_line_text`                        |
| **Link customer to parent account**<br />Links a customer to a parent customer account, useful for businesses with hierarchical structures. Supports multi-level accounts, sub-customers, and centralised purchasing.[Learn more](docId:_WwfeWVJY9xrSuNCQlFoZ)                        | `parent_customer_id`             | `single line text`                             |
| **Assign customer role**<br />Defines the customer's role in their company or store interactions. Helps segment users, apply permissions, or provide tailored shopping experiences based on their job function or authority.<br />[Learn more](docId:_WwfeWVJY9xrSuNCQlFoZ)           | `role`                           | `single line text`                             |
| **Default Shipping Address ID**<br />Allows you to specify which shipping address to use as the default for orders<br />[Learn more](docId\:xXiWZ30EfVbKXnuF3j1G8)                                                                                                                    | `shipping_address_id`            | `single line text`                             |
| **Default Billing Address ID**<br />Allows you to specify which billing address to use as the default for orders****<br />[Learn more](docId\:xXiWZ30EfVbKXnuF3j1G8)                                                                                                                  | `billing_address_id`             | `single line text`                             |
| **Store multiple shipping addresses**<br />Stores JSON data listing all shipping addresses available for a customer. Useful for businesses with multiple delivery locations, franchises, or multi-site logistics.<br />[Learn more](docId\:xXiWZ30EfVbKXnuF3j1G8)                     | `available_shipping_address_ids` | `json`                                         |

:::hint{type="info"}
**Please note**
If you're looking to use our advanced metafields, please [speak to our team](docId\:NNUw1G9z7eaJ4M78vk7t9) to learn more about how it works.
:::



***

## Order metafields

| Details                                                                                                                                                                                                                                                                                                                                   | Key                | Type                                                                   |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | ---------------------------------------------------------------------- |
| **Store invoice link for orders**<br />Provides a URL to an invoice linked to an order. Helps businesses offer quick access to digital invoices for record-keeping, payments, and compliance with accounting processes.<br />[Learn more](docId\:yWm70oQUosyKOoIqb4Z4G)                                                                   | `invoice_url`      | `url`<br />`list.url`<br />`file_reference`<br />`list.file_reference` |
| **Track imported orders**<br />A flag indicating whether an order was imported into SparkLayer. Useful for tracking external order sources, ensuring data consistency, and managing integrations effectively.[Learn more](docId\:BxWnGB6b1n7QFfhTnu7pk)                                                                                   | `sparkOrderImport` | `boolean`                                                              |
| **Visible ID**<br />This allows a custom order ID ("Visible ID") to be used instead of the platform default (e.g. Shopify). Typical use case could include showing the ERP order number ensuring its a consistent ID across all systems. Please note, this is only applicable to Shopify.<br />[Learn more](docId\:BxWnGB6b1n7QFfhTnu7pk) | `visible_id`       | `single line text`                                                     |

