Sales Agent Ordering
Please note: Sales Agent Ordering is only available on the SparkLayer Growth, Pro, and Enterprise plan.
Sales Agent Ordering is a powerful feature of SparkLayer that lets certain users (Sales Agents) place orders and manage accounts on behalf of your B2B customers. Sometimes referred to as Order Masquerading, it's a great way to integrate your sales team and centralise all your B2B orders within Shopify.
Once enabled, Sales Agents are able to perform any of the following actions against a B2B customer account:
- View products on the website at the B2B prices assigned to the selected customer
- Add products to an order
- Place an order using their available payment methods and request payment from the customer
- Save and edit Shopping Lists
- Add/edit addresses (if enabled for the customer)
Want to test out Sales Agents? Head over to our B2B Demo store and use the following login details. Email: [email protected] Password: testtest
The process of enabling Sales Agents works as follows:
- 1.First, you need to activate specific accounts with the special Sales Agent privileges
- 2.Once activated, the chosen account can then log into your website
- 3.Once logged in, they'll be presented with the Sales Agent interface where they can then search and then select a customer, and place orders or manage the account on their behalf.
To activate an account as a Sales Agent, you'll need to make sure the account is already set up within Shopify with an active account (see our guide here).
Using their unique customer ID, you can then assign this in SparkLayer to be a Sales Agent. You can find the unique customer ID in the URL when navigating a customer within the Shopify admin.

For example, the URL in your browser may look something like this:
https://your-shopify-store-url.com/admin/customers/5917633347819
In this example, the external customer ID would be
5917633347819
Within the SparkLayer Dashboard, go to the Customer Sync section of the Data Sync area and paste this customer ID into the Customer Data Lookup box.

At the bottom of the search results, you'll then see the ability to activate the Sales Agent. Once you turn this on, the customer will then be converted into a Sales Agent.

If you're looking to edit which of your customer accounts has Sales Agent access, you can manage this directly in SparkLayer by following the below steps:
- 1.First, find the Sales Agent customer record in your Shopify Customers admin
- 2.Within the URL, make a note of the ID at the end, e.g. if the URL is
https://your-shopify-store-url.com/admin/customers/5917633347819
the ID would be5917633347819
- 3.Go to the Customer Data Lookup tool in SparkLayer and paste in the ID. At the bottom, click 'Turn off sales agent'
- 4.To re-assign Sales Agent access, simply follow the steps above.
The key difference in the ordering experience for a Sales Agent versus a standard B2B customer is simply this: the Sales Agent isn't placing an order against their own personal account but instead against their selected B2B customer.
Once they login, they'll be prompted by a special Sales Agent Ordering search box within SparkLayer My Account widget that lets them easily search and select a customer. At this point, the Sales Agent will be able to search for any customer within your store and place orders on their behalf.

Please note: only customers that have been tagged as B2B customers will show within the search results. Within Shopify, simply add a tag of
b2b
against any customer record.
Customers must also always have an email assigned to their account in Shopify. If you don't have an email address, you could always use a test email such as [email protected]
The Sales Agent can search customers by:
- Company Name
- First and Last Name of the customer
- Postcode of their default address
- Accounting ID (if available)
Once they've selected a customer, the Sales Agent is then in 'Sales Agent Mode' with a notification that will follow them around the ordering experience, notifying who they are logged in as.

Once logged in as a customer, the Sales Agent can then browse the website and begin adding items to an order. All prices shown will be the prices you've set up for the specific customer using the Price List functionality of SparkLayer.
Once they've added products to an order, they can access the SparkLayer Quick Order at any point and begin the checkout process. Just as with the standard customer experience, they can select an address, shipping method, and see all available payment methods.

To understand the payment flow, the payment methods work as follows:
Payment Method | Flow | Status |
---|---|---|
Pay by Invoice | The order is submitted as a Draft order within Shopify and then has to be manually acted upon | Order is left in Draft status until the payment is successfully made |
Pay on Account | The order is submitted as a Draft order within Shopify and then has to be manually acted upon | Order is left in Draft status until the payment is successfully made |
Pay Online by Card | The order is submitted as a Draft order within Shopify and the customer will receive a notification to make payment (see below) | Order is left in Draft status until the payment is successfully made |
Request for Quote | The order is submitted as a Draft order within Shopify and then has to be manually acted upon | Order is left in Draft status until the payment is successfully made |
As noted above, the payment flow works slightly differently to the standard customer experience when placing an order. When a Sales Agent is logged in and places an order, the orders will by default enter Shopify in the Draft order status with the customer's details pre-selected. Just as with any order in Shopify, you'll see the customer's details on the top right.

