Auto-Start Salesforce Enhanced Chat with Custom or Static Messages
Oct 27, 2025
Show More Show Less
View Video Transcript
0:06
Hello everyone. In this video, we are
0:08
going to see
0:10
how to allow
0:13
website visitors
0:15
to enter a custom message or select
0:19
static messages
0:22
on the site so that the Salesforce
0:25
enhanced chat previously called as
0:28
Salesforce messaging for inapp and web
0:30
session will be initiated or launched
0:35
with the message that was selected or
0:38
entered by the website visitors. Let's
0:42
see a simple demo. So here I'm going to
0:44
say I need help with my
0:52
deals. So if I can press enter or I can
0:56
click this send uh icon. So if I click
0:59
it, the Salesforce uh chat is loaded and
1:03
then it sends the message that was
1:06
entered by me in the input.
1:09
Let me go offline here in omni channel
1:13
and as an agent
1:16
let me make myself available.
1:23
Now I received the messaging session and
1:25
then and and then I can see the message
1:27
that was typed I need help with my
1:30
deals.
1:32
Similarly
1:35
I can also
1:38
select any static messages. So for
1:40
example, if I select need help with my
1:44
case
1:51
as an agent, I should see the message
1:54
that was selected.
1:59
So
2:00
I was able to allow the users to send
2:04
some custom messages or
2:08
couple of static messages that the
2:10
website visitors can choose.
2:14
Let me end this uh chats.
2:17
Let me go offline in omni channel.
2:20
Now let's look at the
2:24
technical uh solution that was
2:26
implemented for this use case
2:32
using embedded service bootstrap dots
2:36
settings.hide chat button on load
2:38
property. Whenever the chat um the
2:41
embedded service uh JavaScript is loaded
2:43
on my site, it will hide the chat
2:46
button.
2:48
Next
2:52
Whenever this button uh
2:56
it it is actually an icon. Whenever that
2:58
is uh selected or whenever in the input
3:03
if I click if I press enter
3:07
then what I'm doing is
3:11
I am hiding the chat container which is
3:14
uh the chat area which you were able to
3:17
see. This is the container that is uh
3:19
that will be hidden.
3:22
So this whole uh uh chat container will
3:26
be hidden.
3:28
So I'm calling this uh method sorry I'm
3:32
calling this method
3:34
and then I'm using uh CSS display equal
3:38
to none so that it will be hidden from
3:39
the view.
3:42
Next,
3:45
whenever they have entered a proper
3:48
message,
3:50
it will call launch chat javascript
3:53
method. So here in the launch chat
3:55
javascript method, I'm using embedded
3:58
service bootstrap.util
4:01
util API dot launch chat method.
4:05
This method will launch the chat
4:10
like this.
4:13
And then what exactly I'm doing is
4:17
I'm calling send a message to chat. So
4:20
this is the another JavaScript method.
4:23
I'm using set timeout. Inside the set
4:25
timeout I'm waiting for 3 seconds to
4:28
fire embedded service bootstrap do.util
4:30
API dot send text message method. using
4:35
this me message sorry method I am
4:37
sending the message
4:40
uh if they have entered a custom message
4:42
that message will be sent to this method
4:44
if they selected the static messages
4:47
that particular selected static message
4:49
will be sent to this uh variable and
4:52
then it will use embedded service
4:54
bootstrap doutilapi send text message
4:58
method to send the message to the agent
5:05
Please check the video description. In
5:07
the video description, I have shared my
5:10
blog post. From the blog post, you
5:13
should be able to refer this sample HTML
5:18
and uh uh CSS and the JavaScript code as
5:22
your reference.
5:29
I hope it was helpful.
5:37
Thank you for watching.
#Software
#Internet Software
