Aysali logo

Notifications

Agents and visitors can receive an email when new chat messages arrive while they are offline. Templates and delivery are configured under Settings → Notifications.

Help links on Agent email notifications, User email notifications, and Email notifications via cron job point here.

Overview

SettingWho receives mailWhen
Agent email notificationsOffline agents/adminsUser sends a message (rules below)
User email notificationsOffline users with an emailAgent sends a reply
Email notifications via cron jobSame as aboveBatches one email with recent conversation lines instead of instant single-message mail

Every outbound message uses Settings → Notifications → Email template. Include \{content\} — it is required and is replaced with the body from User notification email or Agent notification email.

Email notifications for agents

Enable Settings → Notifications → Agent email notifications.

Routing matches push notifications:

  • First message — if the conversation has a department, mail goes to offline agents/admins in that department (and agents with no department). If assigned to a specific agent, only that agent. Otherwise offline agents/admins by department rules.
  • Later messages — only the last agent in the conversation.
  • Offline only — online agents do not receive these emails.
  • Queue — no email while the user is waiting in queue (same as push).
  • Human takeover — if Dialogflow/chatbot can answer, no email until human takeover is needed.
  • Do not send notifications to admins — excludes admins from recipient lists when enabled.

Email notifications for users

Enable Settings → Notifications → User email notifications.

When an agent sends a message, the user receives email only if they are offline. One email per notification cycle; follow-up agent messages do not send another immediate alert until the cycle resets.

Users must have a valid email on their profile (registration or lead capture).

Email templates and merge fields

Edit content under Settings → Notifications:

BlockUsed for
Email templateWrapper for all emails (\{content\} required)
User notification emailSubject + body when agents message users
Agent notification emailSubject + body when users message agents

You can use plain text or HTML. New lines in the editor are converted to <br />.

Merge fields

FieldDescription
\{recipient_name\}Name of the user or agent receiving the email
\{sender_name\}Name of whoever sent the message that triggered the email
\{sender_profile_image\}Profile image URL of the sender
\{message\}Text of the message that triggered the notification (cron mode may include a longer conversation snippet)
\{attachments\}HTML links to attachments on that message
\{conversation_link\}Link to open the conversation in the admin area — agent emails only
\{conversation_url_parameter\}Query string for user-facing deep links (?conversation=…&token=…) — user emails
\{conversation_id\}Numeric conversation ID

Test delivery with Send a user email notification or Send an agent email notification in the same settings area.

Cron job (optional)

For richer digests (recent messages in one mail, still one send per conversation batch), enable Email notifications via cron job and call the cron URL on a schedule.

Tenant bot URL (typical Aysali workspace):

https://your-bot-host.example/include/api.php?email-notifications=true

Example crontab (every 59 minutes):

*/59 * * * * wget -q -O /dev/null "https://your-bot-host.example/include/api.php?email-notifications=true"

Replace your-bot-host.example with your workspace bot host (the same origin as admin.php, e.g. from the Aysali tenant portal).

SMTP and delivery

Outgoing mail uses Settings → Notifications → SMTP:

ModeWhen to use
Use Aysali SMTPHosted workspaces with platform SMTP enabled (recommended)
SMTP SettingsYour own host, port, username, and password

If SMTP is not configured, PHP/mail() on the server may be used — often unreliable or marked as spam.

Troubleshooting

IssueWhat to check
No mail at allSend a test email from Notifications settings; check browser console for SMTP errors
Hosting / spamEnable Use Aysali SMTP or a reputable provider (e.g. SendGrid)
SMTP auth failsVerify host, port (465/587), username, password
Gmail / Google WorkspaceUse an App Password, host smtp.gmail.com, port 465 or 587; check Workspace API/app restrictions
Wrong contentConfirm Email template contains \{content\} and per-audience templates are filled in

Platform SMTP and third-party mail providers are outside Aysali Bot application support when misconfigured on your side — fix SMTP credentials or contact your mail provider.