# Company users

URL: https://docs.sparklayer.io/help/customers/company-users

Let B2B customers invite colleagues to one company account to share orders, shopping lists and addresses, with Limited users whose orders need approval.

> **Quick summary**
>
> - Company users (also called sub-accounts or company roles) let a B2B customer invite colleagues to their company account. Everyone shares the company's orders, shopping lists and addresses, and orders at the same prices.
> - It's on by default. Turn it on or off with **Company users** at **Settings > Configurations > Ordering** in the SparkLayer Dashboard ([open](https://app.sparklayer.io/configuration/settings/general)), or **SparkLayer Wholesale > Settings > Configurations > Ordering** in the Shopify app. Customers invite colleagues from the **Company Users** section of My Account.
> - Invited users are **Standard** (can place orders) or **Limited** (orders go to the main user for approval). Company users are on every plan; order approval workflows need the Growth plan or above.
> - On BigCommerce, WooCommerce and Magento, invited users don't receive a confirmation email. See [Compare platforms](https://docs.sparklayer.io/help/platforms/compare.md).

## How it works

The customer who sends the invitations becomes the **main user** (the account owner, or admin). They decide who has access to the company account, and approve orders from limited users. Each user they invite signs in with their own email address, but orders on the company's account at the main user's prices.

How company users join an account:

1. **Turn it on**: Company users is on in Settings > Configurations
2. **Main user invites**: A B2B customer invites a colleague from My Account and picks a role
3. **Colleague signs in**: They activate their account, or sign in with an existing one
4. **Shared account**: Everyone sees the company's orders, shopping lists and addresses

Users of the same company share most of the account:

| Area | Shared? |
| --- | --- |
| **Order history** | Yes. Users see every order placed for the company, can check its status and re-order. |
| **Shopping lists** | Yes. Users can view and delete the company's shopping lists. |
| **Address book** | Yes. Users can view, edit and delete all the company's addresses. |
| **Shopping cart** | No. Items in one user's order aren't shared with other users. |

