# Order for a customer

URL: https://docs.sparklayer.io/help/sales-ordering/order-for-a-customer

Switch to a B2B customer in your store, build their order at their prices, change unit prices or shipping, then check out or submit a quote on their behalf.

> **Quick summary**
>
> - Sales agents order for a customer from the storefront widget in 3 steps: pick the customer in **My Cart** or **My Customers**, add products, then click **Checkout** (or **Submit Quote**).
> - The **Ordering for** chip at the start of the cart's search row shows who you're ordering for. Click it to switch customer.
> - Sales administrators (or a custom role with the permissions) can also change unit prices, add custom items, set a custom shipping rate, override quantity rules and add new customers.

## How it works

Once you choose a customer, everything you see is theirs: prices, payment methods, credit, addresses and order history. The order is placed against the customer's account, not yours.

How an order for a customer works:

1. **Choose a customer**: From your open orders or a search
2. **Build the order**: Add products at the customer's prices
3. **Adjust**: Change prices, shipping or quantities if your role allows
4. **Check out or quote**: The order or quote is placed for the customer

## Choose a customer

Start every order by choosing who it's for.

1. Sign in to your store with your sales agent account and open **My Cart**.
2. On the **Order builder** screen, pick a customer under **Open orders**, or search for one and click **Start order**.
3. Their cart opens, with their name in the **Ordering for** chip.

**More detail**

You can also pick a customer from the **My Customers** tab: search, then click **Log in**, or click **Login** next to a recently accessed account. This opens the customer's account in **My Account**. 