Depending on the payment method used by the Sales Agent, if the customer is required to make payment, they'll receive an automatic email notification detailing their order and a button to checkout. This uses the 'Send invoice' feature of Shopify Draft orders and you can learn more about how this works here.
Once the customer completes their purchase by making payment, the order is then marked as paid and will then display within your Shopify Orders area.

You can edit this email template by going to Settings > Notifications within Shopify and search for the Draft order invoice template
If the customer hasn't made payment for any reason or you are processing it manually, within Shopify you can open the order and easily resend or manually mark as paid. Please note, the order will stay as a Draft order until action has been taken.

As well as placing orders on behalf of customers, Sales Agents can also perform other actions against the customer's account. These include:
Area | Actions |
---|---|
Shopping Lists | Create new shopping lists and delete existing ones |
Address book | Add new addresses, edit existing address, or delete addresses |
Re-order | Re-order from an existing order by viewing the order details within the account |
Persistent shopping cart | Products that are added to an order will remain in the customers My Order until they checkout or make edits. The order will also be saved for the Sales Agent if they come back later. |
An additional feature of Sales Agents is the ability to access customer accounts across multiple devices using the same Sales Agent login. This means that you can:
- Pick up orders from where you left off
- Manage the same order in parallel across different devices
- Log in as a different customer on a different device whilst using your sales agent account
Our video below illustrates how this works.
If you're wanting to restrict which customers (or groups of customers) a Sales Agent can see, it's possible to configure this within Shopify and SparkLayer. Named Sales Agent Groups, this powerful feature gives you full control over how you manage your Sales Agent access.
To enable this feature, it following three steps:
- 1.First, configuring special metafields within Shopify
- 2.Next, assigning these to specific B2B customers.
- 3.Finally, assigning rules to a specific Sales Agent within the SparkLayer Dashboard
Our explainer video below runs through the process and we've also included instructions below.
Within Shopify, navigate to your Settings area, click Metafields, choose Customers, and click Add definition at the top. The metafield definition needs to be completed exactly as detailed below
Item | Details |
---|---|
Name | Sales Agent Groups |
Namespace and key | sparklayer.sales_agent_groups |
Content type | Text and Accept list of values must be ticked |
Validation | Tick Limit to preset choices and then enter your values |

The values you enter represent how you want to categorise your Sales Agents. Common use-cases may include:
Example use-case | Example Values |
---|---|
Limiting by a territory (e.g. Germany, France, UK). | germany, france, uk |
Limiting by a geographical region | north-east, south-west |
Limiting by a customer type | vip, new-customer |
Important: when entering values, make sure to not include spaces. Instead, you can separate using dashes (e.g.
south-east
)Once you've created your Sales Agent Groups, you can then easily assign these to a customer. Within Shopify, search for a customer and then scroll down to the Metafields section. From the Sales Agent Groups option, select the appropriate values and then click Save. Note, it's possible to assign more than one value to a customer.

The final step is to then assign the Sales Agent Group rules to a specific sales agent. Using the steps detailed above, at the bottom within the Restrict sales agent access box, simply choose which groups the Sales Agent can access. As with customers in Shopify, a Sales Agent can have access to multiple groups
Note: if you leave the field as blank, the Sales Agent will have access to all customers.

When the Sales Agent next signs into your Shopify store, they'll then be able to search for customers that match the Sales Agent Group rules you've set up.
When Sales Agents place orders through your store, a range of additional data is tracked against the order, from specific tags through to additional notes. This is useful if you want to be able to filter or analyse Sales Agent activity or integrate this into your backend systems.
To view the available data, you can click into an open Draft order and you'll see the following information. This information will also display on any completed orders once payment has been taken.

Data field | Details |
---|---|
Shopify tags | The following tags will be added against the order:
- agent (denoting an agent order)
- agent-[start of email] (denoting the agent's emai)
- agent-[email domain] (denoting the agent's email)
- b2b (denoting a B2B order) |
B2B Sales Agent Account ID | If the sales agent has an accounting ID assigned, this will display within the order |
B2B Sales Agent email | The email address of the Sales Agent |
sparkPaymentType | This is captured against all B2B orders, and will also include the payment type the Sales Agent has selected |