Company users can be used alongside [sales agent ordering](https://docs.sparklayer.io/help/sales-ordering.md): a sales agent can add users to a customer's company in the same way a main user does.

In the app, each person's role shows in the **Access** column at **Customers** in the SparkLayer Dashboard ([open](https://app.sparklayer.io/customers/list)), or **SparkLayer Wholesale > Customers** in the Shopify app: **Standard** or **Limited**. Open a customer to see everyone at their company under **Company users**.

## Turn on company users

Company users is on by default. To check it, or turn it off:

1. Go to **Settings > Configurations > Ordering** in the SparkLayer Dashboard ([open](https://app.sparklayer.io/configuration/settings/general)), or **SparkLayer Wholesale > Settings > Configurations > Ordering** in the Shopify app.
2. Turn **Company users** on or off ("Customers can create teams that share orders, shopping lists and addresses.").
3. Click **Save** in the bar at the top of the page.

When it's on, a **Company Users** section appears at the bottom of the [My Account](https://docs.sparklayer.io/help/storefront/interfaces/my-account.md) for every B2B customer. You can't turn it on for some customers only.

## Roles

Each company user has a role, which decides whether they can place orders themselves. The main user chooses it under **User role** when they invite someone.

| Role | What the user can do |
| --- | --- |
| **Standard** | Place orders and see all activity in the shared company account. |
| **Limited** | Add items to an order but not complete it. Their orders are sent to the main user for approval. |

## Invite a company user

Customers invite colleagues from your store, not from the SparkLayer app. You may want to explain these steps to your customers when you launch the feature.

1. In My Account, go to the **Company Users** section and click **Invite new user**.
2. Enter the colleague's **First Name**, **Last Name** and **Email**. They'll sign in with this email address.
3. Under **User role**, choose **Standard** or **Limited** (see [Roles](#roles)).
4. Click **Create Company User**.

What happens next depends on whether the person already has an account on your store:

| Account status | What happens |
| --- | --- |
| No account | They're emailed an invitation to set a password, which activates their account and adds them to the company. |
| Has an account | They sign in with their existing details to join the company. |
| Already a B2B customer | They can't be invited as a company user. Link them to the company manually instead: see [Link users to a company manually](#link-users-to-a-company-manually). |

**Shopify only:**

On Shopify, the invitation is Shopify's **Activate account** email ("Activate your account"), which you can edit at **Settings > Notifications** ([open in the Shopify admin](https://admin.shopify.com/settings/notifications)). You can't send a custom SparkLayer email instead.

**BigCommerce and WooCommerce and Magento only:**

On BigCommerce, WooCommerce and Magento, invited users don't receive a confirmation email. Tell them the email address they've been invited with and ask them to use "Forgot password" to set a password.

## Sign in as a company user

An invited user sees the [My Account](https://docs.sparklayer.io/help/storefront/interfaces/my-account.md) as usual. A message at the top says "You're signed into a Company User account", and explains that activity is shared across the company. Under **My Details**, the **Company** shows the company name and the account owner, for example "SparkLayer (Your company account owner is Bob Jones)".

They browse and order at the prices set for the main user in [Pricing](https://docs.sparklayer.io/help/pricing.md). They check out in the [My Cart](https://docs.sparklayer.io/help/storefront/interfaces/my-cart.md) with the same addresses, shipping methods and payment methods.

### How company user orders arrive in Shopify

**Shopify only:**

Orders are saved to the main user's account. By default, they arrive in Shopify as **draft orders**, with the customer's details on the right. The email of the user who placed the order is under **Additional details**, in the **Company User Email** field.

| Payment method | What happens |
| --- | --- |
| **Pay by Invoice** | A draft order is created for you to process. It stays a draft until payment is made. |
| **Pay on Account** | A draft order is created for you to process. It stays a draft until payment is made. |
| **Pay Online by Card** | A draft order is created and the customer is emailed to pay. It stays a draft until they do. |
| **Request for Quote** | A draft order is created for you to process. It stays a draft until payment is made. |

When the customer needs to pay, Shopify emails them their order with a **Complete your purchase** button. This uses the "Send invoice" feature of draft orders: see Shopify's guide to [sharing a checkout link](https://help.shopify.com/en/manual/orders/create-orders#share-checkout-link-with-customers). Once they pay, the order appears in your Shopify orders as paid. To change the email, edit the **Draft order invoice** template at **Settings > Notifications** ([open in the Shopify admin](https://admin.shopify.com/settings/notifications)).

If the customer hasn't paid, or you take payment another way, open the draft order in Shopify and click **Resend invoice**, or use **Collect payment** to mark it as paid.

## Approve orders from limited users

A limited user's orders wait for the main user to approve them before they reach you.

### What a limited user sees

When a limited user checks out, they see "This order needs to be reviewed". They submit the order with **Submit Order** instead of paying. SparkLayer holds it as a pending order, so you won't see it in your platform yet. Once the main user approves it, it becomes a normal order that you review, complete and fulfil as usual.

How an order from a limited user is approved:

1. **Limited user submits**: The order is saved for review with a P# reference
2. **Main user is emailed**: They open the order from the email or from My Account
3. **Complete or cancel**: Complete Order checks it out; Cancel Order removes it
4. **Limited user is told**: They get an email when the order is approved or changed

### Review orders as the main user

Orders waiting for approval appear in the main user's My Account under **Recent Activity**, on the **Requires approval** tab, with the status **Requires Approval**. Their reference starts with `P#` (for example `P#1264`), which sets them apart from other orders. To change it, use **Purchase ID prefix** and **Purchase ID postfix** at **Settings > Configurations > Store** in the SparkLayer Dashboard ([open](https://app.sparklayer.io/configuration/settings/general)), or **SparkLayer Wholesale > Settings > Configurations > Store** in the Shopify app. See [Settings](https://docs.sparklayer.io/help/dashboard/settings.md).

The main user opens the order and, from the **Actions** menu, chooses:

| Action | What it does |
| --- | --- |
| **Complete Order** | Loads the order into a new cart so the main user can check out and place it. |
| **Cancel Order** | Cancels the order and removes it from the **Requires approval** list. |

SparkLayer sends emails at each stage, so neither user needs to be signed in to keep track:

| Email to | Sent when | What it contains |
| --- | --- | --- |
| **Main user** | A limited user submits an order. | Who placed it, a summary of up to five items with the totals, shipping method and address, and a **Review Order** button. |
| **Limited user** | The main user approves or changes their order. | An update on the order's status. |

The store name at the top of these emails comes from your eCommerce platform. To change it, edit **Store details** at **Settings > Configurations > Store** in the SparkLayer Dashboard ([open](https://app.sparklayer.io/configuration/settings/general)), or **SparkLayer Wholesale > Settings > Configurations > Store** in the Shopify app: see [Settings](https://docs.sparklayer.io/help/dashboard/settings.md).

## Remove a company user

The main user removes a colleague from My Account:

1. Open the **Company Users** section.
2. Click the bin icon next to the user. They lose access to the company.

## Link users to a company manually

You can add a customer to a company yourself, for example when the person is already a B2B customer and can't be invited.

**Shopify:**

You link a customer by setting customer metafields in Shopify. SparkLayer can add the metafield definitions for you: go to **Integrations > Platform** in the SparkLayer Dashboard ([open](https://app.sparklayer.io/configuration/integrations/platform)), or **SparkLayer Wholesale > Integrations > Platform** in the Shopify app and, on the **Metafields** card, click **Configure**. Or add them yourself at **Settings > Metafields and metaobjects > Customers** ([open in the Shopify admin](https://admin.shopify.com/settings/custom_data/customer/metafields)). See [Shopify metafields and data mapping](https://docs.sparklayer.io/help/platforms/shopify/metafields.md).

1. Find the main user's customer ID. Open them in your Shopify admin: the ID is the number at the end of the page address. For example, in `https://your-shopify-store-url.com/admin/customers/6494756339930` the ID is `6494756339930`.
2. Open the customer you want to link and, under **Metafields**, set `parent_customer_id` to the main user's ID.
3. Optionally, set their role with the `role` metafield.
4. Give them the same B2B tags as the main user. For example, if the main user has `b2b` and `b2b-company-1`, add both.

**Lots of customers? Fill them in one table (Shopify):** in your Shopify admin, go to **Customers**, tick the customers and click **Edit customers**. Click **Columns**, tick the SparkLayer field under **Metafields**, type the values and click **Save**. See [Shopify's guide](https://help.shopify.com/en/manual/custom-data/metafields/bulk-edit-metafields).

| Metafield | Type | Namespace and key | Value |
| --- | --- | --- | --- |
| Parent customer | Single line text | `sparklayer.parent_customer_id` | The main user's customer ID. |
| Role | Single line text | `sparklayer.role` | `main` for Standard, or `limited-customer` for Limited. |

**Other platforms:**

See the [developer docs](https://docs.sparklayer.io/developers.md) and [Metafields](https://docs.sparklayer.io/developers/data/metafields.md) for how to link customers on your platform.

## Customise the text

You can change the wording of the Company Users section by adding translations to your [Core Script](https://docs.sparklayer.io/help/storefront/storefront-options.md#add-a-core-script-setting). This is a code change, so it's usually done by your developer or agency. See [Languages and international](https://docs.sparklayer.io/help/storefront/languages-and-international.md).

**Code for your developer**

```javascript title="Core Script"
translations: {
  en: {
    "account.main.company-users.actions": "Actions",
    "account.main.company-users.title": "You're signed into a Company User account",
    "account.main.company-users.child-account-notice": "Any activity will be shared across all users from your company. This applies to orders, shopping lists, and addresses. Please speak to your company account owner if you have any queries.",
    "account.main.company-users.email": "Email",
    "account.main.company-users.delete-confirm-message": "Are you sure you want to remove this user from your company?",
    "account.main.company-users.delete-failed-message": "Failed to delete user.",
    "account.main.company-users.header": "Company Users",
    "account.main.company-users.invite-button-text": "Invite new user",
    "account.main.company-users.invite-user.header": "Invite new user",
    "account.main.company-users.invite-user.invite-sent": "User invite sent",
    "account.main.company-users.invite-user.invite-failed": "Sorry, something has gone wrong and we have not been able to invited this user",
    "account.main.company-users.invite-user.form.first-name": "First Name",
    "account.main.company-users.invite-user.form.last-name": "Last Name",
    "account.main.company-users.invite-user.form.email": "Email",
    "account.main.company-users.invite-user.form.send-invite": "Create Company User",
    "account.main.company-users.invite-user.form.cancel": "Cancel",
    "account.main.company-users.invite-user.form.description": "When you invite company users, any activity will be shared across your team including orders, shopping lists, and addresses. If the user you're inviting doesn't already have an account to login to our store, they'll receive an Account Activation email and they'll be asked to set a password to gain access. If they already have an account, they can login with their existing details by visiting the login page. If you're unsure about inviting users, please speak to your contact within our company."      
    }
  },
```

## Limitations

- **Invitation emails:** on Shopify, invited users receive Shopify's "Activate Account" email. You can't create a custom email for this.
- **All customers:** once company users is turned on, every B2B customer can invite users. You can't choose which customers have it.

## FAQs

**Do company users see the same prices as the main user?**

Yes. They order at the prices set up for the main user.

**Can I see who placed an order?**

Yes. On Shopify, the user's email is in the **Company User Email** field under **Additional details** on the order.

**Why can't I see an order from a limited user?**

It's waiting for the main user's approval and only reaches your platform once they complete it.

**What if someone can't be invited because they're already a B2B customer?**

Link them to the company with metafields instead: see [Link users to a company manually](#link-users-to-a-company-manually).
