# How SparkLayer works

URL: https://docs.sparklayer.io/help/get-started/how-sparklayer-works

How SparkLayer adds B2B ordering to your store, from data sync to orders, and the key ideas it's built on: price lists, customer groups, widgets and more.

> **Quick summary**
>
> - SparkLayer adds B2B ordering to the store you already have. Products, customers and orders stay in your eCommerce platform, and SparkLayer syncs the data it needs.
> - You set the B2B rules in SparkLayer: **price lists** hold prices, and **customer groups** decide which prices, payment methods and ordering rules each customer gets. You can also send them from another system.
> - When a B2B customer signs in, SparkLayer's **frontend interfaces** (widgets) show them their prices, cart and account on your store. Their orders arrive in your store's admin like any other order.
> - New to B2B? [Key concepts](#key-concepts) explains each idea in plain English. Then build [your setup guide](https://docs.sparklayer.io/help/get-started/setup-guide.md): the steps for your store, in order.

## How it works in 5 steps

SparkLayer sits alongside your store. Here's what happens, from connecting your store to fulfilling an order:

1. **SparkLayer connects to your store.** It links to your eCommerce platform, such as [Shopify](https://docs.sparklayer.io/help/platforms/shopify.md), and syncs product and customer information.
2. **You set your B2B rules.** Create [price lists](#price-lists) and set rules for each [customer group](#customer-groups), such as which payment methods they can use. Manage them in [the app](#the-sparklayer-app). You can also automate them from an ERP or CRM with the [SparkLayer API](https://docs.sparklayer.io/developers/api.md).
3. **Customers order on your website.** SparkLayer's [frontend interfaces](#frontend-interfaces) give signed-in B2B customers self-service ordering: their prices, quick ordering, re-ordering and an account area. Retail customers see your store as normal.
4. **Your sales team can help.** With [sales agent ordering](https://docs.sparklayer.io/help/sales-ordering.md), your team manages B2B accounts and orders for customers. The [Quoting Engine](https://docs.sparklayer.io/help/ordering/quoting.md) covers the full quote-to-order process.
5. **Orders arrive in your admin.** B2B orders are created in your platform's admin. You review, edit and fulfil them with the processes you already use. SparkLayer's [Orders](https://docs.sparklayer.io/help/dashboard/orders.md) page shows your B2B sales over time.

## When a B2B customer signs in

SparkLayer matches them to a customer group by their tags, and applies that group's rules to everything they see and order.

What happens when a B2B customer signs in:

1. **B2B customer**: Signs in to your store
2. **Customer group**: Matched by their tags
3. **Rules**: Price lists, payment methods, order limits
4. **Storefront**: Their prices, cart and checkout
5. **Order**: Created in your platform

## Key concepts

The ideas SparkLayer is built on, grouped by area. Jump to one, or read on: each takes a minute.

- **[Your store](#your-store-and-sparklayer)**: Where SparkLayer runs and how you manage it. [Your platform](#your-ecommerce-platform), [SKUs](#products-and-skus), [Data sync](#data-sync), [The app](#the-sparklayer-app).
- **[Pricing](#pricing)**: The B2B prices each customer sees. [Price lists](#price-lists), [Quantity pricing](#quantity-pricing-and-discounts).
- **[Customers](#customers)**: Who your B2B buyers are and their rules. [B2B customers](#b2b-customers), [Customer groups](#customer-groups), [Company users](#companies-and-company-users), [Sales agents](#sales-agents).
- **[The storefront](#the-storefront)**: What buyers see and use on your website. [Widgets](#frontend-interfaces), [Checkout and payment](#checkout-and-payment).
- **[Going live](#going-live)**: Testing safely, and what your plan includes. [Testing](#testing), [Plans](#plans).

## Your store and SparkLayer

### Your eCommerce platform

SparkLayer runs on top of your store on [Shopify, BigCommerce, Wix, WooCommerce or Magento](https://docs.sparklayer.io/help/platforms.md). You keep managing products, stock, customers and fulfilment there. SparkLayer adds the B2B layer: trade pricing, B2B ordering rules and self-service ordering.

### Products and SKUs

SparkLayer matches B2B prices to your products by SKU (stock keeping unit). That's the product code you set on each product and variant in your platform. Every product you want B2B customers to buy needs a SKU, and each SKU must be unique. See [Check your products have unique SKUs](https://docs.sparklayer.io/help/get-started/launching.md#check-your-products-have-unique-skus).

### Data sync

SparkLayer keeps a copy of the product and customer data it needs. It updates the copy automatically when you change something in your platform. If a product doesn't look right in SparkLayer, look it up at **Integrations > Product sync** in the SparkLayer Dashboard ([open](https://app.sparklayer.io/integrations/products-sync)), or **SparkLayer Wholesale > Integrations > Product sync** in the Shopify app. Customers that didn't sync show in a banner at **Customers** in the SparkLayer Dashboard ([open](https://app.sparklayer.io/customers/list)), or **SparkLayer Wholesale > Customers** in the Shopify app. See [Monitoring data sync](https://docs.sparklayer.io/help/integrations/data-sync.md).

### The SparkLayer app

You set up and manage everything in the SparkLayer app: price lists, customer groups, orders and settings. It comes in 2 versions with the same screens.

| Version | Where | How it's laid out |
| --- | --- | --- |
| **SparkLayer Dashboard** | [app.sparklayer.io](https://app.sparklayer.io/), on any platform | A sidebar with grouped pages, such as **Pricing > Price lists**. |
| **Shopify app** | **SparkLayer Wholesale**, under **Sales channels** in your Shopify admin | One menu item per area, with that area's pages as tabs. |

The Help Center shows the path for the version you use. See [Find your way around SparkLayer](https://docs.sparklayer.io/help/dashboard.md).

## Pricing

### Price lists

A [price list](https://docs.sparklayer.io/help/pricing.md) is a set of B2B prices for your products, keyed by SKU. A price list can be:

| Type | How prices are set |
| --- | --- |
| **Automatic** | Calculated from another price source, such as your store's retail prices, with a percentage change (for example, 40% off). |
| **Manual** | Uploaded as exact prices by CSV, or edited in the [Price editor](https://docs.sparklayer.io/help/pricing/price-editor.md). |
| **Integration** | Sent from another system, such as an ERP, through the [SparkLayer API](https://docs.sparklayer.io/developers/api.md). |

You can combine them, for example an automatic price list with exact prices uploaded for a few products. Prices are shown excluding tax, and tax is added at checkout.

### Quantity pricing and discounts

On top of price lists, you can set [quantity breaks and pack sizes](https://docs.sparklayer.io/help/pricing/quantity-pricing.md) and [discounts](https://docs.sparklayer.io/help/pricing/discounts.md) for B2B customers.

## Customers

### B2B customers

A B2B customer (a buyer) is a customer account in your platform that SparkLayer recognises as trade. Retail customers who aren't tagged keep shopping as normal.

- **Shopify:** a customer tagged `b2b`.
- **Wix:** a contact with the `b2b` label.
- **Other platforms:** see [Assign customers to a customer group](https://docs.sparklayer.io/help/customers/add-customers-to-a-group.md#assign-customers-to-a-customer-group).

### Customer groups

A [customer group](https://docs.sparklayer.io/help/customers/customer-groups.md) is a set of ordering rules shared by a group of B2B customers:

- Which price lists they see
- Which payment methods they can use, such as card upfront or payment on account
- Order limits, such as a minimum order value
- Other rules, such as shipping and checkout options

Every account starts with a **Base customer group**. B2B customers are in it unless you put them in another group. To move a customer to another group, give them a second tag that matches it, such as `b2b-vip`. Customer groups are under **Customers** in the app.

### Company users

A B2B customer can invite colleagues to share their account as [company users](https://docs.sparklayer.io/help/customers/company-users.md). The whole team then sees the same orders, addresses and shopping lists. The main user can approve orders placed by limited users.

### Sales agents

[Sales agents](https://docs.sparklayer.io/help/sales-ordering.md) (sales reps) are members of your team who sign in to your store and order on behalf of the customers they look after. Each agent's role controls what they can do.

## The storefront

### Frontend interfaces

The [frontend interfaces](https://docs.sparklayer.io/help/storefront/interfaces.md) (or widgets) are the parts of SparkLayer your customers use:

- B2B product pricing
- A quick-order product matrix
- The My Cart checkout
- The My Account area, for reordering, invoices and addresses

They sit inside your existing theme and only appear for signed-in B2B customers. To choose how they look, see [Customising the design](https://docs.sparklayer.io/help/storefront/customising-design.md).

### Checkout and payment

B2B customers check out in the My Cart interface. Depending on their [payment methods](https://docs.sparklayer.io/help/ordering/payment-methods.md), they either:

- Pay upfront by card in your platform's checkout
- Place the order on account, by invoice or as a quote request

Either way, the order arrives in your platform's admin.

## Going live

### Testing

To see SparkLayer as a buyer before your customers do, use [Try it out](https://docs.sparklayer.io/help/get-started/launching.md#place-a-test-order). It signs you in to your own store as a test B2B customer, and the test order doesn't count towards your plan.

To try changes on a second, test store, use [Test mode](https://docs.sparklayer.io/help/dashboard/test-mode.md).

### Plans

What you can use depends on your plan, and a few features also depend on your platform. Every paid plan has a 14-day free trial. See [Plans and features](https://docs.sparklayer.io/help/plans-and-features.md), [Your plan and usage](https://docs.sparklayer.io/help/dashboard/plan-and-features.md) and [Compare platforms](https://docs.sparklayer.io/help/platforms/compare.md).

## Under the hood

For the more technical: how SparkLayer's 3 parts connect your store, your website and any back-office systems, such as an ERP. You don't need this to get started.

How SparkLayer connects:

- **Backend:** B2B-specific data (price lists, product pack sizes, customer rules) comes from an ERP / CRM, a manual upload or an automatic sync, and is sent to the **SparkLayer Backend**, which stores it.
- **eCommerce platform** (e.g. Shopify): its core functions (order, catalogue and customer management, analytics, marketing and promotions, CMS) sync both ways with the **SparkLayer Connector**.
- **Website storefront:** core templates (homepage, collections, products, static pages, blog) work as normal. The **SparkLayer Frontend** overlays B2B widgets: product pricing, buy button, quick order form, checkout and ordering, and the My Account area.

## See it in action

Try SparkLayer for yourself as a B2B buyer on [our demo stores, or your own store](https://docs.sparklayer.io/help/get-started/demo.md).

SparkLayer works with Shopify, BigCommerce, Wix, WooCommerce and Magento. See [Platforms](https://docs.sparklayer.io/help/platforms.md) for what's supported on each, and [Architecture](https://docs.sparklayer.io/developers/architecture.md) for the technical detail.

## Next steps

You're ready to set up SparkLayer. The first step is installing it on your platform.

Not sure where to start? Answer 4 quick questions and get [your own setup guide](https://docs.sparklayer.io/help/get-started/setup-guide.md): the guides that apply to your store, in the order you need them.

- [Get started](https://docs.sparklayer.io/help/get-started.md): Set up SparkLayer with the 5 Setup steps
- [Find your platform](https://docs.sparklayer.io/help/platforms.md): Install guides for Shopify, BigCommerce, Wix, WooCommerce and Magento
- [Glossary](https://docs.sparklayer.io/help/glossary.md): Every SparkLayer term, defined
- [Contact support](https://docs.sparklayer.io/help/support.md): Book an onboarding call or ask our team
