Skip to content

Shopify Companies

Applies toShopify

Steps for

How it works

Shopify Companies is part of Shopify's native B2B features, now on every Shopify plan. You find it at Customers,Companies (opens in your Shopify admin in a new tab). A Shopify company has a profile, locations (offices, branches or warehouses, each with its own addresses) and customers (the contacts who buy for it).

SparkLayer works with those records. It links its draft orders to the buyer's Shopify company, contact and location, so orders show under the company in your Shopify admin.

With the Shopify B2B companies setting on at SparkLayer Wholesale,Integrations,Platform (in your Shopify admin), each Shopify company is a company in SparkLayer, and its contacts are the people at that company. The sync runs one way, from Shopify to SparkLayer. Manage the company, its locations and its contacts in Shopify. Set its terms, such as its Customer group, Price list, pay later, sales reps and address settings, on its page in SparkLayer, or with company metafields in Shopify. While a company metafield has a value, it decides that setting, and the setting is locked on the company's page in SparkLayer, so you change it in Shopify. A change in SparkLayer never updates the metafield. See How it works.

How Shopify companies and SparkLayer work together

Company in Shopify

You create and change it at Customers > Companies
(this flows forward)

Synced to SparkLayer

The company, its locations and contacts show in SparkLayer
(this flows forward)

Terms set

On its page in SparkLayer, or with metafields in Shopify
(this flows forward)

Orders linked

Draft orders are linked to the company, contact and location in Shopify

With the sync off, you can build companies in SparkLayer instead.

SparkLayer still identifies B2B customers by their b2b customer tag and puts them in customer groups by their group tag (such as b2b-trade). A company's customer group sets the terms for the people at that company.

Do you need Shopify Companies?

Companies are optional. Use this table to decide before you set them up.

If you want to…Then
Give a business its own prices, payment terms or sales repsUse companies. Build them in SparkLayer with the sync off, where you set the terms on each company.
Let several people buy for one business, or split a business into stores or regionsUse companies and company locations.
See B2B orders grouped by company in your Shopify adminUse companies. SparkLayer links their orders automatically.
Sell to individual B2B customers on the same termsYou don't need companies. Customer groups handle everything.

Set up your companies

First choose where you'll manage them:

Set a company's terms with metafields

With the Shopify B2B companies setting on, you can set a company's terms in either of 2 places:

  • In SparkLayer, on the company's page.
  • In Shopify, with a SparkLayer metafield on the company.

Metafields are optional. Use them if you'd rather keep a company's terms in Shopify with the rest of the company. Shopify companies don't have tags, so a metafield is the only way to set a company's customer group from Shopify.

You can mix the 2. For example, set the Customer group in Shopify and Pay later in SparkLayer. Each field follows the rule below on its own.

How it works

There's one rule: if a metafield has a value, Shopify decides. If it's empty, SparkLayer decides.

How a company metafield reaches SparkLayer

Fill it in on Shopify

Enter a value on the company in Shopify
(this flows forward)

It syncs across

The value replaces what SparkLayer had for that field
(this flows forward)

The field locks

From now on, change that field in Shopify
What you do in ShopifyWhat happens in SparkLayer
Leave a metafield emptyNothing. You set that field in SparkLayer as usual.
Add a valueThe value replaces what SparkLayer had. The field locks on the company's page, with the hint "Set by the B2B - Customer Group metafield in Shopify. Remove it there to set it here."
Change the valueSparkLayer updates to the new value. The field stays locked.
Remove the valueThe field unlocks and keeps its last value. It doesn't reset. Change it in SparkLayer if you want something else.
Enter a value SparkLayer can't readThat company or location stops updating in SparkLayer until you fix the value. This includes its name and its other terms.

Removing a value doesn't undo it

To take a company off a price list, removing the metafield isn't enough: the company keeps the price list. Remove the metafield in Shopify, then remove the price list on the company's page in SparkLayer. To turn off an address setting, set its metafield to false instead of leaving it empty.

The 6 company metafields

Each one shows in Shopify with a name starting B2B -.

