Salesforce Messaging REST API Guide: How to Retrieve Estimated Wait Time EWT?
Sep 8, 2025
Show More Show Less
View Video Transcript
0:04
Hello everyone. In this video, we are
0:06
going to see how to retrieve or get
0:09
estimated wait time
0:12
when implementing Salesforce messaging
0:15
for web using custom client.
0:19
In order to access access Salesforce
0:21
messaging for web using rest APIs then
0:24
we have to create embedded service
0:27
deployment
0:29
of type custom client for the messaging
0:33
uh for web.
0:37
If you haven't done the custom client
0:40
embedded service deployment creation
0:42
before and then if you are getting
0:44
started now, please make sure you are
0:46
going through this uh link for your
0:49
reference and then uh you create a
0:53
messaging uh channel and also when you
0:55
create the embedded service deployment
0:57
uh make sure you are uh selecting a
1:00
custom client. So for a custom client
1:03
this is how the embedded service
1:05
deployment will be uh looking like. It
1:07
will have pre-hat push notifications and
1:11
uh code snippet. Even if you look at the
1:12
code snippet, we will have only few
1:16
information like organization ID, what
1:19
is the developer name and URL because
1:22
all this information we do uh use it in
1:25
the rest API calls.
1:30
Whenever we implement customuhat
1:34
client and uh if we use Salesforce
1:37
messaging for web endpoints for the rest
1:40
API calls,
1:43
we might have an use case where we
1:45
wanted to display estimated wait time
1:51
in the messaging uh channel when you
1:55
created the messaging channel for the
1:56
messaging for web implementation.
2:02
So this is the messaging channel I
2:04
created.
2:06
I cannot check it from here. So click
2:08
edit
2:11
and uh make sure
2:21
estimated weight time is enabled. So
2:24
show estimated weight time checkbox
2:26
should be enabled. And then you have to
2:28
click save
2:30
and then the respective messaging for uh
2:34
web embedded service deployment should
2:36
be published. Once you make any changes
2:41
in your messaging channel, make sure to
2:43
publish your embedded service
2:45
deployment. Once this is done,
2:49
so this is the uh flow.
2:53
First we create uh we do a post request
2:57
to get the access token. So similarly
3:00
I'm getting the access token. I have a
3:01
script which stores the access token in
3:04
this variable. Next I'm creating a UU ID
3:10
so that that will be stored in this
3:12
variable.
3:14
So this is going to be my conversation
3:16
ID.
3:18
Next we have to uh create the
3:22
conversation. So now the conversation is
3:24
ready. The next thing is you have to
3:28
make use of list conversation entries
3:31
endpoint to find the estimated wait
3:34
time. So if you do a call to this
3:37
endpoint with your conversation ID,
3:42
this is the conversation entries.
3:46
Look for entry type as routing result in
3:50
the routing result. Uh entry type
3:56
check for the entry payload. In the
3:58
entry payload check for estimated weight
4:01
time under estimated weight time check
4:04
estimated weight time in seconds. So
4:06
here
4:08
is uh estimated weight time is requested
4:10
is true. Why it is true is in the
4:14
messaging channel we enabled show
4:18
estimated wait time. So if you have a
4:20
use case to find the estimated wait time
4:23
then you can make use of this list
4:27
conversation entries endpoint once the
4:29
conversation is created so that you will
4:31
be able to check the estimated wait
4:33
time.
4:37
Let me close the conversation.
4:40
Yeah,
4:45
please check the video description. In
4:47
the video description, I have shared my
4:48
blog post. From the blog post, you
4:50
should be able to get the steps whatever
4:54
we discussed in this video for your
4:56
reference.
5:04
I hope it was helpful.
5:14
Thank you for watching.
#Internet Software
