aYOUne
translate
Not in your language

This page is not yet available in en. You're reading the de version.

Notifications

aYOUne hat einen zentralen Notification-Orchestrator (worker-notifications im config-Modul), der jedes Event über bis zu 11 Channels routen kann. Du konfigurierst Channels, Templates und Routing-Regeln einmal — der Worker erledigt den Rest.

Die 11 Channels

Channel Default Voraussetzung
Email (mail) aktiv SMTP oder SendGrid/Mailgun
SMS optional Twilio/Vonage Credentials
Push (Web) aktiv VAPID-Keys
Push (Mobile) optional Firebase Cloud Messaging
In-App aktiv Web-Socket-Gateway
Slack optional Webhook-URL
Discord optional Webhook-URL
Teams optional Webhook-URL
Webhook optional Custom-URL pro Customer
Wallboard aktiv (intern) Reporting-Wallboard
Voice optional Twilio Programmable Voice

Channels einrichten

In der UI: admin-v2 → Config → Notifications → Channels. Per CLI:

ay create credentials "Twilio Prod" \
  --type twilio \
  --set credentials.accountSid=AC... \
  --set credentials.authToken=$TWILIO_TOKEN

ay create notificationchannels "SMS via Twilio" \
  --set type=sms \
  --set credentials=<credentialsId> \
  --set active=true

Nach dem Anlegen kannst du den Channel via Test-Send prüfen:

ay exec notifications:test --channel sms --to +491701234567 --message "Hallo aus aYOUne"

Templates

Templates definieren Inhalt und Variablen pro Event-Typ. Beispiel: Mail-Template für consumers.created:

slug: consumer-welcome
subject: "Willkommen bei {{customer.name}}, {{consumer.first_name}}!"
body: |
  Hallo {{consumer.first_name}},

  schön dass du dich registriert hast. Dein Account ist sofort einsatzbereit.

  Viele Grüße
  Dein {{customer.name}}-Team
attachments:
  - hero: "{{branding.heroImage}}"

Template-Engine: Handlebars mit eigenen Helpern ({{date format='yyyy-MM-dd'}}, {{currency value=29.90}}). Hero-Resolver bezieht Bilder per Default aus cm.ayoune.app/<slug>/hero.jpg.

Routing-Regeln

Routing entscheidet, welcher Channel für welches Event mit welchem Template feuert. Beispiel:

event: tasks.assigned
rules:
  - if: "{{task.priority}} == 'critical'"
    channels: [push, sms, slack]
    template: task-critical
  - if: "{{user.preferences.email}} == true"
    channels: [mail]
    template: task-default

Rich-Content & Wallboard

Seit den April-2026-Updates (siehe Release Notes) unterstützt der Renderer Rich-Cards mit Hero-Bild, Tag-Chips und Initial-Bubble-Avataren. Das Wallboard rendert Notifications als Toasts oder Full-Screen-Alert (bei alertMode=true oder Category-Match).

Locale-Support

Templates können pro Locale getrennt werden: consumer-welcome (Default = Customer-Locale) + consumer-welcome.en (Englisch). Die Auswahl folgt dieser Chain:

  1. recipient.language
  2. customer.defaultLanguage
  3. Plattform-Default de

Verbindungen