Metafield in ShopifyWhat it setsWhere you can use it
B2B - Customer GroupThe company's customer group, which sets its pricing and rulesCompany or location
B2B - Price ListsThe price lists its buyers getCompany or location
B2B - Payment on AccountWhether it can pay later, with its credit limit, balance and net termsCompany only
B2B - Sales Agent GroupsThe sales rep groups that look after itCompany only
B2B - Allow Personal AddressesWhether buyers can use their own saved addresses as well as the company'sCompany or location
B2B - Allow One-time AddressesWhether buyers can enter a one-off address at checkoutCompany or location

What to enter in each:

Metafield in ShopifyWhat to enterExample
B2B - Customer GroupThe group's tag. For the Base group, enter base, not b2b.b2b-trade
B2B - Price ListsA list of price list handles. Use the form below.["trade-25","clearance"]
B2B - Payment on AccountIts account details. Use the form below.{"credit_limit":1000}
B2B - Sales Agent GroupsOne group per entry, using letters, numbers and dashes.uk-north
B2B - Allow Personal Addressestrue or falsetrue
B2B - Allow One-time Addressestrue or falsefalse

For a customer group, b2b-trade and trade both mean the Trade group: SparkLayer ignores the b2b- at the start.

To write a B2B - Price Lists value, add each price list's handle here, then copy the result:

Build the value Fill in what you need and leave the rest blank.
Paste into sparklayer.price_lists
Fill in a value above

To write a B2B - Payment on Account value, fill this in and copy the result. Leave out anything you don't use, and enter amounts without a currency symbol.

Build the value Fill in what you need and leave the rest blank.
Paste into sparklayer.payment_on_account
Fill in a value above
Namespaces, keys and types, for developers and imports

All 6 use the sparklayer namespace.

Metafield in ShopifyKeyTypeOwner
B2B - Customer Groupcustomer_groupsingle_line_text_fieldCompany, company location
B2B - Price Listsprice_listsjsonCompany, company location
B2B - Payment on Accountpayment_on_accountjsonCompany
B2B - Sales Agent Groupssales_agent_groupslist.single_line_text_fieldCompany
B2B - Allow Personal Addressesallow_personal_addressesbooleanCompany, company location
B2B - Allow One-time Addressesallow_one_time_addressesbooleanCompany, company location

Check the metafields are set up

You don't need to create these metafields. SparkLayer creates all 6 in Shopify when you turn on the Shopify B2B companies setting. If you've already made one by hand, SparkLayer keeps it and doesn't add a duplicate.

To check they're there:

  1. Go to SparkLayer Wholesale,Integrations,Platform,Configurations (in your Shopify admin) and click Configure next to Metafields.
  2. Find Company metafields. Each one should show Enabled.
  3. If one doesn't, click the button beside it: Retry or Enable.

The list has Customer metafields too, and some share a name, such as Sales rep groups. Those are for customers. Only the ones under Company metafields work on a company.

Fill in a metafield

  1. In your Shopify admin, go to Customers,Companies (opens in your Shopify admin in a new tab) and click the company. For a location, click the location on the company's page.
  2. Find the metafields with names starting B2B -.
  3. Enter the value, using the list above. Leave any you don't need empty.
  4. Click Save.
  5. In SparkLayer, go to SparkLayer Wholesale,Companies (in your Shopify admin) and open the company. The field shows your value, with the hint that it's set by the metafield.

If the field hasn't changed, see the FAQs.

Companies and locations

A location uses its company's terms until it has its own. See Company locations.

To do thisDo this
Give the whole company a customer group, price list or address settingFill in the metafield on the company.
Give one location something differentFill in the same metafield on that location. That location's value applies there, and the other locations aren't affected.
Give one location its own pay later or sales repsUse SparkLayer. B2B - Payment on Account and B2B - Sales Agent Groups only work on the company, so set these on the location's page.

Example

A wholesale company buys at your Trade prices, with a 5,000 credit limit and Net 30 terms. Its Berlin location should use your Europe group instead. In Shopify, you'd enter:

WhereMetafieldValue
The companyB2B - Customer Groupb2b-trade
The companyB2B - Payment on Account{"credit_limit":5000,"net_terms":"30_days"}
The Berlin locationB2B - Customer Groupb2b-europe

In SparkLayer, the company is then in the Trade group, and its Customer group and pay later settings are locked. Berlin is in the Europe group, and every other location stays on Trade. The other metafields are empty, so you set the company's price lists, sales reps and address settings in SparkLayer.

FAQs about company metafields

Companies built in SparkLayer

