Use outlets on your website
On this page
An outlet is a physical location, and it has always shaped what happens at the register. A web visitor can now have one too. Once the storefront knows which outlet a visitor is shopping, it can show that location’s prices, its stock levels, promotions written for it, and its collection points.
Use this when your outlets differ from one another in a way the customer should see, such as regional pricing, stock that varies by branch, or a “shopping at” selector that sets the collection point for click-and-collect.
Setting the outlet is a theme change. There is no built-in store selector, so someone has to add the control that calls the action, usually a picker in the header or on a store locator page.
What the outlet changes
| Area | What the outlet does |
|---|---|
| Pricing | The outlet’s Price Book is used, unless a more specific one applies |
| Stock display | The storefront can show how much is physically held at that outlet |
| Promotions | A promotion with Channel Scope Outlet set applies only when that outlet is the current one |
| Click-and-collect | Collection points are narrowed to those assigned to the outlet, plus any with no outlet |
| Custom shipping providers | The outlet’s ID is included in the rate request sent to your endpoint |
| Orders | The order records which outlet the customer was shopping |
Promotions with no channel scope keep applying whatever the outlet is.
What the outlet does not change
Two limits matter more than anything else on this page, because assuming otherwise leads to overselling or to a support ticket.
:::warning Setting an outlet does not reserve, restrict, or route stock. Order fulfillment still draws on every stock location in the store, so an order can be fulfilled from anywhere even when the chosen outlet has none of the item. :::
The outlet’s stock figures are also narrower than the store-wide ones. They count only the physical stock at the outlet’s stock locations, and they ignore backorders, maximum quantity limits, and asset-backed vouchers. A backorderable product with nothing physically at the outlet reads as out of stock there while remaining sellable across the store.
Store-wide stock is untouched. The existing store-wide figures keep reporting the whole store, so a theme can show both at once, such as “Out of stock at this store, available at 2 others”.
Before you start
- Create the outlets you want customers to choose between. See create a store outlet.
- If the outlet should change prices, assign a Price Book to the outlet record. See about price books.
- If the outlet should change click-and-collect, assign your collection points to it. A collection point with no outlet stays available everywhere. See click-and-collect configuration.
Set the outlet from your theme
The outlet.set action runs inside a Liquid controller, so the control is a link or form that sends the outlet ID with the request, and the page’s controller passes it to the action. For example, a link to ?outlet_id=a1B5g000002XyZqEAK on the store locator page, with this in that page’s controller template:
```liquid
{% before %} {% assign chosen_outlet_id = current_request.params.outlet_id %} {% if chosen_outlet_id != blank %} {% action “outlet.set”, outlet_id: chosen_outlet_id %} {% endif %} {% endbefore %} ```
The outlet ID is the Salesforce ID of the Outlet record, which is also the id of an Outlet drop. See controller actions for where controller templates live and how they read request parameters.
The outlet is then held on the visitor’s session and the cart is repriced straight away. Any template can read it:
```liquid
Shopping at {{ current_outlet.name }} ```
To let the visitor go back to shopping the store as a whole, call outlet.clear:
```liquid
{% action “outlet.clear” %} ```
This also reprices the cart.
If the action is called with no outlet ID, or with an ID that does not belong to this store, nothing changes and a warning is written to StoreConnect’s web console (for example, shop.example.com/console), not to the browser’s console. The warning appears only if the web console is already open in another tab or window when the action runs. An outlet from another store is rejected, so the parameter cannot be used to read another store’s pricing.
How the price book is chosen
The outlet’s price book is one of four, and it is not the strongest. From highest priority to lowest:
- A price book set on the session.
- The price book on the customer’s account or membership.
- The outlet’s price book.
- The store’s default price book.
So a customer with account pricing keeps their own prices at every outlet, and the outlet price book applies to everyone else.
What is recorded on the order
When a customer checks out with an outlet set, the outlet is written to the order (the Outlet lookup on the Order). Use it to report on which location a web order was attributed to, or to route follow-up to the right branch.
Check it worked
Set an outlet from your storefront, then open a product page. {{ current_outlet.name }} renders that outlet’s name, and a product priced differently in the outlet’s price book shows the outlet price. Complete an order and confirm the Order record has the outlet set.
Was this article helpful?
Thanks for your feedback! It helps us improve our docs.