# Sales rep setup

URL: https://docs.sparklayer.io/help/sales-reps

Add a sales agent so a member of your team can order for your B2B customers, choose which customer groups they can see, and change or remove their access.

> **Quick summary**
>
> - To let a member of your team order for your B2B customers, make them a sales agent: go to **Customers > Agents** in the SparkLayer Dashboard ([open](https://app.sparklayer.io/v2/customers/agents)), or **SparkLayer Wholesale > Sales agents** in the Shopify app and click **Add sales agent**. A sales agent is a customer account in your store with a sales agent role.
> - By default, a sales agent can see every B2B customer. To limit them, tick the **customer groups** they can see on their page. What each role allows is set in [Roles and permissions](https://docs.sparklayer.io/help/sales-reps/roles.md).
> - Sales agents are on the Starter plan and above: Starter includes 1, Growth 2 and Pro 5. The **Your agents** card shows how many you've used, for example "1 of 2 used". See [Plans and limits](#plans-and-limits).

This page is for you, the store owner or admin. Once you've set up your reps, they use [Sales rep ordering](https://docs.sparklayer.io/help/sales-ordering.md) to take orders.

## How it works

Any customer in your store can be a sales agent: you give their account a sales agent role. When they sign in to your store, they choose one of the customers they look after. They then order on that customer's behalf, at the customer's prices.

How a sales agent is set up:

1. **Give someone the role**: Any customer can be an agent
2. **Choose who they see**: Some customer groups, or every customer
3. **They order for customers**: They sign in on your store and order for the customers they manage

## Before you start

Each sales agent needs:

- **An active customer account** in your store for the person, with an email address and a complete address.
- **Marked as a B2B customer** in your platform, for example tagged `b2b` on Shopify (see below). SparkLayer only uses `b2b` plus one customer group tag, so remove any other B2B-looking tags: they can conflict.
- **Their own login.** Give every agent their own account and email address. Shared logins make [cart locking](https://docs.sparklayer.io/help/sales-ordering/order-for-a-customer.md#cart-locking) conflicts more likely.
- **A free sales agent place** on your plan. Check the "used" count on the **Your agents** card at **Customers > Agents** in the SparkLayer Dashboard ([open](https://app.sparklayer.io/v2/customers/agents)), or **SparkLayer Wholesale > Sales agents** in the Shopify app.

## Add a sales agent

**Shopify:**

1. In your Shopify admin, open the person at **Customers** ([open in the Shopify admin](https://admin.shopify.com/customers)), add the `b2b` tag and save.
2. Go to **Customers > Agents** in the SparkLayer Dashboard ([open](https://app.sparklayer.io/v2/customers/agents)), or **SparkLayer Wholesale > Sales agents** in the Shopify app and click **Add sales agent**.
3. Choose the **Customer**.
4. Choose a **Role**: **Sales agent** or **Sales administrator**.
5. Click **Add agent**.

**More detail**

- To give someone a [custom role](https://docs.sparklayer.io/help/sales-reps/roles.md), add them first, then change their role on their page (see [Change or remove a sales agent](#change-or-remove-a-sales-agent)).
- You can also give someone a role from their customer page at **Customers** in the SparkLayer Dashboard ([open](https://app.sparklayer.io/customers/list)), or **SparkLayer Wholesale > Customers** in the Shopify app: under **Role**, choose the role and click **Save** in the save bar.
- Make every change to a sales agent, including their role and the customer groups they see, in SparkLayer: changing a sales agent's metafields in Shopify has no effect.

**Wix:**

1. In Wix, set the person up as a contact with a complete address and the `b2b` label, and check they're a **Site Member**.
2. Go to **Customers > Agents** in the SparkLayer Dashboard ([open](https://app.sparklayer.io/v2/customers/agents)), or **SparkLayer Wholesale > Sales agents** in the Shopify app and click **Add sales agent**.
3. Choose the **Customer** and a **Role**, then click **Add agent**.

**Other platforms:**

1. Add the person to a B2B customer group in your platform: a BigCommerce group whose name starts with `B2B`, a **SparkLayer Role** in WooCommerce, or a Magento customer group prefixed "B2B". See [Customer groups](https://docs.sparklayer.io/help/customers/customer-groups.md).
2. Go to **Customers > Agents** in the SparkLayer Dashboard ([open](https://app.sparklayer.io/v2/customers/agents)), or **SparkLayer Wholesale > Sales agents** in the Shopify app and click **Add sales agent**.
3. Choose the **Customer** and a **Role**, then click **Add agent**.

The roles you can choose:

| Role | What it allows |
| --- | --- |
| **Customer** | Can log in and place orders for themselves. With this role, they're not a sales agent. |
| **Sales agent** | Can place orders and manage addresses, shopping lists, and company access on behalf of customers. |
| **Sales administrator** | All sales agent permissions, plus editing order prices and creating new customers. |
| Custom roles | Any [custom role](https://docs.sparklayer.io/help/sales-reps/roles.md#create-a-custom-role) you've created. Choose these on the agent's page. |

## Restrict which customers a sales agent can see

By default, a sales agent can see every B2B customer. To limit them to a territory or a type of customer, tick the [customer groups](https://docs.sparklayer.io/help/customers/customer-groups.md) they look after. They then only see customers in those groups.

1. Go to **Customers > Agents** in the SparkLayer Dashboard ([open](https://app.sparklayer.io/v2/customers/agents)), or **SparkLayer Wholesale > Sales agents** in the Shopify app and click the agent's name.
2. On the **Role** card, under **Customers this agent can see**, tick the customer groups they should see. **Base** is the base customer group.
3. Click **Save** in the save bar.

To let them see every customer again, untick every group. The **Can see** column on the **Sales agents** screen shows the groups, or **All customers**.

**More detail**

- Each customer's page, at **Customers** in the SparkLayer Dashboard ([open](https://app.sparklayer.io/customers/list)), or **SparkLayer Wholesale > Customers** in the Shopify app, lists the agents who can see them under **Sales agents who can see them**.
- To divide customers between agents, set up customer groups that match how you split them, such as one group per region. See [Customer groups](https://docs.sparklayer.io/help/customers/customer-groups.md).
- Older setups used a **sales agent groups** metafield (`sparklayer.sales_agent_groups`) on each customer, and on BigCommerce the **SparkLayer - Sales Agent Groups** attribute. Sales agent groups still apply, alongside the customer groups on the agent's page. See [Older setups: sales agent groups](#older-setups-sales-agent-groups).

### Older setups: sales agent groups

If your store was set up before agents were limited by customer group, it may use sales agent groups instead. Keep these rules in mind:

- **Sales agent groups only work through the customer metafield** `sparklayer.sales_agent_groups`. Customer tags don't put a customer in a sales agent group.
- **Values can only use letters, numbers and dashes**, for example `uk-north`. Spaces aren't allowed.
- **On Shopify, set the metafield to Limit to preset choices**, or customers can fail to sync. See [Set up the sales agent groups metafield](https://docs.sparklayer.io/help/platforms/shopify/metafields.md#set-up-the-sales-agent-groups-metafield).
- **To set it for many customers at once**, use Shopify's bulk editor or an app such as [Matrixify](https://apps.shopify.com/excel-export-import). See [Fill in metafields many at once](https://docs.sparklayer.io/help/platforms/shopify/metafields.md#import-metafields-in-bulk).

## Sign in as a sales agent

Once you've added an agent and chosen who they see, they're ready to order. Here's what they do on your store:

1. The sales agent signs in to your store with their own account, as a customer would.
2. They open the SparkLayer widget. As a sales agent, they also see a **My Customers** tab.
3. They choose a customer to order for. See [Order for a customer](https://docs.sparklayer.io/help/sales-ordering/order-for-a-customer.md).

**More detail**

A sales agent can use the same login on several devices, and act as a different customer on each. Only B2B customers with an email address appear in their search.

## Get notified of customer orders

When a customer places an order themselves, you can email their sales agent using your platform's automations.

**Shopify only:**

On Shopify, use [Shopify Flow](https://apps.shopify.com/flow). A typical flow starts when an order (or draft order) is created. It checks which customer it's for, and sends that customer's sales agent an internal email with the order number. Start from our [sample Shopify Flow template](https://cdn.shopify.com/s/files/1/0612/7602/9065/files/Sales_Agents_-_Email_sales_agent_when_order_placed_by_customer.flow?v=1726494991).

## Change or remove a sales agent

To change what an agent can do, give them a different role. To remove their sales agent access, give them the **Customer** role.

1. Go to **Customers > Agents** in the SparkLayer Dashboard ([open](https://app.sparklayer.io/v2/customers/agents)), or **SparkLayer Wholesale > Sales agents** in the Shopify app and click the agent's name.
2. Under **Role**, choose a different role, or choose **Customer** to remove sales agent access.
3. Click **Save** in the save bar.

**More detail**

With the **Customer** role, the person keeps their customer account and can still sign in and order for themselves. It also frees up their sales agent place.

## The Sales agents screen

**Customers > Agents** in the SparkLayer Dashboard ([open](https://app.sparklayer.io/v2/customers/agents)), or **SparkLayer Wholesale > Sales agents** in the Shopify app is where you manage your agents. The **Your agents** card lists everyone with a sales agent role, with **View customers** and **Add sales agent** at the top.

| Part | What it shows / does |
| --- | --- |
| **Used** badge | How many sales agents you have out of your plan's allowance, for example "1 of 2 used". |
| Search | Find an agent by name or email. |
| **Name** | The agent's name. Click it to open the agent's page. |
| **Email** | The email they sign in with. |
| **Role** | **Sales agent**, **Sales administrator** or a custom role. |
| **Can see** | The customer groups the agent is limited to, or **All customers**. |

Under the list, **How agents work** sums up the three steps: give someone the role, choose who they see, and they order for customers.

## The agent's page

Click an agent's name to open their page. It's the same page as a customer's, with what SparkLayer holds for them: **Basic information**, **Financial details**, **Role**, **Company users**, **Addresses** and **Identifiers**. Click **View in Shopify** to open them in your Shopify admin.

You can only change the **Role** card here. Everything else comes from your store.

| Part | What it shows |
| --- | --- |
| **Basic information** | Email, company, customer group, price list override, and **Customer groups they can see**: the groups, or **All customers**. |
| **Role** | The agent's role, and under it **Customers this agent can see**. |

Save changes with **Save** in the save bar.

## Plans and limits

| Plan | Sales agents included |
| --- | --- |
| Basic | None |
| Starter | 1 |
| Growth | 2 |
| Pro | 5 |
| Enterprise | Custom |

The **Your agents** card at **Customers > Agents** in the SparkLayer Dashboard ([open](https://app.sparklayer.io/v2/customers/agents)), or **SparkLayer Wholesale > Sales agents** in the Shopify app shows how many you've used. When they're all used, **Add sales agent** shows **You've used all your sales agents**. Click **Compare plans** to move to a plan with more, or change an agent's role to **Customer** to free up a place. Extra sales agents are also available for $39 a month each. See [Your plan and usage](https://docs.sparklayer.io/help/dashboard/plan-and-features.md).

On the Basic plan, sales agents and roles are locked:

- Clicking **Sales agents** in the menu opens a window that explains the feature, marked **Included in Starter**. Click **Try Starter free for 14 days** to start a trial, or **Book a 15-min demo**.
- The screen itself shows **Sales agents are on Starter and above**, with **Compare plans** and **See how it works**.
- In the SparkLayer Dashboard, the **Sales agents** menu item has a **Starter** tag.

## The Sales reps section

Sales rep setup is part of the Help Center's **Sales reps** section:

| Part | Who it's for | Use it to |
| --- | --- | --- |
| **Sales rep setup** (this part) | You, as the store owner or admin | Make someone a sales agent, choose which customers they see and what their role lets them do. |
| [Sales rep ordering](https://docs.sparklayer.io/help/sales-ordering.md) | Sales reps | Take an order for a customer in the cart. |

## Troubleshooting

**Diagnose: Sales agent having problems?** Check their account, role and the customers they can see.

1. **What’s happening?** Pick the closest match.
   - The agent doesn’t see sales agent mode: go to question 2
   - A customer is missing from the agent’s search: go to question 3
   - The agent sees customers they shouldn’t: go to question 4
   - “The cart is being processed by a sales agent”: go to fix A (Another agent has that customer open)
   - The agent can’t edit prices, add customers or override rules: go to question 5
2. **Does the agent’s own customer record have the `b2b` tag?** A sales agent is a B2B customer account with a sales agent role. Where to look: Customers > select the customer > Tags (Shopify admin).
   - Yes: go to question 6
   - No: go to fix B (Add the `b2b` tag to the agent’s account)
3. **Does the missing customer have the `b2b` tag?** Only B2B customers appear in an agent’s search. Where to look: Customers > select the customer > Tags (Shopify admin).
   - Yes: go to question 7
   - No: go to fix C (Add the `b2b` tag to the customer)
4. **Is the agent limited to some customer groups?** By default an agent sees every B2B customer. Where to look: Customers > Agents (SparkLayer).
   - Yes: go to question 8
   - No, all customers: go to fix D (Limit the agent to their customer groups)
5. **Does the agent’s role include permission for this?** Roles decide what an agent can do beyond placing orders, such as editing prices or adding customers. Where to look: Customers > Roles (SparkLayer).
   - Yes: go to question 9
   - No / not sure: go to fix E (Give the role that permission)
6. **Is the person listed as a sales agent in SparkLayer?** Their role decides what they can do. Where to look: Customers > Agents (SparkLayer).
   - Yes: go to question 10
   - No / not sure: go to fix F (Make them a sales agent)
7. **Is the agent limited to some customer groups?** The Sales agents screen shows the groups each agent can see, or All customers. Where to look: Customers > Agents (SparkLayer).
   - Yes: go to question 11
   - No, all customers: go to fix G (Check the customer has synced)
8. **Does your store still use the older sales agent groups metafield (`sparklayer.sales_agent_groups`)?** Older setups gave customers sales agent group values in a metafield. Customer tags never work for this. Where to look: Customers > select the customer > Metafields (Shopify admin).
   - Yes: go to fix H (Check the customers’ sales agent group values)
   - No: go to fix I (Check the customers’ groups)
9. **Is the agent trying to raise a price?** Agents can edit unit prices on an order, but only downwards.
   - Yes: go to fix J (Prices can only be lowered)
   - No: go to fix K (Everything checks out)
10. **Are they signed in on your store with exactly that email?** A different or mistyped email creates a new retail customer with no sales agent role.
   - Yes: go to fix L (Check your plan includes sales agents)
   - No / not sure: go to fix M (Sign in with the sales agent’s email)
11. **Is the customer in one of those groups?** Check the customer’s group tag against the agent’s groups. Where to look: Customers > select the customer > Tags (Shopify admin).
   - Yes: go to fix G (Check the customer has synced)
   - No: go to fix N (Let the agent see that group)

**Fixes**

- **A. Another agent has that customer open** A customer’s cart is locked to the sales agent acting for them. Another agent, or the same login on another device, sees this message until the first agent stops acting for the customer. Give each person their own sales agent login, as shared logins make this much more likely. See [Ordering for a customer](https://docs.sparklayer.io/help/sales-ordering/order-for-a-customer.md).
- **B. Add the `b2b` tag to the agent’s account** Sales agents must be B2B customers in your store before they can be given a sales agent role. Add the tag, then make them a sales agent. Where: Customers > select the customer > Tags (Shopify admin).
- **C. Add the `b2b` tag to the customer** Untagged customers never appear in an agent’s search. Add the tag and save. Where: Customers > select the customer > Tags (Shopify admin).
- **D. Limit the agent to their customer groups** On the agent’s page, tick the customer groups they look after. They then only see customers in those groups. Where: Customers > Agents (SparkLayer). See [Restrict which customers an agent sees](https://docs.sparklayer.io/help/sales-reps.md#restrict-which-customers-a-sales-agent-can-see).
- **E. Give the role that permission** Edit the role, tick the permission and save. It applies straight away to every agent with that role. Where: Customers > Roles (SparkLayer). See [Roles and permissions](https://docs.sparklayer.io/help/sales-reps/roles.md).
- **F. Make them a sales agent** Click Add sales agent, choose the person and give them a role. Where: Customers > Agents (SparkLayer). See [Add a sales agent](https://docs.sparklayer.io/help/sales-reps.md).
- **G. Check the customer has synced** If a tagged customer is in the right group but still missing, they may not have synced. Click Show errors on the sync banner. Where: Customers (SparkLayer).
- **H. Check the customers’ sales agent group values** An agent sees any customer that shares one of their group values. Remove values a customer shouldn’t have. Values can only use letters, numbers and dashes, such as `south-east`, and tags don’t count. Where: Customers > select the customer > Metafields (Shopify admin).
- **I. Check the customers’ groups** The agent sees every customer in the groups ticked for them. Untick groups they shouldn’t see, or move those customers to another group. Where: Customers > Agents (SparkLayer).
- **J. Prices can only be lowered** Agents can lower unit prices on an order, not raise them. To charge more, change the customer’s price list.
- **K. Everything checks out** Your setup looks right, so we'll take it from here. Send us your answers with the agent’s and customer’s email addresses.
- **L. Check your plan includes sales agents** Sales agent ordering is on the Starter plan and above, and extra agents are an add-on. If your plan includes them, send us the agent’s email and we’ll take a look. See [Plans and features](https://docs.sparklayer.io/help/plans-and-features.md).
- **M. Sign in with the sales agent’s email** Ask them to sign out and back in using the exact email that has the sales agent role.
- **N. Let the agent see that group** Tick the customer’s group under the customers this agent can see, or move the customer to one of the agent’s groups. Where: Customers > Agents (SparkLayer).

**I can't see sales agent mode**

Sales agent mode (the **My Customers** tab) only shows when the person is signed in on your store with the exact email address that has the sales agent role. Check the **Email** column at **Customers > Agents** in the SparkLayer Dashboard ([open](https://app.sparklayer.io/v2/customers/agents)), or **SparkLayer Wholesale > Sales agents** in the Shopify app.

A typo, or signing in with a different email, doesn't sign them in as the agent. On Shopify, it creates a new retail customer with no `b2b` tag, who sees your store as a retail shopper. Sign out and sign in again with the right email.

The agent's own customer record also needs the `b2b` tag, as any B2B customer does. Use `b2b` plus at most one customer group tag: extra B2B-looking tags can conflict.

**An agent can't see a customer**

Only B2B customers with an email address appear in an agent's search. If a customer is missing, check they're a B2B customer (on Shopify, tagged `b2b`) and have an email address. If they don't have one, give them a placeholder such as `salesagent123@yourstore.com`.

If the agent is limited to some customer groups, the customer must be in one of them. The agent's page shows **Customer groups they can see**. See [Restrict which customers a sales agent can see](#restrict-which-customers-a-sales-agent-can-see).

On an older setup that uses sales agent groups, the customer's `sparklayer.sales_agent_groups` metafield must match the agent's group. Tags don't count. See [Older setups: sales agent groups](#older-setups-sales-agent-groups).

**An agent sees 'You cannot update the cart because it is being processed by a sales agent'**

Another sales agent has the same customer open, so the customer's cart is locked to them. See [Cart locking](https://docs.sparklayer.io/help/sales-ordering/order-for-a-customer.md#cart-locking).

## FAQs

**Can a sales agent order for themselves?**

Yes. Their own prices come from their own customer group. See [Order for yourself](https://docs.sparklayer.io/help/sales-ordering/order-for-a-customer.md#order-for-yourself).

**Why can't I give someone a custom role in Add sales agent?**

**Add sales agent** offers the two built-in roles. Add the person as a **Sales agent**, then open their page and choose the custom role under **Role**.

**I changed a sales agent's metafield in Shopify and nothing happened**

**Shopify only:**

Sales agents' roles and the customer groups they see are managed in SparkLayer, at **Customers > Agents** in the SparkLayer Dashboard ([open](https://app.sparklayer.io/v2/customers/agents)), or **SparkLayer Wholesale > Sales agents** in the Shopify app. Changes to their own metafields in Shopify have no effect.

## Next steps

- [Roles and permissions](https://docs.sparklayer.io/help/sales-reps/roles.md): Choose what each sales agent can do, such as changing prices
- [Sales rep ordering](https://docs.sparklayer.io/help/sales-ordering.md): Show your reps how to take an order for a customer
