---
url: https://next.zammad.org/de/reference/rest-api/core-workflow.md
---

# Core Workflow

::: info
Core Workflows unterscheiden sich von [Triggern](/de/reference/rest-api/trigger):
Sie steuern das Formular zum Erstellen bzw. Bearbeiten von Tickets, während es ausgefüllt wird,
beispielsweise indem sie einschränken, welche Werte in einem anderen Feld ausgewählt werden können. Das
Formular übermittelt seine aktuellen Werte an Zammad, das die Workflows auswertet
und die daraus resultierenden Feldänderungen zurückgibt. Im Gegensatz zu Triggen wirken sie nicht
im Hintergrund auf bestehende Tickets ein.

Vergleichen Sie dies mit [Berichts-Profilen](/de/reference/rest-api/report-profile), deren `condition`
im Gegensatz zum Core Workflow überprüft, ob die referenzierten
Felder tatsächlich vorhanden sind.
:::

## Auflisten

Erforderliche Berechtigung: `admin.core_workflow`

`GET`-Anfrage gesendet: `/api/v1/core_workflows`

::: details

```json
// HTTP-Code 200 OK

[
  {
    "id": 11,
    "name": "Restrict priority for incidents",
    "object": "Ticket",
    "preferences": {},
    "condition_saved": {},
    "condition_selected": {
      "ticket.type": {
        "operator": "is",
        "value": [
          "Incident"
        ]
      }
    },
    "perform": {
      "ticket.state_id": {
        "operator": "set_fixed_to",
        "set_fixed_to": [
          "new",
          "open"
        ]
      }
    },
    "active": true,
    "stop_after_match": false,
    "changeable": true,
    "priority": 100,
    "updated_by_id": 3,
    "created_by_id": 3,
    "created_at": "2026-09-24T12:32:01.736Z",
    "updated_at": "2026-09-24T12:32:01.736Z"
  }
]

```

:::

::: info
Dieser Endpunkt gibt ausschließlich Workflows zurück, bei denen `changeable: true` gesetzt ist. Die
eingebauten System-Workflows von Zammad sind nicht änderbar und werden daher nicht berücksichtigt, sodass
die Antwort bei einer neu installierten Instanz ein leeres Array ist. Die Funktionen Show, Update und
Delete wirken sich ebenfalls nur auf änderbare Workflows aus.
:::

## Anzeigen

Erforderliche Berechtigung: `admin.core_workflow`

`GET`-Anfrage gesendet: `/api/v1/core_workflows/{id}`

::: details

```json
// HTTP-Code 200 OK

{
  "id": 11,
  "name": "Restrict priority for incidents",
  "object": "Ticket",
  "preferences": {},
  "condition_saved": {},
  "condition_selected": {
    "ticket.type": {
      "operator": "is",
      "value": [
        "Incident"
      ]
    }
  },
  "perform": {
    "ticket.state_id": {
      "operator": "set_fixed_to",
      "set_fixed_to": [
        "new",
        "open"
      ]
    }
  },
  "active": true,
  "stop_after_match": false,
  "changeable": true,
  "priority": 100,
  "updated_by_id": 3,
  "created_by_id": 3,
  "created_at": "2026-09-24T12:32:01.736Z",
  "updated_at": "2026-09-24T12:32:01.736Z"
}

```

:::

::: details

```json
// HTTP-Code 404 Not Found

{
  "error": "Couldn't find CoreWorkflow with 'id'=\"12\" [WHERE \"core_workflows\".\"changeable\" = $1]",
  "error_human": "Couldn't find CoreWorkflow with 'id'=\"12\" [WHERE \"core_workflows\".\"changeable\" = $1]"
}

```

:::

## Erstellen

Erforderliche Berechtigung: `admin.core_workflow`

`POST`-Anfrage gesendet: `/api/v1/core_workflows`

:::: details

::: tabs key:reqres

\=== Request

```json
{
  "active": true,
  "default_at_signup": false,
  "group_ids": {
    "1": "full",
    "2": "full",
    "3": "full"
  },
  "id": "c-12",
  "name": "VIP service",
  "note": "Handling of VIP customers!",
  "permission_ids": [
    "57",
    "58"
  ]
}

```

\=== Response

```json
// HTTP-Code 201 Created

{
  "id": 4,
  "name": "VIP service",
  "preferences": {},
  "default_at_signup": false,
  "active": true,
  "note": "Handling of VIP customers!",
  "updated_by_id": 3,
  "created_by_id": 3,
  "created_at": "2023-08-22T11:24:02.114Z",
  "updated_at": "2023-08-22T11:24:02.111Z",
  "permission_ids": [
    57,
    58
  ],
  "knowledge_base_permission_ids": [],
  "group_ids": {
    "1": [
      "full"
    ],
    "2": [
      "full"
    ],
    "3": [
      "full"
    ]
  }
}

```

:::

::::

::: info
Der Core Workflow validiert *nicht*, ob die in
`condition_selected` oder `perform` referenzierten Felder
existieren. Ein Workflow, der ein nicht existierendes Feld referenziert,
wird ohne Fehler gespeichert. Er hat keine sichtbaren Auswirkungen in der Ticket-Maske,
bis das referenzierte Feld existiert.
:::

## Aktualisierung

Erforderliche Berechtigung: `admin.core_workflow`

`PUT`-Request gesendet: `/api/v1/core_workflows/{id}`

Die Nutzlast-Struktur ist identisch mit Erstellen. Die Antwort ist der
aktualisierte Datensatz, in der gleichen Form wie Show/Create.

::: info
Das Senden einer vollständigen Create-Nutzlast an die `id` eines bestehenden Workflows aktualisiert
diesen Datensatz direkt. Es wird kein Duplikat erstellt.
:::

:::: details

::: tabs key:reqres

\=== Request

```json
{
  "name": "Restrict priority for incidents",
  "object": "Ticket",
  "condition_saved": {},
  "condition_selected": {
    "ticket.type": {
      "operator": "is",
      "value": [
        "Incident"
      ]
    }
  },
  "perform": {
    "ticket.state_id": {
      "operator": "set_fixed_to",
      "set_fixed_to": [
        "new",
        "open"
      ]
    }
  },
  "active": true,
  "stop_after_match": false,
  "changeable": true,
  "priority": 100,
  "id": 11
}

```

\=== Response

```json
// HTTP-Code 200 OK

{
  "id": 11,
  "name": "Restrict priority for incidents",
  "object": "Ticket",
  "preferences": {},
  "condition_saved": {},
  "condition_selected": {
    "ticket.type": {
      "operator": "is",
      "value": [
        "Incident"
      ]
    }
  },
  "perform": {
    "ticket.state_id": {
      "operator": "set_fixed_to",
      "set_fixed_to": [
        "new",
        "open"
      ]
    }
  },
  "active": true,
  "stop_after_match": false,
  "changeable": true,
  "priority": 100,
  "updated_by_id": 3,
  "created_by_id": 3,
  "created_at": "2026-09-24T12:32:01.736Z",
  "updated_at": "2026-09-24T12:32:44.519Z"
}

```

:::

::::

## Löschen

Erforderliche Berechtigung: `admin.core_workflow`

::: danger
**Dies ist eine endgültige Entfernung**

Bitte beachten Sie, dass das Löschen von Core Workflows nicht rückgängig gemacht werden kann.
:::

`DELETE`-Request gesendet: `/api/v1/core_workflows/{id}`

::: details

```json
// HTTP-Code 200 OK

{}

```

:::
