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

# salutation.dat configuration

> Structure of the salutation list salutation.dat: columns, salutation codes, gender codes, and how the complete salutation line is built from the tags $W-Text, $W-Title, and $W-LastName.

The `salutation.dat` configuration defines the salutations the buyer can choose from when entering their billing address and an alternative delivery address. The same file also determines how the complete salutation line in letters and emails is later built from them.

![Konfig Anrede](https://mintcdn.com/websaleag-44ee7ea6/qpKXKLTjn0wDjacH/images/konfig_anrede.png?fit=max\&auto=format\&n=qpKXKLTjn0wDjacH\&q=85\&s=2ec39ba1322026964ba2c9539c475994)

Guide: Defining how salutations and titles are formed, Selection lists for address data · Reference: title.dat configuration · Basics: Configuration basics

## Where the file is located

The shop looks for the file in two locations, in this order:

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
konfiguration/<Subshop-ID>/salutation.dat
konfiguration/salutation.dat
```

The subshop's file takes precedence. If there is none or it is empty, the shop falls back to the shared file one level up. This lets you maintain one salutation list for all subshops and deviate only where necessary.

> [!WARNING]
>
> At least one of the two files must exist and must not be empty. If the shop finds neither, or the header row is missing, it aborts with an error message.

## Structure

The file is tab-separated. The first row contains the column names, and from the second row on, each salutation has its own row.

| Column | Meaning |
| - | - |
| `Salutation` | the entry as it appears in the salutation selection list |
| `Country` | three-letter ISO country code. WEBSALE V8s uses it to build different salutation lines depending on the shop language |
| `Code` | the two-digit salutation code, for example `01` for "Mr." |
| `Sex` | single-character code for the gender |
| `Text` | the salutation text that is inserted into the salutation line |
| `CompleteSalutation` | the blueprint for the complete salutation line |

> [!NOTE]
>
> Columns are identified by their names in the header row, not by their position. This means the column order is up to you, but the spelling of the names is not. The shop does not evaluate more than ten columns.
>
> The module for forms and inquiries even aborts with a warning if one of the six columns is missing from the header row.

### The first entry stays empty

The second row of the file, that is, the first data entry, should be left empty in the `Salutation` column. This makes the selection list in the shop start with an empty entry, so the buyer makes a deliberate choice instead of unintentionally accepting the first salutation.

> [!NOTE]
>
> For this empty entry, the shop prefixes the salutation code in the form value with `empty_`, for example `empty_00`. It removes the prefix again during evaluation. So if you come across `empty_` in form values or in the source code, it is not an error.

## Salutation code and gender code

| Column | Rule |
| - | - |
| `Code` | must be assigned identically for all countries |
| `Sex` | must also be assigned identically for all countries |

If "Herr" uses code `01` in the German shop, then "Mr." must use the same code `01` in the English shop. The same applies to the gender code.

The reason lies in further processing: the code is stored, not the text. Only if the code has the same meaning across all languages can first name and title be validated correctly later and a matching salutation be generated.

> [!WARNING]
>
> You may need to coordinate these codes with your ERP system. That is where they end up as well.

## The salutation line

In the `CompleteSalutation` column, you assemble the complete salutation line from three placeholders.

| Placeholder | Is replaced by |
| - | - |
| `$W-Text` | the content of the `Text` column |
| `$W-Title` | the buyer's title |
| `$W-LastName` | the buyer's last name |

You define how the title is formed in the `title.dat` configuration.

Reference: title.dat configuration

This results in the typical patterns:

| `CompleteSalutation` | Result |
| - | - |
| `$W-Text` | "Sehr geehrte Damen und Herren" |
| `$W-Text $W-Title $W-LastName` | "Sehr geehrter Herr Dr. Müller" |
| `$W-Text $W-LastName` | "Sehr geehrte Familie Müller" |

## Example

A `salutation.dat` for the language combination German and English. The first data row is the empty entry.

| Salutation | Country | Code | Sex | Text | CompleteSalutation |
| - | - | - | - | - | - |
| | `DEU` | `00` | `0` | Sehr geehrte Damen und Herren | `$W-Text` |
| Herr | `DEU` | `01` | `1` | Sehr geehrter Herr | `$W-Text $W-Title $W-LastName` |
| Frau | `DEU` | `02` | `2` | Sehr geehrte Frau | `$W-Text $W-Title $W-LastName` |
| Firma | `DEU` | `05` | `0` | Sehr geehrte Damen und Herren | `$W-Text` |
| Familie | `DEU` | `07` | `0` | Sehr geehrte Familie | `$W-Text $W-LastName` |
| | `GBR` | `00` | `0` | Dear Sir or Madam | `$W-Text` |
| Mr. | `GBR` | `01` | `1` | Dear Mr. | `$W-Text $W-Title $W-LastName` |
| Mrs. | `GBR` | `02` | `2` | Dear Mrs. | `$W-Text $W-Title $W-LastName` |
| Ms. | `GBR` | `06` | `2` | Dear Miss | `$W-Text $W-Title` |
| Family | `GBR` | `07` | `0` | Dear Mr., Dear Mrs. | `$W-Text $W-LastName` |

This example illustrates the code rule well: `01` means the same thing in both language blocks, namely the male individual salutation, and therefore also has the same gender code `1` in both.

> [!NOTE]
>
> You set the language your shop uses in the `Basic` section of the `shop.config`.

Reference: shop.config, basics and technology

## Changes to the salutation list

The shop reads the file once per request. Changes therefore take effect with the next page request.

A row you remove disappears from the selection list. For orders that have already stored the corresponding salutation code, the shop then no longer finds a matching entry and outputs neither the salutation text nor the salutation line. It is therefore best to delete only rows whose code was never in use, and otherwise change only the text.


## Related topics

- [title.dat configuration](https://dokumentation.websale.de/en/v8s/referenz/konfigurationen/konfiguration-title-dat.md)
- [A- (Billing address)](https://dokumentation.websale.de/en/v8s/referenz/tags/a-rechnungsadresse.md)
- [Configuration migration](https://dokumentation.websale.de/en/migration/migration-websale-v8s-neue-version/konfiguration-migration.md)
- [Configuration types](https://dokumentation.websale.de/en/v8s/grundlagen-konfiguration/konfigurations-typen.md)
- [Configuration currency.dat](https://dokumentation.websale.de/en/v8s/referenz/konfigurationen/konfiguration-currency-dat.md)


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