Integrations Guide
Connect B2B Onboard to invoicing apps via customer metafields. VAT numbers, tax IDs, and company info flow automatically.
Metafields Overview
When an application is approved, B2B Onboard writes customer metafields to the Shopify customer record. These metafields are available to any app or Liquid template that reads customer data.
| Metafield | Type | Description |
|---|---|---|
custom.company_name |
single_line_text_field | Company name from the application |
custom.contact_name |
single_line_text_field | Contact person name |
custom.vat_number |
single_line_text_field | VAT number (if form includes a VAT field) |
custom.tax_id |
single_line_text_field | Tax ID (if form includes a tax ID field) |
b2b_onboard.application_id |
single_line_text_field | Internal application ID for reference |
b2b_onboard.approved_at |
date_time | Timestamp of approval |
The custom namespace is the standard Shopify namespace that third-party apps can auto-discover. The b2b_onboard namespace contains app-specific internal fields.
Company metafields (written on approval)
When approval creates a new B2B Company, B2B Onboard also writes business fields onto the company record as metafields in the b2b_onboard namespace. These are readable by Shopify Flow, reports, and any app with company read access:
| Metafield | Type | Description |
|---|---|---|
b2b_onboard.business_type |
single_line_text_field | Business type from the application form |
b2b_onboard.tax_id |
single_line_text_field | Tax or VAT registration number submitted |
b2b_onboard.tax_id_verification_status |
single_line_text_field | verified or invalid — written only when a registry answered |
b2b_onboard.tax_id_verification_source |
single_line_text_field | Which registry answered (VIES, VATsense, HMRC, ABR, NZBN, Brønnøysund) |
b2b_onboard.approved_at |
date_time | When the application was approved |
b2b_onboard.exemption_renewal_date |
date | Earliest expiry across the certificates on the application (only when present) |
b2b_onboard.application_reference |
single_line_text_field | The B2B Onboard application the company came from |
Fields with no submitted answer are left off rather than written blank, and approving an applicant into an existing company writes nothing — the b2b_onboard values on a company you already had are never overwritten (your own bound metafields follow the per-binding policy described below). In Liquid: {{ order.company.metafields.b2b_onboard.tax_id.value }}.
Map form questions to your own metafields
On every plan, each question on a form can be mapped to one or more of your existing metafield definitions on the Customer, Company or Company location. The applicant's answers are written to those fields when you approve the application.
Where the definitions come from
Definitions come from Settings → Custom data → Customers / Companies / Company locations in your Shopify admin. B2B Onboard lists the definitions of compatible types so you can pick one; it never creates, edits or deletes definitions on your behalf.
Which field types can be mapped
| Form field type | Compatible metafield types |
|---|---|
| Text | single_line_text_field, multi_line_text_field, url, number_integer, number_decimal, date |
single_line_text_field |
|
| Phone | single_line_text_field |
| Long text (textarea) | multi_line_text_field |
| Dropdown (select) | single_line_text_field, list.single_line_text_field |
| Multi-select | list.single_line_text_field, single_line_text_field |
| Checkbox | boolean |
| Tax / VAT ID | single_line_text_field |
Address blocks, file uploads and layout elements (headings, paragraphs) cannot be mapped — they have no single value to store.
Choices
If you bind a dropdown or multi-select to a definition that has a fixed list of choices, the field's option values must match that list. The form editor warns you when they do not, so you can fix the options before applicants see them.
What happens to a value that already exists
Each binding has its own policy for records that already hold a value:
- Keep existing value (fill only when empty) — the default. The answer is written only where the field is currently empty.
- Overwrite existing value — the answer replaces whatever is stored.
- New records only — the answer is written only when the approval creates the customer, company or location.
Before you confirm an approval, the Approve dialog lists every planned write and marks the ones that would replace an existing value, showing the value being replaced. Overwrites follow the policy you chose on the binding; the dialog shows the value being replaced so you can cancel if it looks wrong.
After approval
The application page shows a Shopify metafields card listing each key as written, overwritten (with the previous value) or failed (with the reason Shopify gave). The company page shows the current values read live from Shopify, next to the fixed fields described above.
Data erasure
When Shopify sends a customers/redact request for an applicant, B2B Onboard deletes the values it wrote and restores the values it overwrote to what they held before the approval.
The fixed b2b_onboard fields listed in the previous section keep working exactly as before, alongside any bindings you add.
From your Shopify metafields
The form editor's field palette also works the other way round: it lists your compatible definitions that no question maps to yet, and adding one inserts a ready-made question already mapped to it. The four customer fields the app creates itself for invoicing apps (custom.company_name, custom.contact_name, custom.vat_number, custom.tax_id) are not suggested there because approval already fills them, and for the same reason they are left out of a field's Write to metafield list. For a definition with a fixed list of choices, the new dropdown's options are taken from that list.
Sufio
Sufio is a popular invoicing app for Shopify that generates professional invoices automatically.
How it works: Sufio auto-reads custom.vat_number from the customer record and includes it on invoices. No additional configuration is needed in Sufio.
If you use Shopify B2B: Sufio also reads the native taxRegistrationId from B2B Company locations. If you have B2B Company Creation enabled in B2B Onboard settings, the tax registration ID is written there too.
Setup: No setup required. Approve an application in B2B Onboard, and the VAT number will appear on the next Sufio invoice for that customer.
Order Printer
Order Printer is Shopify's free app for printing invoices, packing slips, and receipts using Liquid templates.
Best approach — native B2B objects: If you use Shopify B2B Company Creation, the most reliable method is to use native B2B Liquid objects in your Order Printer template:
{% if order.company %}
<p><strong>Company:</strong> {{ order.company.name }}</p>
{% endif %}
{% if order.company_location.tax_registration_id %}
<p><strong>VAT:</strong> {{ order.company_location.tax_registration_id }}</p>
{% endif %}
Alternative — customer metafields: If you do not use B2B Company Creation, you can access customer metafields directly:
{% if customer.metafields.custom.company_name %}
<p><strong>Company:</strong> {{ customer.metafields.custom.company_name.value }}</p>
{% endif %}
{% if customer.metafields.custom.vat_number %}
<p><strong>VAT:</strong> {{ customer.metafields.custom.vat_number.value }}</p>
{% endif %}
Note: Customer metafield access in Order Printer templates can be unreliable due to a known Shopify limitation. The native B2B objects are the recommended approach.
Billbee
Billbee is a German multi-channel order management and invoicing platform.
Limitation: Billbee only reads order-level note_attributes, not customer metafields. This cannot be solved directly in B2B Onboard.
Workaround with Shopify Flow: Create a Flow workflow that copies the customer VAT metafield to the order's note attributes when an order is created:
- In Shopify admin, go to Settings → Flow
- Create a new workflow with trigger: Order created
- Add a condition: customer has metafield
custom.vat_number - Add action: Update order note to include the VAT number with key
vat-id - Turn on the workflow
Billbee will then pick up the vat-id from the order note attributes and use it in invoices.
Native Shopify B2B
For the best invoicing app compatibility, enable B2B Company Creation in your B2B Onboard settings. This works on any paid Shopify plan with B2B enabled — Shopify Plus or Shopify’s foundational B2B on non-Plus plans.
When B2B Company Creation is active, approving an application also:
- Creates a Shopify B2B Company with the company name and address
- Sets the
taxRegistrationIdon the company location (VAT number) - Assigns the customer as a company contact
- Optionally assigns a B2B catalog (Shopify Plus) or adds the company's location to your Default B2B market (Basic, Grow, Advanced) for wholesale pricing
Invoicing apps that support Shopify's native B2B objects (including Sufio and Order Printer) will automatically pick up company names and tax registration IDs from orders placed by B2B customers.
See the B2B Company Creation settings for configuration details.
Any App
Any Shopify app or integration that reads customer metafields can access B2B Onboard data. The metafields use the standard custom namespace, which is discoverable through Shopify's metafield definitions API.
For developers: Query customer metafields via the Shopify Admin API:
{
customer(id: "gid://shopify/Customer/123") {
metafields(first: 10, namespace: "custom") {
edges {
node {
key
value
}
}
}
}
}
For Liquid themes: Access metafields in your theme templates:
{{ customer.metafields.custom.company_name.value }}
{{ customer.metafields.custom.vat_number.value }}
{{ customer.metafields.custom.tax_id.value }}
If you use an invoicing app not listed on this page and need help connecting it to B2B Onboard, contact support.
Address Autocomplete
Connect your own Google Maps JavaScript API key to enable Google-powered address autocomplete on the address fields of your public registration form. When a buyer starts typing a street address, Google suggests matching addresses; picking a suggestion automatically fills the street address, city, state / province, country, and ZIP / postal code. This improves data quality and speeds up applications.
The key is a public, HTTP-referrer-restricted browser key that you own and are billed for directly by Google. Mentilead does not proxy, meter, or bill for Maps usage. Google offers a generous free monthly allowance for autocomplete; see Google's pricing for details. Leave the field blank to keep autocomplete off — buyers then enter addresses manually, exactly as before.
Setup:
- In the Google Cloud Console, create (or select) a project and enable both the Maps JavaScript API and the Places API.
- Under APIs & Services → Credentials, create an API key.
- Add an HTTP referrer restriction for your storefront domain (for example
https://your-store.myshopify.com/*and any custom domain) so the key can only be used from your storefront. - Copy the key and paste it into Settings → Integrations → Address autocomplete in B2B Onboard, then click Save.
Because the key is restricted to your storefront domain, it is safe for the browser to load it — that is how Google's Maps JavaScript API is designed to work. To disable autocomplete later, clear the field and save.