Both screens are described under [The Order builder and My Customers tab](#the-order-builder-and-my-customers-tab).

## Check who you're ordering for

The **Ordering for** chip shows who you're ordering for. It sits at the start of the search row in **My Cart**, with the customer's initials and name.

1. Hover over or focus the chip to see the customer's full name.
2. Click it to [switch customer](#switch-to-another-customer).

**More detail**

Prices, credit and history follow the chosen account, so check the chip before you add products. It replaces the "You're signed in as" banner and the **Switch Account?** link of earlier versions.

## Switch to another customer

1. Click the **Ordering for** chip.
2. On the **Order builder**, pick another customer, or search for one.

**More detail**

Each customer's cart is kept as you left it, so you can move between several customers' orders and come back to each. You can also act as a different customer on each of your devices.

## Cart locking

A customer's cart can only be changed by one sales agent at a time. When you choose a customer, their cart is locked to you. If another sales agent has the same customer open, they see:

> You cannot update the cart because it is being processed by a sales agent

The cart stays locked to whichever agent has it open. To carry on, the other agent switches to another customer, or you wait until they've finished.

My Cart can also show who last edited the cart, for example **This cart is being edited by a sales agent**, with **Take control** to make your own changes. See [Cart locking in My Cart](https://docs.sparklayer.io/help/storefront/interfaces/my-cart.md#cart-locking). 

Shared logins make this more likely, because two people signed in as the same agent can each open the same customer. Give every person their own sales agent login. See [Add a sales agent](https://docs.sparklayer.io/help/sales-reps.md#make-someone-a-sales-agent).

## Add products

Add products as a customer would, at the customer's prices:

| How | Where |
| --- | --- |
| Search by name, SKU or barcode | The search box in **My Cart**. |
| Load a shopping list | **Actions** in **My Cart**. See [Shopping lists](https://docs.sparklayer.io/help/ordering/shopping-lists.md). |
| Re-order a past order | The customer's order history in **My Account**. See [Reorder](https://docs.sparklayer.io/help/storefront/interfaces/my-account.md#reorder). |
| Scan barcodes, upload a file or forward an email | **Actions** in **My Cart**. See [Intelligent Cart (AI)](https://docs.sparklayer.io/help/ordering/intelligent-cart.md). |

**More detail**

Personal shopping lists are a quick way to start customer orders: save a list in your own account, then choose a customer and load the list to fill their order.

## Check out for the customer

1. In **My Cart**, click **Checkout**.
2. Under **Details**, choose the customer's shipping address and fill in any other fields, such as a purchase order number.
3. Under **Review & Pay**, choose a **Shipping Method** and one of the customer's payment methods.
4. Click **Complete Order**.

**More detail**

The checkout steps are **Cart**, **Details**, **Review & Pay** and **Complete**, as for the customer. The payment methods are the ones the customer's [customer group](https://docs.sparklayer.io/help/customers/customer-groups.md#choose-payment-methods) allows. If the customer pays upfront, they're emailed to pay.

### How the order and payment work

**Shopify:**

When a sales agent places an order, it arrives in Shopify as a **draft order** with the customer's details filled in, whatever the payment method. It stays a draft until payment is made or you act on it.

| Payment method | What happens |
| --- | --- |
| **Pay by Invoice** | A draft order is created for you to process. |
| **Pay on Account** | A draft order is created for you to process. |
| **Pay Online by Card** | A draft order is created and the customer is emailed to pay. |

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 moves to your Shopify orders as paid.

To change the email, go to **Settings > Notifications** ([open in the Shopify admin](https://admin.shopify.com/settings/notifications)) and edit the **Draft order invoice** template.

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.

**Other platforms:**

How orders arrive depends on your platform: see the [developer docs](https://docs.sparklayer.io/developers.md).

## Submit a quote

Instead of placing an order, you can submit the cart as a [quote](https://docs.sparklayer.io/help/ordering/quoting.md) for the customer. This needs the **Create quotes** permission, and quotes turned on at **Settings > Configurations > Quotes and invoices** in the SparkLayer Dashboard ([open](https://app.sparklayer.io/configuration/settings/general)), or **SparkLayer Wholesale > Settings > Configurations > Quotes and invoices** in the Shopify app (Pro and Enterprise, or the Quoting Engine add-on on Starter and Growth).

1. In **My Cart**, click **Submit Quote**, next to **Checkout**.
2. Work through the checkout steps. Each one shows **This order will be submitted as a quote**.
3. Click **Submit Quote**.

**More detail**

The quote then follows your Quoting Engine process: see [Work on a quote](https://docs.sparklayer.io/help/ordering/work-on-a-quote.md).

## Change a unit price

Sales administrators can change a product's unit price on a cart line. This gives a one-off price without changing your price lists. It needs the **Change quoted prices** permission.

1. Click the unit price on the cart line (it's underlined with dots).
2. In **Edit unit price**, choose **Fixed price** or **Percentage off**, and enter the price or percentage.
3. Click **Save price**.

**More detail**

- The line under the field shows what you're setting: the percentage off the original price, or the new unit price.
- A percentage is always taken from the original price, so 10% off twice is still 10% off.
- The option you used last stays chosen for the next line.
- **Reset** puts the original price back in the field.
- If the line has quantity rules, its label changes from **Qty rules apply** to **Qty rules overridden**. 
- You can set a price above the original as well as below it.

## Add a custom item

Sales administrators can add items that aren't in your catalogue, such as special instructions, products without a SKU or another charge. It needs the **Add custom items** permission.

1. In **My Cart**, click **Actions**, then **Add custom item**. 
2. Enter the item's **Name**, its **Cost** per unit and the **Quantity**.
3. Click **Add**.

**More detail**

A custom item can have a price or be free. You can then change its unit cost and quantity, or remove it.

## Set a custom shipping rate

Sales administrators can set their own shipping cost for an order, without changing your [shipping rules](https://docs.sparklayer.io/help/ordering/shipping-rules.md). It needs the **Change shipping** permission.

1. At checkout, under **Review & Pay**, click **Add custom rate** next to **Shipping Method**.
2. Enter a description, such as "Pallet delivery", and the amount. Enter 0 for free shipping.
3. Click **Add**.

**More detail**

- The rate is added to the shipping methods with a **Custom** label, and chosen for the order. Without a description, it's called "Custom rate".
- Your platform's admin shows the shipping as custom shipping. If other systems read your orders, such as an ERP, test how they handle it before you rely on it.

## Override quantity rules

Sales administrators can ignore a product's [pack size and minimum or maximum quantity rules](https://docs.sparklayer.io/help/storefront/quantity-rules.md) and enter any quantity. It needs the **Ignore product rules** permission.

1. Enter the quantity you need on the cart line.
2. Tick **I acknowledge that I've made changes to requirements in this order**.
3. Click **Checkout**.

## Add a new customer

Sales administrators can create a customer from your store, then order for them straight away. It needs the **Create customers** permission.

1. Open the **My Customers** tab and click **Actions**, then **Add a new customer**.
2. Enter the customer's **First name**, **Last name**, **Email** and **Company**.
3. Click **Add new customer**.

**More detail**

The new customer gets the same settings as the sales agent who created them: price lists, discount percentage, customer group, sales agent groups and default addresses. To change them, edit the customer afterwards, for example by giving them a different customer group tag.

| Account status | What happens |
| --- | --- |
| No account on your store | They're emailed an invitation to set up their account. |
| Already has an account | They sign in with their existing details. |

**Shopify only:**

On Shopify, the invitation is Shopify's account activation email, which you can edit at **Settings > Notifications** ([open in the Shopify admin](https://admin.shopify.com/settings/notifications)). To stop invitations being sent, turn on **Don't send Shopify's customer invite** at **Integrations > Platform > Shopify order actions** in the SparkLayer Dashboard ([open](https://app.sparklayer.io/configuration/integrations/platform)), or **SparkLayer Wholesale > Integrations > Platform > Shopify order actions** in the Shopify app.

## Order for yourself

Sales agents can also order for their own account, for example to buy a sample for a customer demonstration. Their prices come from the price list of their own [customer group](https://docs.sparklayer.io/help/customers/customer-groups.md).

1. In **My Cart**, switch to your own account. 
2. Add products and check out like any customer.

**More detail**

This needs version `1.4.0` or later of the [SparkLayer Core Script](https://docs.sparklayer.io/developers/frontend.md).

## Track sales agent orders

Orders placed by sales agents carry extra data, so you can filter and report on them, or pass the data to your other systems.

**Shopify only:**

On Shopify, it's on the draft order, and on the completed order once payment is taken:

| Data | Details |
| --- | --- |
| **Tags** | `agent` (an agent order), `agent-` plus the start of the agent's email (for example `agent-contact`), `agent-` plus the agent's email domain (for example `agent-sparklayer.io`), and `b2b` (a B2B order). |
| **B2B Sales Agent Account ID** | The agent's accounting ID, if they have one. |
| **B2B Sales Agent Email** | The sales agent's email address. |
| `sparkPaymentType` | Added to all B2B orders, showing the payment type the agent chose. |

The fields appear under **Additional details** on the order.

Sales agents can also export order activity to a CSV file from the activity list in [My Account](https://docs.sparklayer.io/help/storefront/interfaces/my-account.md#export-orders), with the **Download** menu: choose **Activity** or **Activity with line items**.

## The Order builder and My Customers tab

Sales agents use these 2 screens to find and switch customers.

### The Order builder

The **Order builder** is what you see when you open **My Cart** without an order on screen, and when you click the **Ordering for** chip. 

| Part | What it shows / does |
| --- | --- |
| Search | **Search buyers by name, email or account number**. Click **Start order** next to a result. |
| **Recently accessed accounts** | The last five customers you opened, with their email and **Last order** date. Click **Open** to carry on an open order, or **Order** to start one. |
| **View all customers** | Opens your full customer list. |
| **Open orders** | Customers with an order in progress, with its **Lines**, **Units** and **Amount**. The customer you're ordering for is marked **Current**. Click a row to carry on. |
| **Recent activity** | The latest orders across your customers, with **Reference**, **Submitted on**, **Status** and **Amount**. Filter by **Status**: **All**, **Shipped** or **Processing**. |
| **Back to order** | Returns to the cart of the customer you're ordering for. |

### The My Customers tab

Sales agents see a **My Customers** tab in the widget, headed **Sales Agent Ordering**.

| Part | What it shows / does |
| --- | --- |
| Search | **Search customers by name, email or account number**. Click **Log in** next to a result. |
| **Actions** | **Add a new customer** (see [Add a new customer](#add-a-new-customer)). |
| **Recently accessed accounts** | Customers you've opened, with **Last Login** and a **Login** button. |
| **Recent Activity** | Recent orders across your customers, filtered by **Status**. Click a reference to see the order's lines. |

## FAQs

**Another person is editing the same cart**

[Cart locking](#cart-locking) stops two people changing a cart at once. My Cart shows who last edited it, for example **This cart is being edited by a sales agent**, or the warning "You cannot update the cart because it is being processed by a sales agent". Wait, or click **Take control** to make your own changes. If you share a login with another agent, ask for your own.

**Can I work on several devices?**

Yes. You can use the same login on more than one device, pick up an order where you left off, or act as a different customer on each device.

**Why can't I change a price or add a custom item?**

Your role doesn't include that permission. Ask an admin to check your role at [Roles and permissions](https://docs.sparklayer.io/help/sales-reps/roles.md).

**Why can't I choose Pay Online by Card?**

You only see the payment methods the customer's group allows. To offer card payment, turn it on for their group: see [Payment methods](https://docs.sparklayer.io/help/ordering/payment-methods.md).
