> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect a custom storefront

> Connect a storefront you built yourself: choose its market, send its catalogue, customers and orders to the ingest API and serve it prices through the API.

The **Custom storefront** provider connects a storefront that Elastly has no ready-made connector for. Your storefront sends its catalogue, customers and orders to the Elastly ingest API with a connector key, and reads its prices from the price API. Connecting it also creates a storefront channel that price lists can be published to. This page covers creating the connection, sending data and serving prices.

## Who can connect

Creating the connection and managing connector keys needs **Edit** access to **Integrations**.

## Create the connection

**1. Open the integrations list**

Go to **Settings › Integrations** and select **Connect** on **Custom storefront**.

**2. Choose the market**

The **Storefront market** dialog opens. In **Market**, keep **All markets** when the storefront sells to more than one country, or choose the one country it sells to. If the workspace has no currency yet, the dialog also asks for it.

**3. Connect**

Select **Connect**. The connection is created and its page opens. There is no credential to enter.

The connection creates one storefront channel. With a country chosen, the price rules you set for that country apply to the channel's published prices; with **All markets**, no country rule applies. Disconnecting and connecting again keeps that channel and the price lists published to it.

## Send data

Create a connector key on the connection page, the same way as for a [custom ERP](/docs/integrations/custom-erp.md#connector-keys). Your storefront then sends these records to the ingest API:

| Records | Used for |
| - | - |
| Catalogue items, with cost and stock | The items to price, and the cost and stock behind each price |
| Customers | The accounts prices are served to |
| Orders | Sales history, which pricing learns from |

A custom storefront connection accepts orders only. A quote, invoice or credit document is refused with the code `unsupported_kind` and a message such as "This connection does not accept quote documents." The record format is described in [Data ingestion](/docs/developers/data-ingestion.md).

## Serve prices

A storefront gets prices in two ways. Both use an API key created on the **API & webhooks** page; a **Storefront** key is made for this and receives no cost or margin fields.

| Way | When to use it |
| - | - |
| [Price requests](/docs/developers/price-requests.md) | Ask for a customer's price at the moment of the request. Name the customer by the key your storefront sent, with `customerRef` |
| [Channel prices](/docs/developers/channel-prices.md) | Load the prices published to the storefront channel once and follow each later change |

When an order is placed, send the `priceId` of the price it was sold at on each order line. See [Echo the price on an order line](/docs/developers/data-ingestion.md#echo-the-price-on-an-order-line).

> [card] [Data ingestion](/docs/developers/data-ingestion.md)
>
> The record format, sending records and reading results.

> [card] [Authentication](/docs/developers/authentication.md)
>
> Create a Storefront key and limit it to channels.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.