Skip to main content

#Chatbot1 discussing

Integrate Any Custom Bot To Service Cloud 

In the Agentic Era of Customer Service, many service leaders want to leverage the same custom bot solution on their customer-facing digital channels (App, Web, Social etc.) as well as across all their Digital Engagement Enhanced channels for an Unified Platform Experience.  BYOB (Bring Your Own Bot) would enable customers to integrate their custom bots with Salesforce Service Cloud. This feature will pilot in Summer'25

.  

If you are a Developer, Partner, Architect or a Customer interested in learning more about BYOB feature then we have an engaging product deep-dive session lined up on this topic.

@Sameer Sunil Deshpande @Shankar Sharma

& I would be speaking at TDX in Bangalore on 3rd May, 2025, as we take you through the technical details of BYOB feature and provide an overview of what to expect from the pilot.    

 

Stay tuned to this space for regular BYOB updates & access to more learning resources. Meanwhile,

See you at TDX!!

  

 

Integrate Any Custom Bot To Service Cloud In the Agentic Era of Customer Service, many service leaders want to leverage the same custom bot solution on their customer-facing digital channels (App, Web

 

 

.

 

#Service Cloud  #Chatbot  #BYOB  #Trailhead Challenges

1 comment
0/9000

Hola a Todos?,

 

Tengo un chatbot Mejorado integrado con un canal de mensajería de WhatsApp. Necesito hacer que el bot pueda pedirle al usuario de mensajería que seleccione una opción y, con esta selección, transfiera al usuario a un agente de la cola elegida en dicha selección. ¿Podrían ayudarme con alguna idea para hacerlo? ?

 

#Einstein Bots  #Chatbot  #Services Cloud Omni-Channel

0/9000

Hi, 

 

we'd like to have some messages for the visitor when he's waiting for more than

2 minutes, because the agent had to leave for 10 minutes, but his status is still "available".

I know there is a timeout functionality, but works only for the idle visitor. I can't find anything

resembling this for an agent being idle. Can we tackle this with a chatbot or some custom action?

Or can we automatically change the agent's status to "On break" with a message for the visitor?

 

#Chatbot  #Live Agent Web Chat

0/9000

How can I auto start chat in preChat(LWC) when the page loaded and the condition is true.  

 I tried to do the code below

import BasePrechat from 'lightningsnapin/basePrechat';

import { api, track } from 'lwc';

import startChatLabel from '@salesforce/label/c.StartChat';

export default class Prechat extends BasePrechat {

@api prechatFields;

@api backgroundImgURL;

@track fields;

@track namelist;#Chatbot

startChatLabel;

test = 'test';

// test = '';

connectedCallback() {

this.startChatLabel = startChatLabel;

this.fields = this.prechatFields.map(field => {

const { label, name, value, required, maxLength } = field;

return { label, value, name, required, maxLength };

});

this.namelist = this.fields.map(field => field.name);

if (this.test != '') {

this.handleStartChat();

}

}

renderedCallback() {

this.template.querySelector("lightning-input").focus();

}

handleStartChat() {

this.template.querySelectorAll("lightning-input").forEach(input => {

this.fields[this.namelist.indexOf(input.name)].value = input.value;

});

if (this.validateFields(this.fields).valid) {

this.startChat(this.fields);

} else {

// Error handling if fields do not pass validation.

}

}

}

 But the error below occurs

How can I auto start chat in preChat(LWC) when the page loaded and the condition is true

 

How can I solve this problem?  Thank you! 

 

#Salesforce Developer

2 answers
0/9000

Salesforce App to integrate #Chatgpt API with #Sales Cloud and #Service Cloud

 

Excited to share my project on integrating Salesforce.com with ChatGPT API.

 

On service cloud (gif animation)

Salesforce App to integrate API with and Excited to share my project on integrating Salesforce.com with ChatGPT API.As a app on sales cloud (gif animation)

ChatNXT.com Integration with Salesforce.com.gif

With just a few simple steps, you can now easily add chatbot functionality to your Salesforce instance. By leveraging the power of ChatGPT OpenAI API, you can provide personalized, conversational experiences to your salesforce.com users. 

 

You only need to create a Lightening Component, Apex Class to call OpenAPI ChatGPT API, Javascript controller and then call it as an app from anywhere. I used ChatGPT too to generate some of the code :)  

Sourcecode are available at https://www.chatnxt.com/integrate-chatgpt-with-salesforce-com

 

There are number of ways by which we can use this and I am still exploring the possibilities e.g. 

1. Capturing the sentiments of the customer data etc. 

2. Correcting the outgoing email by making them more professional or sentiment check

