Webchat
Configure Client
Setting up webchat profiles and stub data for webchat
There are two ways to configure your webchat client:
- Using a webchat profile (recommended for most cases)
- Configuring directly in stub.data (useful for specific use cases)
Configure via Webchat Profile
Create Webchat Profile
Navigate to
Manage
. UnderConfig
SelectNotifications
Navigate into
Webchat/Webchat Profiles
Create a new profile.
Once you have completed configuring your profile name and description. Scroll to the bottom and click
Create
.Manage
will save your profile and refresh.Scroll to the bottom of your new profile and Click
Open webchat client
. This is a quick way to test your webchat without needing to create a webpage.
Testing Webchat Using Profiles
In profiles there are 2 branches:
live
anddraft
The Draft branch will be where most testing and development is done.
The Live branch should be reserved for live environments.
Opening Webchat Client Using Profile UUID
To quickly test your webchat, select your branch (
live
ordraft
)This will open a webpage with the webchat client embedded
- Example of a webchat client using the
live
branch: Live Webchat client - Example of a webchat client using the
draft
branch: Draft Webchat client
- Example of a webchat client using the
Note: When naming the webchat in a draft branch, "draft" will be automatically prefixed onto the Chat name.
Updating Webchat Profiles
- Make sure you are on the correct branch when updating a profile (
live
ordraft
) - Changes made to both branches will automatically update
Configure via Stub.data
You can configure webchat directly in a stub's data without using a profile. This is useful for specific use cases where you need more direct control.
Setup Configuration in Stub.data
- First, set up a
savedata
task with the config object below as thesavevalue
- Run the action in your target stub
- In
stub.data
, you'll now havestub.data._webchat_config
Using Your Configured Stub with Webchat
Once your stub has the configuration object, you can use your stubref as a parameter:
Or embed it in HTML:
Routing Methods with Stub Configuration
When using stub.data configuration:
- First messages from users are directly sent to your stub
- Webchat data received is placed in
stub.data._incoming_webchat_data
- The default action that is executed on a stub is
_update_from_webchat
Note: When using the stub.data method, Heimdall routing is not supported. This method is best for simple, direct webchat implementations.