function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
GAURAV SETHGAURAV SETH 

Einstein Chat Bot - Getting error 'No Agent available' when Calling Apex class

Hi,
I configured Einstein Bot and getting all responses from it.
If I try to add a Apex call to fetch some data. Getting message 'No Agent available'
I already added the permission set to that Apex class. 
What else can be the reason ?

Thanks,
Gaurav Seth
VinayVinay (Salesforce Developers) 
Hi Gairav,

You might need to create 2 queues. The bot and agents should be in one queue (this will be used for the handoff from bot to agent. The other queue is only for agents and what your code should query for agent availability.

Hope above information was helpful.

Please mark as Best Answer so that it can help others in the future.

Thanks,
Vinay Kumar
GAURAV SETHGAURAV SETH
Hi Vinay,
I am not looking for any agent help.
I added a apex call in Action . I have 2 queues already and added them as Channel in Overview configuration of Einstein Bot.

My Einstein bot respond all activities. But when there is action for Apex call, I am getting message "No agents are available.".

What can be the reason for this ?

Thanks,
Gaurav Seth
Serhii SkorometsSerhii Skoromets
Hello
If question is still relevant:
I just had the same issue. The thing is that I forgot to add my Apex Class to sfdc.chatbot.service.permset at Permission Sets.
Hope it'll help someone.