3. Identifying important action from an email with large incoming text 

 

Looking forward to your comments, suggestion, to learn more about this integration and see how you can replicate it for your own use case. 

 

Please note I am looking for remote #Jobs or freelancer projects as a Salesforce.com Adminstrator or Developer, let me know if you have any leads.

 

Please check out my trailhead profile for more details : -

 

#Chatbot #Trailhead Challenges #Job Opportunity #Job Postings #IdeaExchange #Einstein Bots 

3 comments
  1. Mar 16, 2023, 9:36 AM

    Thanks!

     

    I tried and I have the component on the Utility Bar, but the chatbot is not working.

     

    I had to change the LWC code because I received the error "ParseError at [row,col]:[2,1] Message: Content is not allowed in prolog.: Source"

     

    This is how the new code looks like:

     

    <!-- Salesforce Lightning Component -->

     

    <!-- MyChatBot -->

     

    <aura:component controller="MyChatBotApex" implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" >

     

        <aura:attribute name="chatList" type="List" default="[]"/>

     

        <aura:attribute name="userChat" type="String"/>

     

        <div class="chat-container">

     

            <ul>

     

                <aura:iteration items="{!v.chatList}" var="chat">

     

                    <li>{!chat.userName} {!chat.chatText}</li>

     

                </aura:iteration>

     

            </ul>

     

            <div class="input-container">

     

                <input type="text" placeholder="Type your message here" value="{!v.userChat}" onchange="{!c.updateUserChat}"/>

     

                <button class="slds-button slds-button_brand" onclick="{!c.postUserChat}">Send</button>

     

                <!-- by chatnxt.com -->

     

            </div>

     

        </div>

     

    </aura:component> "

     

     

    Any idea?

0/9000

I have my bot created and ready. But it answers every chat that comes in, regardless if there is an agent in queue or not. There is the option that has it engage on chats when an gent is logged in. But it doesn't have the opposite, to deploy the chat only when no agent is logged in. Is this something that can be done? This was the whole point to have the chatbot for overnights. bot will troubleshoot a little with user, collect information and we can come in the morning to check the case that was opened.

Any help would be great! Thank you. #Chatbot

2 answers
  1. Feb 23, 2023, 6:14 PM

    Thank you Khyati. I did have the offline form already set up, but your video is very good at explaining it. 

    So, you think the chatbot cannot be scheduled to only work when the queue has no agents logged in? I only want it to answer when no one is available, to assist with some troubleshooting and create a case that we can follow up with after. 

    Thank you. 

0/9000

Hi,

We have a functionality where we are developing our bot and placing it in a website. we dont want to include a prechat form in there. But we need to take the data of the logged in user. How can we accomplish it? Currently i am using the prechat code in embedded settings but it is not working if i am disabling the prechat.

 

embedded_svc.settings.prepopulatedPrechatFields = {     MobilePhone: “1234567890”,     Primary_Email__c: “abc@test.com”  };  embedded_svc.settings.extraPrechatFormDetails = [{   "label":"Mobile",     "transcriptFields": ["Mobile__c"]  },{   "label":"Primary Email",    "transcriptFields": ["Primary_Email__c"]  }];

 

Thanks

 

#Chatbot  #Einstein Bot  #Einstein Bots  #BOT  #Einstein  #Einstein Analytics  #Salesforce Einstein & AI  #Apex  #Service Cloud  #Integration

4 answers
  1. Jan 31, 2023, 3:03 PM

    Hi, @gautam arya

     

    **Mark this as Best if found this Useful for other Trailblazers reference**

     

    You can try this to get information of current user : 

    // First Get the current user ID

    var userId = sforce.connection.getUserInfo().userId;

    // You can Query the database to retrieve information about the current user

    var query = "SELECT Id, MobilePhone, Primary_Email__c FROM User WHERE Id = '" + userId + "'";

    var result = sforce.connection.query(query);

    var user = result.getArray("records")[0];

    // You can pass the information to the live chat window

    embedded_svc.settings.prepopulatedPrechatFields = {

    MobilePhone: user.MobilePhone,

    Primary_Email__c: user.Primary_Email__c

    };

    embedded_svc.settings.extraPrechatFormDetails = [{

    "label": "Mobile",

    "transcriptFields": ["Mobile__c"]

    },{

    "label": "Primary Email",

    "transcriptFields": ["Primary_Email__c"]

    }];

    Feel free to Ping me again.

0/9000

I have a requirement where the user need to select more than one menu option currently i am displaying it dynamically. But i need it to be able to select more than one value. Please help.

Thanks in advance

 

