Salesforce Messaging Chat Widget “Not Sent” Error & Endless Loading
1 views
Sep 7, 2025
Show More Show Less
View Video Transcript
0:06
Hello everyone. In this video we are
0:09
going to see Salesforce messaging chat
0:12
window loading issue or not sent error
0:16
message on the Salesforce messaging for
0:19
web chat window. Let's look at the issue
0:22
first.
0:24
This is my third party website. This is
0:27
my GitHub website where I have hosted
0:30
Salesforce messaging for web. So I got
0:33
the code snippet from embedded service
0:35
deployment. I hosted it in my GitHub
0:37
site and I'm trying to initiate
0:41
Salesforce messaging for web. It is
0:44
still loading and it will keep on
0:46
loading and then it is not allowing me
0:49
to
0:51
initiate the chat.
0:53
If I try to see the error, I'm getting
0:56
some 404 error and then I'm getting fail
1:00
to load uh the resource from the server.
1:03
So this is an issue. If I just refresh
1:06
the page, I'm able to see the chat
1:08
window is opened. And if I try to send a
1:10
message like uh
1:13
demo testing
1:17
in sometime it will it is send it is uh
1:20
throwing me an throwing me an error
1:22
saying that not send sorry not sent if I
1:25
want to resend the message I can click
1:27
this resend. Even if I try resending
1:31
I may get the same error. Let's see the
1:34
possible uh reasons for this issue and
1:38
how to troubleshoot and debug it so that
1:41
we can resolve the issue.
1:44
So here the main reason I'm getting this
1:46
issue is recently
1:49
I made a particular field in the
1:52
messaging session object as required
1:55
for so the the required field which I
1:59
made was this language. This is a custom
2:02
field. I created it and then I made it
2:05
required.
2:06
So whenever
2:09
we make a field required in messaging
2:11
session, we have to make sure that this
2:14
particular field is populated
2:18
or we can do
2:22
hidden pre-hat and then we can pass the
2:24
value whenever the chat is initiated so
2:28
that the messaging session record is
2:30
created with this
2:32
field which is required.
2:35
So make use of pre-hat field or hidden
2:39
pre-hat so that the required fields are
2:41
filled.
2:43
One more thing where we have to see is
2:46
we have to check on the messaging
2:48
session whether we have any validation
2:50
rules. If you create any validation
2:52
rules make sure whenever the chat is
2:55
initiated the validation rule is not
2:57
getting fired. Same thing we have to
2:59
check triggers and also we have to check
3:03
flow triggers. So if you are having any
3:05
validation in the before uh insert or
3:08
before update uh on the messaging
3:11
session object or entity then we have to
3:13
make sure we are not uh stopping the
3:17
chat to load. So these are all the
3:19
things we have to check it on the
3:20
messaging session. Why we have to check
3:22
all these here are whenever the chat is
3:25
initiated for Salesforce messaging for
3:27
web it creates conversation record
3:30
messaging session record messaging user
3:33
record and other object records so that
3:35
the chat is initiated and then it gets
3:38
routed via omni channel. So there are so
3:40
many entities that are crucial in
3:43
loading the chat. So make sure whenever
3:45
we touch uh these objects if you are
3:49
making any development on float trigger
3:53
validation rule or any custom fields
3:56
creation with making it mandatory at the
3:59
database level then we have to make sure
4:01
the thorough testing is done so that it
4:03
can be pushed to production. So the
4:06
first thing is make sure we are not uh
4:09
um stopping the chat window to load
4:11
because of making some validation rules
4:14
or uh flow or trigger validation or
4:18
making a field required.
4:20
So now since I fixed that uh field
4:26
I'm going to start the chat. It is
4:29
loading. I can see the chat window is uh
4:32
loaded. Now if I send any message
4:38
it says that it is sent. Previously it
4:41
was showing as not sent. Let's see some
4:44
additional things where we can debug and
4:47
troubleshoot it. Let's say you didn't
4:49
create any custom fields or any
4:52
validation rule flow or trigger on this
4:54
messaging session object and still you
4:56
are facing the same issue. Then let's
4:58
see the additional information which can
5:01
be checked so that we can fix or resolve
5:04
this issue.
5:11
Okay. So the first cause we we saw the
5:13
field is not required. Next is we also
5:16
saw a validation rule. Next we also saw
5:21
we are making sure that there are no
5:23
flows or which is stopping. So here I
5:26
don't have any flow triggers and also I
5:28
don't have any triggers.
5:33
Next is trigger. We uh concluded that.
5:36
And next is we have to make sure storage
5:38
limit is not exceeded. So go to storage
5:42
usage
5:44
in Salesforce setup and make sure you
5:47
have
5:49
the storage. It is only 19% used. So my
5:52
storage limit is not exceeded. If the
5:54
storage limit is exceeded then messaging
5:57
session records and other uh related
6:00
records like conversation messaging user
6:02
records cannot be created. So it will
6:05
not load the chat window. So make sure
6:07
the storage is not exceeded. So this is
6:09
the cost file. And uh one more important
6:13
thing which we have to check is let's
6:15
say you are using a third party website.
6:17
in the third party website. Whenever you
6:19
get the embedded service code uh
6:21
snippet.
6:24
So this is the code we put it on the
6:26
third party website.
6:33
So make sure this code snippet is not
6:36
copied and pasted on the same page
6:38
multiple times. This is one thing if you
6:41
are using third party website. Let's say
6:43
you are making use of messaging for web
6:46
in your experience cloud site. In that
6:48
case,
6:51
make sure you are adding the embedded
6:55
messaging
6:57
on the footer.
7:02
So this is the
7:06
standard component which we add.
7:09
So make sure you are adding it on the
7:11
footer.
7:13
If you have a strong business use case
7:16
that it cannot be added on each and
7:18
every page. It should be on a specific
7:21
page then add it
7:25
to the page uh level uh section and
7:30
make sure you are not adding multiple
7:32
times. So if you go to this page
7:34
structure make sure in the whole page
7:37
structure it should be added only once.
7:40
If you add add it in the sidebar or if
7:43
you add it in the content section, make
7:45
sure you are not duplicating. If you add
7:47
the same standard embedded messaging in
7:51
content footer, sidebar and content and
7:54
and or content header or on the sidebar
7:57
featured section these duplicate
8:01
embedded messaging and also if you are
8:03
using XP uh third party website, if you
8:05
are adding the same embedded service
8:07
code uh snippet multiple times, the
8:10
JavaScript will conflict which will
8:12
prevent the chat window to load.
8:16
So that is also one important thing we
8:19
have to check.
8:24
Please check the video description. In
8:26
the video description I have shared my
8:28
blog post. From the blog post you should
8:30
be able to get the causes and also how
8:34
to fix those causes. So if you are
8:37
having some issue with cost 2 then you
8:40
can check
8:42
how to uh find or debug the issue so
8:47
that you can easily resolve it.
8:54
I hope it was helpful.
9:02
Thank you for watching.
#Internet Software