# Metafields and data mapping

URL: https://docs.sparklayer.io/help/platforms/woocommerce/metafields
Applies to: WooCommerce

Turn on SparkLayer product, customer and order metafields for WooCommerce in Integrations > Platform, to add pack sizes, RRP prices and credit limits.

> **Quick summary**
>
> - Metafields are optional. You don't need any to install SparkLayer or start taking B2B orders: add them only when you want a feature that uses one, such as pack sizes or credit limits.
> - Metafields hold extra B2B data in WooCommerce, such as a product's pack size or RRP, or a customer's credit limit.
> - You choose which SparkLayer metafields to use in the SparkLayer Dashboard, at **Integrations > Platform > Metafields** in the SparkLayer Dashboard ([open](https://app.sparklayer.io/configuration/integrations/platform)), or **SparkLayer Wholesale > Integrations > Platform > Metafields** in the Shopify app.

## How SparkLayer uses metafields

[Metafields](https://docs.sparklayer.io/developers/data/metafields.md) store information that the WooCommerce admin doesn't usually capture. SparkLayer reads three kinds:

| Type | What SparkLayer uses it for |
| --- | --- |
| **Product metafields** | Settings for the [frontend interfaces](https://docs.sparklayer.io/help/storefront/interfaces.md), such as [pack sizes](https://docs.sparklayer.io/help/storefront/quantity-rules.md) and [RRP prices](https://docs.sparklayer.io/help/pricing/pricing-display.md). |
| **Customer attributes** | Customer settings, such as [credit limits](https://docs.sparklayer.io/help/ordering/credit-net-terms-and-invoicing.md). |
| **Order metafields** | [Invoicing information](https://docs.sparklayer.io/help/ordering/credit-net-terms-and-invoicing.md) for an order. |

## Turn on metafields

Choose which SparkLayer metafields to use in the SparkLayer Dashboard. You don't need a developer for this.

1. In the SparkLayer Dashboard, go to **Integrations > Platform** in the SparkLayer Dashboard ([open](https://app.sparklayer.io/configuration/integrations/platform)), or **SparkLayer Wholesale > Integrations > Platform** in the Shopify app.
2. In the **Metafields** card, click **Configure** next to **SparkLayer metafields**.
3. Select the SparkLayer [metafields](https://docs.sparklayer.io/developers/data/metafields.md) you want to use.

## Things to know

- Product metafields are always added at variant level, even if a product only has one variant.
- Some SparkLayer settings must be entered as JSON, a structured text format. Their pages, such as [Product rules per customer group](https://docs.sparklayer.io/help/storefront/product-settings.md), have a **Build the value** form that writes it for you to copy.

For the settings each metafield controls, including customer-level product settings, see [Product rules per customer group](https://docs.sparklayer.io/help/storefront/product-settings.md).
