# Sites

The **Sites** section allows you to manage all the configurations related to your sites.

<figure><img src="https://3057647601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbTY7EwZtYYQYC6GOcdTj%2Fuploads%2Fgit-blob-f037e9895ef67dfd38baf3b15a234fbc7b1cfbfb%2Fsite_settings.png?alt=media" alt="Site settings view"><figcaption><p>Site settings view</p></figcaption></figure>

## General information

When you create or edit a site, you enter the site details view. The general settings panel allows you to provide the basic site configuration that is essential for the storefront operations.

<figure><img src="https://3057647601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbTY7EwZtYYQYC6GOcdTj%2Fuploads%2Fgit-blob-158226201a7376df88e7e8677be0d2aa8f056af3%2Fsite_general.png?alt=media" alt="Site details" width="500"><figcaption><p>Site details</p></figcaption></figure>

Refer to the table for the configuration details.

| **Property**               | **Description**                                                                                                                                                                                                                     |
| -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Active                     | The activation flag enables a site on your webshop storefront when the configuration is ready.                                                                                                                                      |
| Default                    | There can be only one site marked as default for a tenant. The default site appears as the first one when customers enter the store's URL.                                                                                          |
| Name                       | The site's name that displays in the store.                                                                                                                                                                                         |
| Code                       | The technical name of the site that you can use in the API requests.                                                                                                                                                                |
| Languages                  | The set of languages that you want to use on the site. The languages list corresponds to the languages enabled for the tenant. In the storefront, customers are able to use a language switcher to select their preferred language. |
| Default Language           | The default language that displays as the first one on the storefront and is used when no language is specified in API requests.                                                                                                    |
| Ship to countries          | The countries that you want to enable delivery to for the site. The countries list corresponds to the countries enabled in the tenant.                                                                                              |
| Currency                   | The code of the default currency on the site.                                                                                                                                                                                       |
| Decimal digits             | The number of decimal points used in calculation of prices in the shopping cart. The property must be zero or a positive value.                                                                                                     |
| Payment methods            | The payment methods you want to enable on the site. The list of payment methods corresponds to the methods available in the tenant.                                                                                                 |
| Tax determination based on | The configuration of tax calculation base. Decide whether you want to use a customer's shipping or billing address when determining the relevant tax rates.                                                                         |
| Available currencies       | The list of currency codes that you support payments with on the site.                                                                                                                                                              |

{% hint style="info" %}
**Tax determination**

To determine the relevant location to calculate proper taxes, the cart and checkout services read the **Tax determination based on** setting for the site. This setting determines the proper location by the `countryCode` from the relevant address.\
The default setting for a site is the **billing address**.

If you set the tax determination as **shipping address**, the country for calculating tax is determined in the following order:

1. For the cart service:

a. the cart's `countryCode`

b. if the `countryCode` is not provided for a cart, a customer's default shipping address `countryCode`

c. if a customer doesn't have a default shipping address, the first customer's shipping address `countryCode` on the list

d. if a customer doesn't have any shipping addresses, the default `countryCode` from the site settings

2. For the checkout service:

a. a shipping address `countryCode`, provided during checkout

b. if a shipping address is not provided, a customer's billing address `countryCode` is taken as a fallback
{% endhint %}

## Home base address

Provide your business's address information.

<figure><img src="https://3057647601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbTY7EwZtYYQYC6GOcdTj%2Fuploads%2Fgit-blob-8475d0cd42cf4842c1b685c95bb082ffd639fec9%2Fsite_home.png?alt=media" alt="Site home address"><figcaption><p>Site home address</p></figcaption></figure>

{% hint style="info" %}
The **Country** and **Timezone** fields determine the computation of values for the defined sequential ID placeholders. The value you set in the **Country** field determines the country code value that replaces the country placeholder, while the selected site's **Timezone** determines all the date-and-time-related values.\
For example, if you use date and time placeholders for computing values in the order number sequential ID schema, the values for the date and time are generated based on the selected timezone. If the timezone is not set, the default system value is used (GMT/UTC-0).\
Or, if you wish to include a country code in the quote number pattern, the country placeholder takes the value that you have chosen for the home address country. If the **Country** is not set, the default system value is used (DE).\
To learn more how to define sequential ID schemas, refer to the [Sequential ID Service Tutorial](https://app.gitbook.com/s/d4POTWomuSS7d3dnh4Dg/api-guides/utilities/sequential-id/sequentialid).
{% endhint %}

## Location coordinates

Provide a longitude and latitude for the home base address.

<figure><img src="https://3057647601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbTY7EwZtYYQYC6GOcdTj%2Fuploads%2Fgit-blob-3c593a790287f533a4325fa7b8fdeafb601a3a98%2Fsite_location.png?alt=media" alt="Site location"><figcaption><p>Site location</p></figcaption></figure>

## Assisted buying

To enable using the assisted buying feature, enter the storefront URL in the corresponding field of the site settings.

<figure><img src="https://3057647601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbTY7EwZtYYQYC6GOcdTj%2Fuploads%2Fgit-blob-d132f923b16db1e19f4387ea0e4317469c856d25%2Fsite_assisted_buying.png?alt=media" alt="Assisted buying"><figcaption><p>Assisted buying</p></figcaption></figure>

If the authorization is successful, the following query parameters are added to the URL:

* `customerToken` - It's a customer authorization token.
* `customerTokenExpiresIn` - It indicates a validity period for the token.
* `saasToken` - It's a customer SaaS token. It contains information about the employee who generated the token, therefore it's crucial to send the `saas-token` header with the value in every HTTP request sent by a customer.

After enabling the feature for a specific site, you can now log in as a customer and perform the requested actions on their behalf. In the [Customers](https://developer.emporix.io/ce/management-dashboard/customer-management/customers) view in Management Dashboard, choose the site that you want to use. It opens a new browser tab with the storefront. You can now make any purchases or take any actions that were requested by the customer.

{% hint style="info" %}
To learn more about sites, see [Sites](https://developer.emporix.io/ce/core-commerce/sites) business documentation and [Site Settings Service](https://app.gitbook.com/s/d4POTWomuSS7d3dnh4Dg/api-guides/configuration/site-settings-service/site-settings) API guide.
{% endhint %}
