Backend

Metafields

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๏ปฟ by adding configurations such as pack sizing๏ปฟ, RRP prices๏ปฟ, and more

Customer metafields

Updating a customer's information by adding information such as credit limits๏ปฟ๏ปฟ

Order metafields

Updating an order with invoicing information๏ปฟ๏ปฟ

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

Platform-specific metafields You can learn more about metafields in the following guides:

๏ปฟ

Product metafields

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

Details

Key

Type

Enforce pack size for orders Defines the number of units per pack for a product variant, ensuring customers purchase in specific multiples. Helps enforce bulk buying and maintain consistent order quantities. Learn more๏ปฟ๏ปฟ

pack_size

integer

Set a minimum order quantity Specifies the minimum quantity a customer must order for a product variant. Prevents purchases below a certain threshold, ensuring bulk sales and maintaining stock efficiency. Learn more๏ปฟ๏ปฟ

min_order_quantity

integer

Limit maximum purchase quantity Limits the highest quantity of a product variant a customer can purchase in a single order. Helps prevent stock depletion, manage supply, and maintain order control. Learn more๏ปฟ๏ปฟ

max_order_quantity

integer

Set a minimum total quantity Sets a minimum required quantity across all variants of a product. Ensures customers buy a specified total amount of different variants before checkout is allowed. Learn more๏ปฟ๏ปฟ

min_order_parent_quantity

integer

Limit total quantity of variants Defines the maximum combined quantity allowed for all variants of a product. Prevents excessive purchasing while helping businesses manage stock availability and order control. Learn more๏ปฟ๏ปฟ

max_order_parent_quantity

integer

Reserve stock for products 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. Learn more๏ปฟ๏ปฟ

reserve_stock_quantity

integer

Control product visibility and selling 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. Learn more๏ปฟ๏ปฟ

display

๏ปฟboolean๏ปฟ

Enable or disable purchasing 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. Learn more๏ปฟ๏ปฟ

sell

boolean

Configure variant settings Stores JSON configuration for multiple variant settings, potentially overriding other metafields. Helps businesses apply customized behavior for pricing, availability, or purchase rules. Learn more๏ปฟ This "supercedes" the above metafields๏ปฟ

settings

json

Set a minimum stock level Defines a threshold at which stock is considered low for a product variant. Helps trigger alerts, manage inventory replenishment, and notify customers about limited availability. Learn more๏ปฟ๏ปฟ

min_stock_level

integer

Set estimated restock date Indicates the estimated restock date of a product variant. Useful for informing customers when an out-of-stock item will be available again and managing expectations for fulfillment. Learn more๏ปฟ๏ปฟ

restock_date

date

Store stock data per location Contains JSON data showing stock levels across multiple warehouse locations. Helps businesses track inventory distribution and optimize fulfillment from different geographic areas. Learn more๏ปฟ๏ปฟ

stock_location_data

json

Learn more It's also possible to set customer-specific product metafields and you can learn more in our guide here๏ปฟ.

๏ปฟ

Customer metafields

Details

Key

Type

Store customer authentication Stores authentication data for a customer, ensuring secure access and identity verification. Useful for validating user roles, permissions, or providing personalized B2B experiences. Learn more๏ปฟ๏ปฟ

authentication

single_line_text

Assign a customer title 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. Learn more๏ปฟ๏ปฟ

title

single line text

Store customer's company name Specifies the name of the company a customer is associated with. Helps in B2B transactions, account management, and applying business-specific pricing, invoicing, and discounts. Learn more๏ปฟ๏ปฟ

company_name

single line text

Assign customer to a group Assigns the customer to a specific pricing or access group, overriding customer tags. Helps businesses manage tiered pricing, exclusive products, and customized user experiences. This "supercedes" any tags assigned to the customer๏ปฟ

group

single line text

Link customer to price lists Links the customer to specific price lists via JSON data, allowing customised pricing independent of their assigned group. Useful for B2B clients with negotiated or contract pricing. Learn more๏ปฟ๏ปฟ

๏ปฟThis "supercedes" any price lists assigned to the customer group๏ปฟ

price_lists

json

single_line_text

Enable invoice payment 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. Learn more๏ปฟ๏ปฟ

payment_by_invoice

json

Allow account-based payments Holds JSON data specifying if a customer is allowed to make purchases on an account-based system. Supports businesses offering credit-based purchases or post-payment arrangements. Learn more๏ปฟ๏ปฟ

payment_on_account

json

Link customer to accounting system A unique identifier linking a customer to external accounting systems. Helps in managing financial records, automating invoicing, and ensuring seamless integration with ERP systems. Learn more๏ปฟ๏ปฟ

๏ปฟaccounting_id๏ปฟ

single line text

Set a discount percentage Defines a percentage-based discount applied to a customer. Can be used for VIP customers, B2B clients, or special promotions, ensuring dynamic and flexible pricing strategies. Learn more๏ปฟ๏ปฟ

discount_percentage

single line text

integer

float

Assign customer to sales agents Lists the sales agent groups assigned to a customer, helping manage accounts through dedicated representatives. Learn more๏ปฟ๏ปฟ

sales_agent_groups

list.single_line_text

Link customer to parent account 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๏ปฟ๏ปฟ

parent_customer_id

single line text

Assign customer role 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. Learn more๏ปฟ๏ปฟ

role

single line text

Store default shipping address Specifies the default shipping address for the customer. Helps streamline the checkout process by automatically applying the preferred delivery location for every order. Learn more๏ปฟ๏ปฟ

shipping_address_id

single line text

Store default billing address Defines the customerโ€™s default billing address. Ensures consistent invoicing details, prevents manual input errors, and speeds up the checkout process for returning customers. Learn more๏ปฟ๏ปฟ

๏ปฟbilling_address_id๏ปฟ

single line text

Store multiple shipping addresses Stores JSON data listing all shipping addresses available for a customer. Useful for businesses with multiple delivery locations, franchises, or multi-site logistics. Learn more๏ปฟ๏ปฟ

available_shipping_addresses_ids

json

Please note If you're looking to use our advanced metafields, please speak to our team๏ปฟ to learn more about how it works.

๏ปฟ

Order metafields

Details

Key

Type

Store invoice link for orders 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. Learn more๏ปฟ๏ปฟ

๏ปฟinvoice_url๏ปฟ

url

list.url

file_reference

list.file_reference

Track imported orders 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๏ปฟ๏ปฟ

sparkOrderImport

boolean

๏ปฟ