# 560 · servicecommitmentsfrombc

> Technisches Mapping des Jobs `servicecommitmentsfrombc` (`BCServiceCommitments`).

---

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

---

| Eigenschaft | Wert |
|---|---|
| Order | 560 |
| Job | `servicecommitmentsfrombc` |
| Mapping | `BCServiceCommitments` |
| Richtung | BC → CE |
| Quellverbindung | BC_Test |
| Zielverbindung | CRM_Test |
| Quelltabelle (API) | `serviceCommitments` aus `microsoft/subsBilling/v1.0` |
| Zieltabelle | `wysa_bcserviceobjectcommitment` |
| Zeitplan | 0 */2 * * * * |
| Filter | `{{lastModifiedDateTime gt %watermark%}}` |
| Watermark | `lastModifiedDateTime` (Typ `datetime`) |
| Response-Job | — |
| Fachliche Doku | [Abonnementzeilen aus BC](../abonnement/bcservicecommitments/) |

## Feldzuordnung

| Quellfeld | Zielfeld | Operation | Details |
|---|---|---|---|
| `billingBasePeriod` | `wysa_billingbaseperiod` | — | — |
| `billingRhythm` | `wysa_billingrhythm` | — | — |
| `calculationBaseAmount` | `wysa_calculationbaseamount` | — | — |
| `calculationBase` | `wysa_calculationbasepercent` | — | — |
| `cancellationPossibleUntil` | `wysa_cancellationpossibleuntil` | — | — |
| `contractLineNo` | `wysa_contractlinenumber` | — | — |
| `contractNo` | `wysa_contractnumber` | — | — |
| `description` | `wysa_description` | — | — |
| `discountAmount` | `wysa_discountamount` | — | — |
| `discountPctg` | `wysa_discountpercent` | — | — |
| `discount` | `wysa_discount` | OptionMapping | Werte: true→1, false→0 |
| `extensionTerm` | `wysa_extensionterm` | — | — |
| `initialTerm` | `wysa_initialterm` | — | — |
| `invoicingVia` | `wysa_invoicingvia` | OptionMapping | Werte: Contract→799840000, Sales→799840001 |
| `lineNo` | `wysa_entrynumber` | — | — |
| `nextBillingDate` | `wysa_nextbillingdate` | — | — |
| `noticePeriod` | `wysa_noticeperiod` | — | — |
| `packageCode` | `wysa_packagecode` | — | — |
| `partner` | `wysa_partner` | OptionMapping | Werte: Customer→799840000, Vendor→799840001 |
| `price` | `wysa_price` | — | — |
| `quantityDecimal` | `wysa_quantity` | — | — |
| `serviceAmount` | `wysa_serviceamount` | — | — |
| `serviceEndDate` | `wysa_serviceenddate` | — | — |
| `serviceObjectNo` | `wysa_serviceobjectid` | Lookup | → `wysa_bcserviceobject` über `wysa_numberkey` (`serviceObjectNo` → `wysa_number`) |
| `serviceStartDate` | `wysa_servicestartdate` | — | — |
| `systemId` | `wysa_bcsystemid` | — · **Schlüssel** | — |
| `termUntil` | `wysa_termuntil` | — | — |

## Alternate Key

```json
{
  "keyType": "CustomKey",
  "keyName": "wysa_bcsystemidkey",
  "keyValues": [
    {
      "attributeName": "systemId",
      "keyName": "wysa_bcsystemid",
      "rank": 1
    }
  ],
  "ignoreEmptySourceKey": false,
  "keyRank": 0
}
```

## Weitere technische Details

### Transformationen im Detail

**Abonnement** (`serviceObjectNo` → `wysa_serviceobjectid`) — Lookup auf die
Abonnementtabelle über die Abonnementnummer:

```json
{
  "Operations": [{
    "Name": "Lookup",
    "Parameters": {
      "TargetTable": "wysa_bcserviceobject",
      "TargetKey": {
        "KeyType": "CustomKey",
        "KeyName": "wysa_numberkey",
        "KeyValues": [
          { "keyName": "wysa_number", "attributeName": "serviceObjectNo", "rank": 1 }
        ]
      }
    }
  }]
}
```

**`OptionMapping`** — übersetzt BC-Textwerte in Dataverse-Auswahlwerte. Die Operation
kommt nur in diesem Mapping vor:

```json
{
  "Operations": [{
    "Name": "OptionMapping",
    "Parameters": {
      "Mapping": [
        { "Key": "Contract", "Value": "799840000" },
        { "Key": "Sales", "Value": "799840001" }
      ]
    }
  }]
}
```

| Zielfeld | Zuordnung |
|---|---|
| `wysa_invoicingvia` | `Contract` → `799840000`, `Sales` → `799840001` |
| `wysa_partner` | `Customer` → `799840000`, `Vendor` → `799840001` |
| `wysa_discount` | `true` → `1`, `false` → `0` |

Bei `wysa_discount` sind die Zielwerte `1` und `0` — es ist ein Ja/Nein-Feld, keine
lösungseigene Werteliste.

Werte, die in der Zuordnungstabelle nicht vorkommen, sind nicht abgedeckt.

### Beobachtungen

Wie beim Abonnement liegt die Quelle **nicht** unter `singhammerITConsulting/dyce/v2.0/`.

Anders als das Abonnement ([`serviceobjectsfrombc`](../serviceobjectsfrombc/)), das über
seine fachliche Nummer adressiert wird, wird diese Zeile über die BC System-ID
adressiert.
