# להודיע לאנשים באפליקציה

> מציב התראה בפעמון של הצוות, של המנהלים או של אדם אחד. בכותרת ובהודעה אפשר להשתמש בפרטים שנמצאו.

Source: https://docs.go-lumen.ai/he/reference/steps/notify-in-app

## במבט אחד

| מאפיין | ערך |
| --- | --- |
| **שם השלב** | `notify-in-app` |
| **משאב** | ClusterStep (`lumen.ai/v1alpha1`) |
| **קבוצה וקטגוריה** | notify, messages |
| **קרדיטים** | **0** קרדיטים בכל פעם שהוא מצליח |
| **השפעה חיצונית** | כן: הוא משנה משהו מחוץ ל-Lumen, ולכן ניסיון חוזר שואל קודם, ובדיקה מראה מה הוא היה עושה במקום לעשות את זה. |
| **ההתקנה צריכה לספק** | כלום |

## קלט

| מאפיין | ערך |
| --- | --- |
| **צריך** | כלום |
| **מפיק** | כלום |
| **עובד על** | item: מסמך אחד בכל פעם |

״צריך״ ו״מפיק״ הם סוגי נתונים (file, text, fields, email). העורך מציע שלב רק במקום שבו מה שהוא צריך כבר נמצא במסלול. ראו [מסמכים ונתונים](https://docs.go-lumen.ai/he/concepts/how-flows-run.md#documents-and-data).

## פלט

אין פלטים בשם. הצמתים הבאים עדיין רואים את כל מה שהופק קודם במסלול, והשלב מעביר את המסמכים הלאה כמו שהם.

## הגדרות

מגדירים תחת `config:` בצומת של התהליך. הגדרות טקסט יכולות להכיל מצייני מקום כמו `{nodeId.field}`.

| הגדרה | סוג | ברירת מחדל | תיאור |
| --- | --- | --- | --- |
| `to` | string | `"members"` | To is who is told: every member, the admins, or one person. (one of members, admins, person) |
| `person` | string |  | Pick someone from your team, or use a value found earlier. (maxLength 320) |
| `title` (חובה) | string |  | The bold first line. (minLength 1; maxLength 200) |
| `body` | string |  | Optional. A line or two under the title. (maxLength 2000) |
| `link` | string |  | Optional. Where a click on the notification goes. (maxLength 500) |

ה-JSON Schema המלא של ההגדרות: [notify-in-app.schema.json](https://docs.go-lumen.ai/schemas/steps/notify-in-app.schema.json).

## דוגמה

```yaml title="config"
body: 'Total: {total}'
title: New invoice from {supplier}
to: admins
```

## שימוש בתהליך

צומת שמריץ את `notify-in-app` נכנס תחת `spec.nodes` של [Flow](https://docs.go-lumen.ai/he/concepts/how-flows-run.md#the-flow-as-yaml). תנו לו כל מזהה, ורשמו ב-next את מזהי הצמתים הבאים.

```yaml title="flow.yaml"
apiVersion: lumen.ai/v1alpha1
kind: Flow
metadata:
  name: notify-in-app-example
  namespace: tenant-acme
spec:
  displayName: "Notify people in the app"
  triggers:
    - id: start
      ref: {name: manual-run}
      next: [notify-in-app]
  nodes:
    - id: notify-in-app
      stepRef: {name: notify-in-app}
      config:
        body: 'Total: {total}'
        title: New invoice from {supplier}
        to: admins
```