#Einstein Bot  #Einstein Analytics  #Chatbot  #Service Cloud  #Analytics

2 answers
  1. Oct 3, 2022, 11:18 AM

    Hi @Michael Brown / @gautam arya

     

    Did you finally find a way for this?

    We tried overriding the chat with a LWC in the embebed service so we can place in the front all the options with the selectable checkbox. The point is that the component is not able to sent the message once the customer has selected the options...

     

    Any idea?

0/9000

Where in the code snippet below would I customize the initial chat help button? How would you write the code to change the initial chat help button's size (height & width), image, and/or

 

#Chatbot font?  Thanks for the help on this matter.

 

<style type='text/css'>  .embeddedServiceHelpButton .helpButton .uiButton {  background-color: #005290;  font-family: "Arial", sans-serif;  }  .embeddedServiceHelpButton .helpButton .uiButton:focus {  outline: 1px solid #005290;  } </style>  <script type='text/javascript' src='https://service.force.com/embeddedservice/5.0/esw.min.js'></script> <script type='text/javascript'>  var initESW = function(gslbBaseURL) {  embedded_svc.settings.displayHelpButton = true; //Or false  embedded_svc.settings.language = ''; //For example, enter 'en' or 'en-US'   //embedded_svc.settings.defaultMinimizedText = '...'; //(Defaults to Chat with an Expert)  //embedded_svc.settings.disabledMinimizedText = '...'; //(Defaults to Agent Offline)   //embedded_svc.settings.loadingText = ''; //(Defaults to Loading)  //embedded_svc.settings.storageDomain = 'yourdomain.com'; //(Sets the domain for your deployment so that visitors can navigate subdomains during a chat session)   // Settings for Chat  //embedded_svc.settings.directToButtonRouting = function(prechatFormData) {  // Dynamically changes the button ID based on what the visitor enters in the pre-chat form.  // Returns a valid button ID.  //};  //embedded_svc.settings.prepopulatedPrechatFields = {}; //Sets the auto-population of pre-chat form fields  //embedded_svc.settings.fallbackRouting = []; //An array of button IDs, user IDs, or userId_buttonId  //embedded_svc.settings.offlineSupportMinimizedText = '...'; //(Defaults to Contact Us)   embedded_svc.settings.enabledFeatures = ['LiveAgent'];  embedded_svc.settings.entryFeature = 'LiveAgent';   embedded_svc.init(  'https://cliftonsfurniture.my.salesforce.com',  'https://cliftonsfurniture.secure.force.com/liveAgentSetupFlow',  gslbBaseURL,  '00D5e000002Go57',  'Clifton_s_Chat_Team',  {  baseLiveAgentContentURL: 'https://c.la4-c1-ia4.salesforceliveagent.com/content',  deploymentId: '5725e000000tvz8',  buttonId: '5735e000000twqp',  baseLiveAgentURL: 'https://d.la4-c1-ia4.salesforceliveagent.com/chat',  eswLiveAgentDevName: 'Clifton_s_Chat_Team',  isOfflineSupportEnabled: true  }  );  };   if (!window.embedded_svc) {  var s = document.createElement('script');  s.setAttribute('src', 'https://cliftonsfurniture.my.salesforce.com/embeddedservice/5.0/esw.min.js');  s.onload = function() {  initESW(null);  };  document.body.appendChild(s);  } else {  initESW('https://service.force.com');  } </script>

4 answers
  1. Sep 11, 2021, 11:37 AM

    Hi Rob,

    did you try by changing the very first part of this snippet

    i.e this part - embeddedServiceHelpButton .helpButton .uiButton {  background-color: #005290;  font-family: "Arial", sans-serif;  }

0/9000

One recommendation for an Org Migration is to avoid hardcoded references. The thing is that I have a a snippet of the my chatbot code (embedded services) that has a hardcoded references. I also have a public site that has a hardcoded reference. For what I've found, Site for example can change its name from a hardcoded reference to a relative reference using MyDomain. The thing is that for that I need enhanced domains enabled and I think I don't have it. Is there another way to change all the hardcoded references to relative references using MyDomain or somethin similar?

 

#MyDomain #Hard-CodedReferences  #Chatbot

2 answers
  1. Michael Brown (SETGO Partners) Forum Ambassador
    Feb 23, 2022, 2:59 PM

    Another potential option if a formula can't work is to use a custom setting. You can create a custom setting with a text field and then store the domain of your org in that custom setting. There is still hardcoding in a sense, in that you need to grab the domain and populate it in the custom setting, but in the underlying code you can reference the custom setting once, without having to update it in each org. Instead, you just update the values stored in your custom setting.

0/9000