Skip to main content

Show company data in the Customer Account Portal with profile blocks

Use profile blocks to show read-only company and location data, such as metafields, to your B2B customers in the Customer Account Portal.

Give B2B customers a read-only view of their company's details

Profile blocks let you show company and company location data to your B2B customers on the Profile or Orders page of the Customer Account Portal. A block can show Shopify metafields (for example an account number, credit limit or sales rep) and standard company fields such as the company name, tax registration ID or addresses.

Setting up a block takes two parts: you build the block in Onboard B2B, then add it to the Customer Account Portal using its block ID.

Create a profile block

  1. In the Onboard B2B app, go to Forms and blocks.

  2. In the Profile blocks section, click Create block.

  3. Under Block settings, enter a Title. Customers see this at the top of the block. You can use {{ company.name }} to show the customer's company name, as in the default title "Additional data for {{ company.name }}".

  4. Choose whether to keep Make card collapsible turned on (it's on by default). A collapsible block shows the first three fields, and customers click Show fields to see the rest.

  5. Under Fields, add the data you want to show:

    1. Add metafield: choose a Target (Company or Company location), then pick a metafield Definition.

    2. Add standard field: choose a Target, then pick a standard field, such as the company name, tax registration ID, or shipping and billing address.

    3. Drag fields to change their order.

  6. Under Installation, give the block an Admin title. This is for your reference only and isn't shown to customers.

  7. Click Save.

  8. Click Copy block ID. You'll need it in the next section.

The Forms used in column shows which Onboard B2B forms collect each field, so you can check where the data comes from.

Metafield access: when you save a block, Onboard B2B gives customer accounts read access to each metafield in it. That's what lets the block display the value. Only add metafields you're comfortable showing to the company's contacts.

The preview on the right of the editor uses filler data. To see real values, test the block in the Customer Account Portal.

Add the block to the Customer Account Portal

  1. In the Onboard B2B app, go to Installation and select the Company application and management tab.

  2. Under Customer account form, choose your checkout configuration and click Launch editor.

  3. In the Apps panel, find Onboard B2B > Company management.

  4. Click the + next to Custom company data display, then choose Profile or Orders.


    ​

  5. Select the block, then paste the block ID into the Block ID setting.

  6. Click Save.

To check it's live, go back to Installation in Onboard B2B. Under Extension overview, Custom data display shows Active.

What customers see

  • Only customers who are contacts of a company see the block. Other customers see nothing.

  • The block shows data for the company and the company location the customer is currently buying for. If they switch locations, the values update.

  • Fields with no value are hidden.

  • File metafields appear as links the customer can open.

Edit or delete a block

To change a block, go to Forms and blocks and select it in the Profile blocks list. Changes appear in the Customer Account Portal after you save, and you don't need to update the block ID.

To copy a block, open it and choose More actions > Duplicate. To delete a block, open it, choose More actions > Delete, then confirm with Delete block. This removes it from your shop and from the Customer Account Portal, and can't be undone. Remove the Custom company data display block from the customer account editor as well, so it doesn't show a warning there.

Troubleshooting

Problem

What to do

The editor shows "Block ID does not exist. Please include a valid block ID."

The Block ID setting is empty. Copy the ID from the block in Onboard B2B and paste it in.

The editor shows "Please include a valid block ID in the extension block settings for the extension to function."

The ID doesn't match a saved block. It may be mistyped, or the block was deleted. Copy the ID again from Forms and blocks.

A customer doesn't see the block.

Check that they're a contact of a company, and that the company or location has values for the block's fields. Empty fields are hidden.

Did this answer your question?