---
title: Single-source multi-market for SAP Commerce Cloud
slug: q6sl0161
canonical_url: https://docs.coveo.com/en/q6sl0161/
collection: coveo-for-commerce
source_format: adoc
---
# Single-source multi-market for SAP Commerce Cloud

This article explains how to configure the [Coveo SAP Commerce extensions](https://docs.coveo.com/en/ladf2011.md) in _single-source multi-market_ mode, which powers multiple markets (languages, currencies, or countries) from a single [Catalog source](https://docs.coveo.com/en/l5if0244.md).
It's the SAP Commerce Cloud connector's implementation of the broader [multi-market sources](https://docs.coveo.com/en/q3ua0275/) capability, available in the `v3` and `v4` branches only.

The SAP Commerce connector setup is the same for both ingestion modes, apart from a few single-source/multi-market differences.
Follow [Push data to Coveo (SAP Commerce Cloud 2011 or later)](https://docs.coveo.com/en/ladf2011.md) for the complete connector setup, and apply the following single-source/multi-market differences described in this article:

* Set the `coveo.multimarket.singlesource` property to `true` (see [Enable single-source multi-market mode](#enable-single-source-multi-market-mode)).

* Push product data to a single [Catalog source](https://docs.coveo.com/en/l5if0244.md) instead of one source per market, and leave the `language`, `currency`, and `country` qualifiers unset on that source (see [Configure the product source](#configure-the-product-source)).

* Configure the item-title value provider and the `ec_name` dictionary field (see [Configure the item title](#configure-the-item-title)).

All other connector configuration (installation, credentials, search provider, index configuration, cron jobs, field mappings, and the remaining value providers) is identical to the standard setup.

For the [Coveo organization](https://docs.coveo.com/en/185.md) side of the setup (dictionary fields, catalog view definitions, catalog filters, and search tokens), see [Multi-market sources](https://docs.coveo.com/en/q3ua0275/).

> **Important**
>
> Single-source multi-market relies on the [multi-market sources](https://docs.coveo.com/en/q3ua0275/) feature, which is in early access.
> Contact your Coveo representative to have it enabled for your [Coveo organization](https://docs.coveo.com/en/185.md).
## About the multi-market modes

The connector has two mutually exclusive modes of operation.
You select the mode with a single global property that applies to every [index](https://docs.coveo.com/en/204.md) configured in your SAP Commerce instance.
You can't run one index in one mode and another index in the other mode within the same instance.

Mode 1: Multi-source/multi-market:: Market-specific values are pushed to separate [Catalog sources](https://docs.coveo.com/en/l5if0244.md), one per market.
For example, for a [storefront](https://docs.coveo.com/en/p33g0410.md) with two markets, the connector pushes each product to two sources, with market A values going to source A and market B values going to source B.
This mode is also used for single-market setups.

Mode 2: Single-source/multi-market:: A single [Catalog source](https://docs.coveo.com/en/l5if0244.md) holds market-specific values (such as name, description, and price) as [dictionary fields](https://docs.coveo.com/en/2036.md).
The connector pushes one product item, with localized values stored as key-value pairs, to one source.

## Choose a mode

Use the following guidance to decide which mode fits a given implementation:

* **Single market, with no plans to add markets**: Use mode 1.
Mode 2 adds configuration overhead even for a single market (for example, catalog view definitions and search tokens), so there's no benefit to it when a client serves one market and doesn't expect to expand.

* **Single market, but likely to add markets later**: Consider starting with mode 2.

* **Multiple markets**: Use mode 2 to power all markets from a single source, or mode 1 to use a separate source per market.

> **Note**
>
> This guidance should be applied at the discretion of the team handling the implementation.
> Contact your Coveo representative if you're unsure which mode suits your deployment.
## Prerequisites

* You've installed and configured the [Coveo SAP Commerce extensions](https://docs.coveo.com/en/ladf2011.md) from the `v3` or `v4` branch.

* The [multi-market sources](https://docs.coveo.com/en/q3ua0275/) feature is enabled for your [Coveo organization](https://docs.coveo.com/en/185.md).

* You've reviewed the [Coveo organization](https://docs.coveo.com/en/185.md)-side configuration, including [dictionary fields](https://docs.coveo.com/en/q3ua0275#step-2-configure-dictionary-fields), [catalog view definitions](https://docs.coveo.com/en/q3ua0275#step-5-configure-catalog-view-definitions), and [search tokens](https://docs.coveo.com/en/q3ua0275#step-10-configure-the-search-token).

## Enable single-source multi-market mode

The connector mode is controlled by the `coveo.multimarket.singlesource` property in the [`searchprovidercoveosearchservices/project.properties` file](https://github.com/coveo/coveo-sap-commerce-connector/blob/v4/coveo/searchprovidercoveosearchservices/project.properties):

* `false` (default): the connector uses mode 1 (multi-source/multi-market).

* `true`: the connector uses mode 2 (single-source/multi-market).

Set this property in your project's [local.properties](https://help.sap.com/docs/SAP_COMMERCE_CLOUD_PUBLIC_CLOUD/d97b2ab46fde43a78640036ebf68e106/30a97a12eca14afbaaac88b592f5e25c.html) file to override the default value configured in the connector extension:

```properties
coveo.multimarket.singlesource=true
```

> **Important**
>
> This property is read once to instantiate a Java class when the SAP Commerce instance starts.
> Changing the value on a running instance through the HAC (Hybris Administration Console) doesn't change the connector's behavior at runtime.
> To switch modes, update the property value and restart your SAP Commerce instance.
## Configure the product source

In the standard setup, each `CoveoSource` specifies the `language`, `currency`, and `country` it applies to:

```
INSERT_UPDATE CoveoSource; id[unique = true]; name[unique = true]; language(isocode); currency(isocode); country(isocode); objectType(code); consumedDestination(id)
; electronics-zh-USD-US-source; Electronics Chinese Dollar USA Source; zh; USD; US; PRODUCTANDVARIANT; electronics-zh-USD-US-dest
```

Because single-source/multi-market pushes all market-specific values to one source, these qualifiers aren't needed.
Leave the `language`, `currency`, and `country` columns empty:

```
INSERT_UPDATE CoveoSource; id[unique = true]; name[unique = true]; language(isocode); currency(isocode); country(isocode); objectType(code); consumedDestination(id)
; electronics-zh-USD-US-source; Electronics Chinese Dollar USA Source; ; ; ; PRODUCTANDVARIANT; electronics-zh-USD-US-dest
```

For a complete mode 2 configuration, see the [`electronics-multimarket-singlesource-configuration-example.impex` example file](https://github.com/coveo/coveo-sap-commerce-connector/blob/v4/coveo/searchprovidercoveosearchservices/resources/examples/electronics-multimarket-singlesource-configuration-example.impex) in the connector code base.
You can use it as a template to fill with your data and configure your project faster.

## Configure the item title

In mode 1, a product's `name` and content-browser `title` are identical, so the connector reuses the mandatory `name` value for both.

In mode 2, this is no longer true: `ec_name` is a localized [dictionary field](https://docs.coveo.com/en/2036.md) (a map of localized values), while the `title` shown for the item in the [**Content Browser**](https://platform.cloud.coveo.com/admin/#/orgid/content/browser/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/content/browser/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/content/browser/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/content/browser/)) must be a single string.
To resolve this, use the `coveoMultiMarketSingleSourceDocumentTitleSnIndexerValueProvider` value provider to set the specific language used for the item title.

Configure the value provider through the `valueProviderParameters`:

* `defaultLanguage` sets the language used for the title (for example, `zh`).

* `expression` sets the model attribute used to populate the title value (for example, `name`).

Because the title now comes from this value provider, you also configure the dictionary field that maps to `ec_name`.
The following example configures both the `name` (title) and `ec_name` fields:

```
INSERT_UPDATE SnField; indexType(id)[unique = true]; id[unique = true]; name; fieldType(code); localized[default = false]; valueProvider; valueProviderParameters[map-delimiter = |]; qualifierTypeId
; $coveoProductIndexType; name; Name; TEXT; true; coveoMultiMarketSingleSourceDocumentTitleSnIndexerValueProvider; defaultLanguage->zh|expression->name; ;
; $coveoProductIndexType; ec_name; EC_Name; TEXT; true; productAttributeSnIndexerValueProvider; expression->name;
```

> **Note**
>
> When an `SnField` is configured as localized, the standard SAP Commerce value providers return a map of localized values.
> In mode 2, the connector pushes that map as a dictionary field.
> In mode 1, the connector instead determines the localized value relevant to each per-market source.
> This is why `ec_name` is configured as a localized dictionary field in mode 2.