Guides
Webchat
Setting up the webchat notification system
Setup webchat template
Create a template from scratch
Name the template Webchat Guide
Create context
Navigate to create context and click on Edit Flow
Adding actions
Use the library to add the following actions :
Register for new webchat sessions
Send opening webchat message on create context
Opens a conversation on new webchat response
Configuring added actions
- When creating a new webchat it is important to give it a
UNIQUE NAME
- This name will be used for routing client packets to this stub
- The name must be all lowercase and have no spaces or special characters
- In the path below your name will be placed in
.{{stub.program.branch}}yourcustomname.
- e.g
.{{stub.program.branch}}mywebchat.
- New heimdall path will be :
stubber.systems.notifications.webchat.org.{{stub.orguuid}}.name.{{stub.program.branch}}mywebchat.webchatmessagetype.initialize
Configuring template data
- Add a welcome message via template data
- Enter a message of your choosing
Register paths
- Create a draft stub
- Run action
register_for_initial_chat_messages
Configure webchat
Now that we have a stub listening for initialize events we can setup the webchat client
Get your orguuid
Open the webchat demo builder
Replace the
orguuid
field with your orguuidReplace the
chat_name
field withdraft
+your webchat name
- Click on
refresh changes
- Open the chat window
You should see the following message :
- In your draft stub.data will be the webchat client details and sessionuuid
- The sessionuuid will be used to send payloads to a specific webchat session
- Once a user sends a message a new stub will be created on the
default context
to handle the conversation
Default context
Navigate to default context and click on Edit Flow
- Add actions
_create
,_update_from_webchat
_create
action executes on stub creation. This action will be used to initialize the conversation_update_from_webchat
action is executed but the stubber system when a new message is sent from the client
- In
_create
action add the notification itemWebchat notification to session
- In the notification update
sessionuuid
andwebchat_message.value
as seen below
- Now your webchat will reply to you with
This is a message from create action
- This message will create a link between the webchat session and this stub session for 24 hours
- All payloads will now be sent to this stub
- Messages will be automatically placed in
stubpost.message
- To respond to further messages add the notification item
Webchat notification to session
to_update_from_webchat
- configure the notification as seen below
- Now all future messages from this stubsession will be handled by this stub