Webchat
Routing Webchat Traffic
Setting up the webchat notification system
Choosing a routing method
- The routing method you choose will depend on your use case. Direct to stub will fit most use cases.
- Heimdall should be used for webchat's that experience high traffic (e.g webchat's on a website homepage)
- Webchat has 2 routing methods:
- Heimdall
- Direct to stub using Stubref
- Heimdall is flexible but difficult to setup and understand for new users.
- Direct to stub is quick and easy to setup.
Routing webchat traffic via Heimdall
- Using heimdall you can listen to events from all webchat clients.
- Webchat data received from heimdall is placed in
stub.data.heimdall.webchat
. - There are multiple events you can listen to on heimdall but the most important event is
firstmessage
. - The
firstmessage
event fires when a user sends a webchat message. - Create the heimdall registration
stubber.systems.notifications.webchat.org.{{stub.orguuid}}.name.new_webchat_profile.webchatmessagetype.firstmessage
Routing webchat traffic via Stubref
- First messages of users are directly sent to a stub you specify.
- Webchat data received directly is placed in
stub.data._incoming_webchat_data
- The default action that is executed on a stub is
_update_from_webchat