.. _slack-usage: =========== Quick start =========== This example creates a TYPO3 notification and sends it using an on-demand Slack route. The core notification manager handles channel selection and dispatch. Create a notification ===================== .. code-block:: php dispatcher ->route('slack', SlackRoute::webhookNamed('monitoring')) ->notify(new DeploymentCompleted()); } } To send via the Web API instead, use: .. code-block:: php $this->notifications ->route('slack', SlackRoute::api('C0123456789', 'a_bot_token')) ->notify(new DeploymentCompleted()); The Bot Token is not supplied when building the SlackRoute, it is obtained from :ref:`TYPO3 configuration `. Send from a notifiable model ============================ A notifiable domain object can define its own Slack route: .. code-block:: php notify(new DeploymentCompleted()); A ``null`` or empty-string Slack route causes the core to skip that recipient. The ``via()`` method must include ``slack`` unless the caller uses an explicit channel override supported by the core. Next steps ========== See :ref:`Routing `, :ref:`Message formats `, and :ref:`Queued notifications `.