Integrations
BigCommerce

BigCommerce Metafields & Data Mapping

introduction metafields help you to customise the functionality and appearance of your bigcommerce store by letting you save specialised information that isn't usually captured in the bigcommerce admin 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 quantity rules docid\ cmxfrpgjqxfz9vjztvv0d , pricing display docid\ s vtljborgmnwjjfsmom9 , and more customer attributes updating a customer's information by adding information such as credit, net terms, & invoicing docid\ ywm70oquosykooiqb4z4g order metafields updating an order with credit, net terms, & invoicing docid\ ywm70oquosykooiqb4z4g how to add metafields to bigcommerce bigcommerce has a variety of ways to access and edit metafields and you may already have your preferred way of doing this you can also refer to our guide below useful resources item details approved apps metafields manager this provides a simple way to manage metafield data within bigcommerce with the exception of "customers" developer docs we also recommend referring to the official bigcommerce guide on accessing metafield data configuring different types of metafields product metafields we recommend using an app listed above in "approved apps" this allows you to access metafield data at both a product parent and product variant level order metafields we recommend using an app listed above in "approved apps" customer attributes there are currently no bigcommerce apps that allow customer attribtues to be added to customer data we therefore recommend a more technical approach to accessing and updating this data currently customer settings can be added though the use of bigcommerce customer attributes before these attribute fields are shown on the customer "create" and 'edit" screens in bigcommerce, the attribute types must be manually created f or each store this can be done using the shell command below you will need to replace your store hash and your store api token values you can find the store hash in the url of the store admin page you will need to create an api token by going to settings > store level api accounts, clicking the create api account button, entering a descriptive name (e g sparklayer support), and selecting the modify value of the customers scope click save you will now see a popup with the credentials, which are also downloaded to your computer you will need the access token value replace the two values in the command below and run it in your terminal (please note that you can remove the attributes that are not needed to only create the required attributes) curl request post \\ \ url https //api bigcommerce com/stores/your store hash/v3/customers/attributes \\ \ header 'content type application/json' \\ \ header 'x auth token your store api token' \\ \ data '\[ 	{ 	 "name" "sparklayer price lists", 	 "type" "string" 	}, 	{ 	 "name" "sparklayer payment on account", 	 "type" "string" 	}, 	{ 	 "name" "sparklayer accounting id", 	 "type" "string" 	}, 	{ 	 "name" "sparklayer discount percentage", 	 "type" "number" 	}, 	{ 	 "name" "sparklayer sales agent groups", 	 "type" "string" 	}, 	{ 	 "name" "sparklayer parent customer id", 	 "type" "string" 	} ]' you will now see the attributes and be able to edit them in the customer create and edit pages order history importing historical orders into sparklayer it's possible to import historical b2b order data into sparklayer, allowing customers to see their previous order history once they access their account on your store to do this add a metafield to the order as shown below item details namespace this must be set as sparklayer key this must be set as order import value this must be set as a string of true any orders that are imported this way must also belong to a customer that has a b2b customer group assigned even though the order metafield above can be setup manually using one of the many metafield management apps available, for large numer of orders you might want to automate this using the bigcommerce order metafields api please note the note attribute must be added to the order after sparklayer is installed for the order to be synchronised correctly orders synced in this way can then be reported upon and will appear in the orders section of the sparklayer dashboard troubleshooting if your store was installed before the 14th of november, 2024 , you might need to contact the sparklayer customer support to re save your bigcommerce integration in order to register the required order metafield webhooks these webhooks notify our system of new metafields added to orders important considerations in order for sparklayer to work with bigcommerce metafields, please note the following product metafields metafields are always added at the product variant level, even if the product only comes in a single variant json data some sparklayer settings require metafields to be set up as json strings these will need to be carefully added, making sure the formatting is set correctly advanced settings to learn about more advanced settings, including customer level product metafield settings, please see product settings docid\ cm9b1i6cz0volc67g fji