# 430 · contactsfrombc

> Technisches Mapping des Jobs `contactsfrombc` (`BCContacts`).

---

LLMS index: [llms.txt](/llms.txt)

---

| Eigenschaft | Wert |
|---|---|
| Order | 430 |
| Job | `contactsfrombc` |
| Mapping | `BCContacts` |
| Richtung | BC → CE |
| Quellverbindung | BC_Test |
| Zielverbindung | CRM_Test |
| Quelltabelle (API) | `acdcontacts` aus `singhammerITConsulting/dyce/v2.0` |
| Zieltabelle | `contact` |
| Zeitplan | 0 */2 * * * * |
| Filter | `{{lastModifiedDateTime gt %watermark%}}` |
| Watermark | `lastModifiedDateTime` (Typ `datetime`) |
| Response-Job | — |
| Fachliche Doku | [Kontakt aus BC übernehmen](../kontakt/bccontacts/) |

## Feldzuordnung

| Quellfeld | Zielfeld | Operation | Details |
|---|---|---|---|
| `address2` | `address1_line2` | — | — |
| `address` | `address1_line1` | — | — |
| `city` | `address1_city` | — | — |
| `companyNumber` | `parentcustomerid` | Lookup | → `account` über `wysa_bccodekey` (`companyNumber` → `wysa_bccontactnumber`) |
| `countryRegionCode` | `wysa_address1_countryid` | Lookup | → `wysa_country` über `wysa_bccodekey` (`countryRegionCode` → `wysa_bccode`) |
| — | `wysa_sync2bc` | DefaultValue | = `799840000` |
| `eMail` | `emailaddress1` | — | — |
| `firstName` | `firstname` | — | — |
| `id` | `wysa_bcsystemid` | — | — |
| `languageCode` | `wysa_language` | Lookup | → `wysa_language` über `wysa_bccodekey` (`languageCode` → `wysa_bccode`) |
| `middleName` | `middlename` | — | — |
| `mobilePhoneNumber` | `mobilephone` | — | — |
| `number` | `wysa_bccontactnumber` | — · **Schlüssel** | — |
| `organizationalLevelCode` | `wysa_bcpositionid` | Lookup | → `wysa_bcposition` über `wysa_bccodekey` (`organizationalLevelCode` → `wysa_code`) |
| `phoneNumber` | `telephone1` | — | — |
| `postCode` | `address1_postalcode` | — | — |
| `salutationCode` | `wysa_salutationbcid` | Lookup | → `wysa_bcsalutation` über `wysa_bccodekey` (`salutationCode` → `wysa_code`) |
| `surname` | `lastname` | — | — |

## Alternate Key

```json
{
  "keyType": "CustomKey",
  "keyName": "wysa_bccodekey",
  "keyValues": [
    {
      "attributeName": "number",
      "keyName": "wysa_bccontactnumber",
      "rank": 1
    }
  ],
  "ignoreEmptySourceKey": false,
  "keyRank": 0
}
```

Identisch zum Vorgehen bei der [Firma](accountsfrombc/).

## Weitere technische Details

### Transformationen im Detail

Alle fünf Lookups folgen demselben Aufbau — sie unterscheiden sich nur in Zieltabelle
und Schlüsselfeld:

| Quellfeld | Zieltabelle | Schlüsselfeld | Alternate Key |
|---|---|---|---|
| `countryRegionCode` | `wysa_country` | `wysa_bccode` | `wysa_bccodekey` |
| `languageCode` | `wysa_language` | `wysa_bccode` | `wysa_bccodekey` |
| `salutationCode` | `wysa_bcsalutation` | `wysa_code` | `wysa_bccodekey` |
| `organizationalLevelCode` | `wysa_bcposition` | `wysa_code` | `wysa_bccodekey` |
| `companyNumber` | `account` | `wysa_bccontactnumber` | `wysa_bccodekey` |

Beispiel Anrede:

```json
{
  "Operations": [{
    "Name": "Lookup",
    "Parameters": {
      "TargetTable": "wysa_bcsalutation",
      "TargetKey": {
        "KeyType": "CustomKey",
        "KeyName": "wysa_bccodekey",
        "KeyValues": [
          { "keyName": "wysa_code", "attributeName": "salutationCode", "rank": 1 }
        ]
      }
    }
  }]
}
```

### Beobachtungen

**Übergeordnete Firma** (`companyNumber` → `parentcustomerid`) — der Lookup zeigt auf
`account` und löst über die BC Kontaktnummer der Firma auf. Anders als beim
gleichnamigen Lookup der Firma gibt es hier **kein** `SetNullIfEqualsValueOfField` —
ein Personenkontakt trägt sich nicht selbst als Unternehmen ein, der Sonderfall kann
also nicht auftreten.

**Freigabe** (`wysa_sync2bc`) — fester Wert `799840000` („Ja") per `DefaultValue`.
