• Sathish Venkat
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 4
    Replies
Hello - Below is the screenshot of the two chat pages standard (on left) and the customized live chat(on right done via VF page). I am trying to recreate all the features available in the Standard chat window but with little bit of UI customizations.. When checked the following elements/components are missing in the customized version and there is no direct method available to use it.
  1. Time Stamp for each chat.
  2. PlaceHolder 'Write a message' available in the text box in the Standard but not in Customized.
  3. The text box in Standard chat is 'word wrapped'. BUT the customized version hides all the text and just shows what can be visible in that height and width. When inspected these elements Standard chat uses 'Text Area' whereas Custom chat uses 'Input' markups to get the chat text from consumer..
Can you please guide me how to fix the above 3 issues? Should I use Javascript for this?

User-added image
Hello - Below is the screenshot of the email publisher configured in the case feed layout. I would like to know how this 'Submit for Approval' button is configured in this layout. I tried quite a few options but cannot find where it is configured. Can someone help me on this.
Note - The default option is 'Send Email' button and the Salesforce help just says depending on how the sys admin configured the feed layout this name changes.

User-added image
Hello,

There is a LiveChat sample given in the developer guide and we reused the same set of code as a PreChat page. The code is as follows
 
<!-- This script takes the endpoint URL parameter passed from the deployment 
      page and makes it the action for the form -->
    <script type="text/javascript">
    (function() { 
        function handlePageLoad() {
            var endpointMatcher = new RegExp("[\\?\\&]endpoint=([^&#]*)");
            document.getElementById('prechatForm').setAttribute('action',
            decodeURIComponent(endpointMatcher.exec(document.location.search)[1]));
        }
        if (window.addEventListener) {
            window.addEventListener('load', handlePageLoad, false);
        } else {
            window.attachEvent('onload', handlePageLoad, false);
        }
    })(); 
    function setName() {
            document.getElementById("windowName").value =  
                document.getElementById("firstName").value;
                return true;
            }
    </script>

But the static code analyzer tool gives an error saying Possible Cross-site script (XSS) vulnerability when accessing location.search. How do I fix this issue? The endpoint parameter returned in the URL is already in encoded format and a sample value is
 ?endpoint=https%3A%2F%2F45r.la3-c2cs-chi.salesforceliveagent.com%2Fcontent%2Fs%2Fchat%3Flanguage%3Den_US%23deployment_id%3Dxxxx%26org_id%3Dyyyy%26button_id%3Dzzzz%26session_id%3Daaaaaaa

which is equivalent to 

?endpoint=https://45r.la3-c2cs-chi.salesforceliveagent.com/content/s/chat?language=en_US#deployment_id=xxxx&org_id=yyyy&button_id=zzzz&session_id=aaaaaaa

Can you please let me know how to fix this code?
Hello - In the Prevent XSS in Force.com APplications chapter I updated the following code and still the challenge is not complete. Can you please help what is wrong with the code here. Thanks.
 
<apex:page controller="XSS_Mitigations_Challenge" sidebar="false" tabStyle="XSS_Mitigations_Challenge__tab">
<apex:sectionHeader title="XSS Mitigations Challenge" />
<apex:form >
    <apex:pageBlock >
        <apex:pageMessages />      
        <apex:pageBlockSection title="Demo" columns="1" id="tableBlock">
            <c:codeLink type="Visualforce" namespace="" edit="true" name="XSS_Mitigations_Challenge" description="Edit this Visualforce page to perform the challenge."/>
            
            
            <apex:outputText value="{!sampleMergeField1}"/>


            <apex:outputText value="{!HTMLENCODE(sampleMergeField2)}" escape="false"/>


            <apex:outputText >
                {!sampleMergeField3}
            </apex:outputText>
       
       
            <script>
                document.write('{!JSENCODE(sampleMergeField4)}');
            </script>
             
            
            {!sampleMergeField5}
            
            
            <script>
                var x = '{!JSENCODE(sampleMergeField6)}';
            </script>
            
            
            <apex:outputLabel value="{!HTMLENCODE(sampleMergeField7)}" escape="false"/>
                     

        </apex:pageBlockSection>
        <apex:pageBlockSection title="Code links" columns="1">
            <apex:outputPanel >
                <ul>
                    <li><c:codeLink type="Visualforce" namespace="" name="XSS_Mitigations_Challenge" description="Visualforce Page"/></li>            
                    <li><c:codeLink type="Apex" namespace="" name="XSS_Mitigations_Challenge" description="Apex Controller"/></li>
                </ul>
            </apex:outputPanel>        
        </apex:pageBlockSection>        
    </apex:pageBlock>          
