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 |
๏ปฟ