# Shopify Companies

URL: https://docs.sparklayer.io/help/platforms/shopify/companies
Applies to: Shopify

How SparkLayer syncs your Shopify B2B companies, locations and contacts both ways, adds its own pricing and terms, and links orders and vaulted cards.

> **Quick summary**
>
> - Your Shopify B2B companies, their locations and their contacts show in SparkLayer at 
>   **Companies** in the SparkLayer Dashboard ([open](https://app.sparklayer.io/customers/companies)), or **SparkLayer Wholesale > Companies** in the Shopify app
>   , kept in sync both ways. Shopify holds who they are; SparkLayer adds what they buy at.
> - On each company and location, SparkLayer sets the customer group, an optional price list, pay later and the sales agents who look after them. Prices, payment methods and order rules come from SparkLayer, not from Shopify catalog prices or payment terms. A Shopify catalog still controls which products a company sees.
> - SparkLayer links its draft orders to the buyer's Shopify company and location, so orders show under the company and customers can use Shopify's vaulted cards.
> - Companies are optional: customers without one buy at their customer group's settings. Using Shopify Companies may mean extra transaction costs from Shopify, so check with Shopify Support.

## How it works

**Shopify Companies** is part of Shopify's native B2B features, now on every Shopify plan. You find it at **Customers > Companies** ([open in the Shopify admin](https://admin.shopify.com/companies)). 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.

Each Shopify company is a [company](https://docs.sparklayer.io/help/customers/companies.md) in SparkLayer, and its people are customers at that company. SparkLayer stores its own settings against each company and location:

| Shopify B2B holds | SparkLayer adds |
| --- | --- |
| The company's name and profile | Its **Customer group**, and so its prices, payment methods and order rules |
| Its locations and their addresses | An optional **Price list** for the company or any location |
| Its contacts, who sign in and buy | **Pay later**, and what the company and each location owes |
| | The **Sales agents who look after them** |
| | A [location tree](https://docs.sparklayer.io/help/customers/company-locations.md), and each person's role at a location |

How Shopify companies and SparkLayer work together:

1. **Company in Shopify**: Created in Shopify, or with Create company in SparkLayer
2. **Synced both ways**: The company, its locations and contacts show in SparkLayer, and changes reach the other side
3. **Terms set in SparkLayer**: Customer group, price list, pay later and sales agents
4. **Orders linked**: Draft orders are linked to the company, contact and location in Shopify

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 agents | Use companies. Set the terms on the company in SparkLayer. |
| Let several people buy for one business, or split a business into stores or regions | Use companies and [company locations](https://docs.sparklayer.io/help/customers/company-locations.md). |
| See B2B orders grouped by company in your Shopify admin | Use companies. SparkLayer links their orders automatically. |
| Sell to individual B2B customers on the same terms | You don't need companies. Customer groups handle everything. |

## Set up your companies

Once you've decided to use companies, create them and give each one its terms in SparkLayer.

1. Create your companies in Shopify at **Customers > Companies** ([open in the Shopify admin](https://admin.shopify.com/companies)), or click **Create company** at **Companies** in the SparkLayer Dashboard ([open](https://app.sparklayer.io/customers/companies)), or **SparkLayer Wholesale > Companies** in the Shopify app.
2. In SparkLayer, open each company at **Companies** in the SparkLayer Dashboard ([open](https://app.sparklayer.io/customers/companies)), or **SparkLayer Wholesale > Companies** in the Shopify app and choose its **Customer group**. Give it a **Price list** only if it needs different prices from its group, and turn on **Let them pay later** if it can pay by invoice.
3. Choose its **Main contact** and **Admins** from its people.
4. If the company buys for several stores or regions, click **Manage locations** and set them up. See [Company locations](https://docs.sparklayer.io/help/customers/company-locations.md).
5. Add people to the company: [invite them as buyers](https://docs.sparklayer.io/help/customers/invite-buyers.md) and choose the company, or add them as contacts of the company in Shopify.

See [Companies](https://docs.sparklayer.io/help/customers/companies.md) for every setting on the company page.

## 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:

1. **Buyer orders**: A buyer at a company places an order through SparkLayer
2. **Draft order created**: SparkLayer creates a draft order in Shopify
3. **Company linked**: The order is linked to the buyer, their company and the location
4. **Shown in Shopify**: The order appears under both the customer and the company

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](https://help.shopify.com/en/manual/b2b/checkout-and-orders/vaulted-cards). 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](https://docs.sparklayer.io/help/customers/company-users.md) 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 linked to several companies**: if a customer is a contact of more than one Shopify company, their draft order may not be linked to a company. 
- **Customers not in a company**: their orders are linked to the customer only.

## FAQs

**Do I need Shopify Companies to use SparkLayer?**

No. Customers who aren't in a company buy at their customer group's settings, and you add them to a group with a tag or an invite. Use companies to see B2B orders grouped by company in Shopify, or to let colleagues share vaulted cards, or when a business needs its own terms, several people buy for it, or it has several locations.

**If I change a company in Shopify, does SparkLayer update?**

Yes. Companies, locations and contacts are kept in sync both ways, so a change in Shopify shows in SparkLayer, and the other way round. Prices, payment terms and sales agents are set in SparkLayer.

**Can I use SparkLayer and Shopify's native B2B checkout at the same time?**

Not for the same customer session: the ordering experience is either SparkLayer or Shopify's native B2B checkout. Your Shopify companies still hold the business, its locations and its contacts, and SparkLayer uses them for ordering.

**Should I tag customers or set up Shopify companies?**

Both work together. Tags (or an [invite](https://docs.sparklayer.io/help/customers/invite-buyers.md), which adds the tag for you) make someone a B2B customer and put them in a customer group. Companies group the people who buy for the same business, and let you give that business its own terms and locations.

**Do I need Shopify Markets to use Shopify Companies?**

Not for SparkLayer pricing. Companies and Markets are separate features, but on plans other than Plus they're closely linked.

You can create company records without Markets. They work as structured customer profiles with locations, contacts and payment terms. But to give those companies their own Shopify pricing catalogs, you need Markets: on the Basic, Grow and Advanced plans, catalogs are assigned through Markets (customer groupings), not directly to companies. On Shopify Plus, you can assign catalogs directly to company locations without Markets.

SparkLayer doesn't use either for pricing. Your price lists and customer groups, and each company's terms, are managed in SparkLayer, whether or not you use Markets.

**What about Shopify's warning that apps may not attribute B2B orders correctly?**

SparkLayer handles it. It links draft orders to the right Shopify company and location, so B2B orders are attributed correctly in your Shopify admin.

## Next steps

- [Add B2B customers on Shopify](https://docs.sparklayer.io/help/platforms/shopify/invite-customers.md): Tag a customer you already have, or add a new one, so they see trade prices
- [Customer groups](https://docs.sparklayer.io/help/customers/customer-groups.md): Set the pricing and rules your B2B customers get in SparkLayer
- [Shopify limitations](https://docs.sparklayer.io/help/platforms/shopify/limitations.md): What SparkLayer can and can't do on Shopify
