Metafields
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:
Please note that all product metafields must be applied at the variant level.
Details | Key | Type |
---|---|---|
Pack Size Allows you to configure pack size rules for products, e.g. 6, 12, 18 Learn moreο»Ώο»Ώ | pack_size | integer |
Minimum Purchasable Quantity (variant-level) Allows you to specify the required minimum quantity of the variant customers can purchase. Learn moreο»Ώο»Ώ | min_order_quantity | integer |
Maximum Purchasable Quantity (variant-level) Allows you to specify the maximum quantity of the variant customers can purchase. Learn moreο»Ώο»Ώ | max_order_quantity | integer |
Minimum Purchasable Quantity (product-level) Allows you to specify the required minimum quantity across all variants customers can purchase. Learn moreο»Ώο»Ώ | min_order_parent_quantity | integer |
Maximum Purchasable Quantity (product-level) Allows you to specify the maximum quantity across all variants customers can purchase. 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 |
Customer Group Product Rules Allows you to specify B2B product rules (e.g. pack size & orderable quantities) for specific customer groups Learn moreο»Ώ This "supercedes" the above metafieldsο»Ώ | settings | json |
Reserved DTC Stock Quantity Allows you to specify a stock quantity to reserve for your DTC customers Learn moreο»Ώο»Ώ | min_stock_level | integer |
Restock Date Allows you to specify an exact date when a product in a pre-order status is expected to be available Learn moreο»Ώο»Ώ | restock_date | date |
Stock Location Settings Allows you to specify B2B stock settings (e.g. minimum stock level & restock date) for specific stock locations 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ο»Ώ.
Details | Key | Type |
---|---|---|
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 |
Company Name Allows you to specify the name of the company associated to a customer Learn moreο»Ώο»Ώ | company_name | single line text |
Assigned Groups Allows you to specify the group assigned to a customer This "supercedes" any tags assigned to the customerο»Ώ | group | single line text |
Customer Specific Price Lists Allows you to specify the price lists assigned to a customer 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 |
Credit Limit and Account Balance Contains the customers credit limit and account balance details Learn moreο»Ώο»Ώ | payment_on_account | json |
Accounting ID Allows you to specify a unique accounting ID for a customer Learn moreο»Ώο»Ώ | ο»Ώaccounting_idο»Ώ | single line text |
Additional Percentage Discount Allows you to specify a flat discount percentage to be applied in addition to other discounted pricing 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 |
Default Shipping Address ID Allows you to specify which shipping address to use as the default for orders Learn moreο»Ώο»Ώ | shipping_address_id | single line text |
Default Billing Address ID Allows you to specify which billing address to use as the default for orders 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.
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 |
ο»Ώ