How to Display Collected B2B Customer Data in Your Templates
Once you have successfully collected B2B data from your customers - whether they provided it on the Checkout page, the Thank You page, or you added it for them via the B2B app block - you can easily display this information directly within your templates.
Follow these steps to add the data to your desired layout:
Navigate to Manage templates within your app settings.
Click Edit on the specific template you want to modify.
Select the exact location on the template where you want the customer's data to appear.
Note: While you can display all collected data, most merchants typically only need to add the VAT Number to their standard templates.
Available Metafield Codes
To display the collected information, simply copy and paste the corresponding metafield codes into your template. You can use any combination of the following three variables depending on your needs:
To display the Company Name: Copy and paste:
{{ customer.metafields.b2b.customer_data.company_name }}This will output exactly what is written in the customer's Company Name field.
To display the VAT Number: Copy and paste:
{{ customer.metafields.b2b.customer_data.vat_number }}This will output exactly what is written in the customer's VAT Number field.
To display the Peppol Address: Copy and paste:
{{ customer.metafields.b2b.customer_data.peppol_address }}This will output exactly what is written in the customer's Peppol Address field.
Note: Please beware that the Metafield block will be appearing on your Orders and Customers Admin. Do not alter the information since it might affect the data displayed in your templates.
Peppol Address is not mandatory to be filled out if you want to collect VAT Number or Company name only.