</apex:form>              
</apex:page>

 

We enabled Live Agent and created an SFDC deployment, generated the few lines of JavaScript and provide that to our web-developers to add to the companies Web page. The Chat window does not appear on the website after our developers copy the deployment code and paste it on the web page where we want to deploy Live Agent.
 
For now, we would like to use the standard Chat and don't want to customise the chat window with pre-chat, post chat windows, buttons etc. Do we need anything else over and above the deployment script to make standard Live Agent work from our website?

From SF documentation we understood that we only need to "Create a deployment to host Live Agent on your website. Each deployment includes a chat window, which visitors use to chat with support agents."

https://developer.salesforce.com/docs/atlas.en-us.live_agent_dev.meta/live_agent_dev/live_agent_creating_new_deployments.htm

Hi,

I am trying to validate the phone number on the contact according to multiple formats. I want users to be able to enter phone numbers that match one of three formats, one starting with "+" , another starting with "00" and finaly one starting with "(".

I can create all of the these as single validation rules, but when I try to combine two or more, I am struggling wiht the logic even if the syntax of the formula is correct.

Any suggestions?
Hello - In the Prevent XSS in Force.com APplications chapter I updated the following code and still the challenge is not complete. Can you please help what is wrong with the code here. Thanks.
 
<apex:page controller="XSS_Mitigations_Challenge" sidebar="false" tabStyle="XSS_Mitigations_Challenge__tab">
<apex:sectionHeader title="XSS Mitigations Challenge" />
<apex:form >
    <apex:pageBlock >
        <apex:pageMessages />      
        <apex:pageBlockSection title="Demo" columns="1" id="tableBlock">
            <c:codeLink type="Visualforce" namespace="" edit="true" name="XSS_Mitigations_Challenge" description="Edit this Visualforce page to perform the challenge."/>
            
            
            <apex:outputText value="{!sampleMergeField1}"/>


            <apex:outputText value="{!HTMLENCODE(sampleMergeField2)}" escape="false"/>


            <apex:outputText >
                {!sampleMergeField3}
            </apex:outputText>
       
       
            <script>
                document.write('{!JSENCODE(sampleMergeField4)}');
            </script>
             
            
            {!sampleMergeField5}
            
            
            <script>
                var x = '{!JSENCODE(sampleMergeField6)}';
            </script>
            
            
            <apex:outputLabel value="{!HTMLENCODE(sampleMergeField7)}" escape="false"/>
                     

        </apex:pageBlockSection>
        <apex:pageBlockSection title="Code links" columns="1">
            <apex:outputPanel >
                <ul>
                    <li><c:codeLink type="Visualforce" namespace="" name="XSS_Mitigations_Challenge" description="Visualforce Page"/></li>            
                    <li><c:codeLink type="Apex" namespace="" name="XSS_Mitigations_Challenge" description="Apex Controller"/></li>
                </ul>
            </apex:outputPanel>        
        </apex:pageBlockSection>        
    </apex:pageBlock>          
</apex:form>              
</apex:page>

 
Setting up a new implementation of Live Agent and tryin to understand if i need to use the pre-chat form or if I can get away with the deployment API as they both support the same key functions on findOrCreate.

The need it to have an authenticated customer on a website confirm if they want help with business process or technical support, this then displays the correct chat button. Also want the customer to have the ability to type in a case number should they have one. Once the click the chat button that appears (business or technical), if a case number was entered into the page this is used to search on, and if not found a new one is created, linked to chat transcript and shown in console.
We will also pass in the log in users email address as we have it so that can also be linked to the chat transcript.

Having tried this I don't know how to have the page show one chat button or another based on user input (radio button selection).

Or maybe this is just not possible and it has to be a two step process where once the relevant chat button is shown and clicked, we then have to ask the customer to enter an existing case number, and then ask them again to click on the "Chat Now" button... However hoping to avoid this two step process.

All suggestions & help greatly welcome.

Thanks
  • September 15, 2016
  • Like
  • 0