With the Shopify B2B companies setting off, you can build companies in SparkLayer without using Shopify Companies. Click Create company at SparkLayer Wholesale,Companies (in your Shopify admin), then add its locations and people there.

Turning on the integration replaces companies built in SparkLayer

If you turn on the Shopify B2B companies setting later, your Shopify companies replace the companies you built in SparkLayer, along with their locations, people and settings. From then on, companies are managed in Shopify, and you set their terms in SparkLayer or with company metafields.

So if there's a chance you'll use Shopify Companies, create your companies in Shopify from the start.

How draft orders are linked to companies

When SparkLayer creates a draft order for a buyer at a company, it links the order to their Shopify company, contact and location. This keeps your Shopify orders and reports accurate.

Linking a SparkLayer order to a Shopify company

Buyer orders

A buyer at a company places an order through SparkLayer
(this flows forward)

Draft order created

SparkLayer creates a draft order in Shopify
(this flows forward)

Company linked

The order is linked to the buyer, their company and the location
(this flows forward)

Shown in Shopify

The order appears under both the customer and the company

What the order is linked to depends on how the customer is linked to companies in Shopify. This applies to every order SparkLayer creates, including a quote converted to an order.

The customer isThe order is placed against
Not linked to a companyThe customer only.
A contact at one location of one companyThe customer, the company and the location.
A contact at several locations or several companiesThe customer, and the company and location they chose to order for.

The delivery address the customer chooses at checkout becomes the Shopify order's shipping address. It doesn't decide which company location the order is linked to.

This means:

  • Orders from SparkLayer appear under the company in your Shopify admin. On the orders list, you see the company name under the customer's name.
  • Shopify's reports recognise them as B2B orders from that company.
  • It resolves Shopify's warning that "Some apps may not attribute B2B orders correctly on your current plan. Check that B2B orders are assigned to a company, not just an individual customer."

Use vaulted credit cards

Because SparkLayer links draft orders to the customer's company and location, your B2B customers can use Shopify's vaulted credit cards (opens in a new tab). They save a card once and reuse it on later orders.

Vaulted cards belong to a company location. When a customer saves a card, at checkout or in their customer account, it's available to every customer linked to the same company location. With SparkLayer, they work in 2 ways:

  • Pay Online by Card: when a customer chooses Pay Online by Card in the SparkLayer checkout, the cards saved for their company location appear under Credit card in the Shopify checkout. They can choose one, or click Use a different card.
  • Draft orders and invoices: when a customer uses another payment method (for example Pay by Invoice), you can charge a vaulted card on the resulting draft order from your Shopify admin. On the draft order, click Collect payment and choose the saved card.

Before you start

  • Shopify Payments turned on. Vaulted cards need Shopify Payments as your payment provider.
  • Customers linked to a Shopify company. The customer must be a contact of a company in your Shopify admin.
  • A saved card. Someone at the company location must have saved a card during a checkout or in their customer account. Once it's saved, every customer at that location can use it.

There's nothing to set up in SparkLayer. Vaulted cards work in the SparkLayer checkout as long as customers are linked to Shopify companies and Shopify Payments is active. They're available on every Shopify plan that has the Companies feature. Check any transaction fees with Shopify Support.

Control who can use vaulted cards

To stop some of a customer's team from using vaulted cards, use SparkLayer's company users feature. Give those team members the Limited role. They can browse and build an order, but they can't check out: their order goes to the main company user for approval instead. Because limited users never reach the Shopify checkout, they can't charge a card saved for the company location.

Limitations

  • Shopify catalogs still control which products a company sees: SparkLayer's price lists replace the prices in a Shopify catalog, but not the catalog's product list. If a customer is a contact at a Shopify company whose catalog leaves a product out, Shopify hides it from them: it's missing from your theme's search and its page shows a 404, even when SparkLayer gives them a price. Add the products to the catalog, remove the catalog from the company, or don't use Shopify companies for these customers.
  • Shopify payment terms aren't used: payment rules come from SparkLayer's customer groups, set on the company or location in SparkLayer. The payment terms on Shopify company records are ignored.
  • Shopify's locations don't nest : in Shopify, a company's locations sit side by side. Grouping them into regions, with locations inside other locations, is a SparkLayer feature.
  • Customers not in a company: their orders are linked to the customer only.

FAQs

Next steps

Was this page helpful?

Last updated