• gs dsd
  • NEWBIE
  • 0 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 4
    Replies
How to have diminishing weight for a variable of a health score. The Score itself should be between 1-100%.

It is a health score so the three variables are Average NPS Score, Average CSAT, and Average Product Activity.

Product activity: (Log-ins in last 30 days/number of users)/10 It is expected that the highest average expectation (100% score) would be at 10 log-ins/user in 30 days. 

But with this math, if the logins are 100,000 logins/10 users = 10,000/10=1000%

If it is 1000% then this variable becomes highly overweight, for the derivative formula (health score), meaning:

1. It would make the health score more than 100%
2. If I cap my health score at 100%, it would still not really work because the average CSAT and NPS might be extremely low, say 10% each... This is a very unhealthy account, even if they have a 1000% activity score.

How would I make this activity variable dynamically weighted for the derivative formula?
Background

I have a public community page hosted on a custom domain with an SSL certificate.

I've checked the SSL certificate with SSL Checker, and everything is set up correctly.

It works for all the different browsers on Windows (10, 8.1, 8, 7, XP)
  • Chrome
  • Firefox
  • Edge
  • IE 11
But it just will not load on Safari on Windows (any version)

I get this error:

Safari can't open the page because Safari can't establish a secure connection

It does work on Safari on Mac OS:
  • Mojave
  • High Sierra
  • Sierra
But does not work with Safari on MacOS:
  • El Captain
  • Yosemite
  • Mavericks
  • Mountain Lion
  • Lion
  • Snow Leopard
Questions

What is causing this can't establish a secure connection message?
  1. What is causing the error to appear?
  2. How can I fix it?
------------------------------------------

This question was re-posted from Salesforce Stack Exchange:

https://salesforce.stackexchange.com/questions/236085/communities-safari-cant-open-the-page-because-safari-cant-establish-a-secure
I've looked and looked as it seems like a syntax error, but can't find one. I have a 1 VF page and 2 classes. See below:



*** VISUALFORCE PAGE ***


<apex:page controller="HIC_SignPageController" showHeader="false"> <style type="text/css"> .message infoM3{ width : 30%; } div { margin-top:1em; margin-bottom:1em; } input { padding: .5em; margin: .5em; } select { padding: .5em; margin: .5em; } #signatureparent { color:darkblue; background-color:darkgrey; /*max-width:600px;*/ padding:20px; } /*This is the div within which the signature canvas is fitted*/ #signature { border: 2px dotted black; background-color:lightgrey; } /* Drawing the 'gripper' for touch-enabled devices */ html.touch #content { float:left; width:92%; } html.touch #scrollgrabber { float:right; width:4%; margin-right:2%; background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAFCAAAAACh79lDAAAAAXNSR0IArs4c6QAAABJJREFUCB1jmMmQxjCT4T/DfwAPLgOXlrt3IwAAAABJRU5ErkJggg==) } html.borderradius #scrollgrabber { border-radius: 1em; } </style> <apex:form > <apex:pageBlockSection columns="2"><apex:pageBlock title="Customer Information"> <apex:outputField value="{!leadObj.name}"/> <apex:outputField value="{!leadObj.email}"/> <apex:outputField value="{!leadObj.phone}"/> <apex:outputField value="{!leadObj.Move_Date__c}"/> </apex:pageBlock></apex:pageBlockSection> <apex:pageBlockSection columns="2"><apex:pageBlock title="Pick-Up Address"> <apex:outputField value="{!leadObj.Pickup_Address__c}"/> <apex:outputField value="{!leadObj.Pickup_Unit_No__c}"/> <apex:outputField value="{!leadObj.Pickup_City__c}"/> <apex:outputField value="{!leadObj.Pickup_State__c}"/> <apex:outputField value="{!leadObj.Pickup_Zipcode__c}"/> <apex:outputField value="{!leadObj.Pickup_Notes__c}"/> </apex:pageBlock></apex:pageBlockSection> <apex:pageBlockSection columns="2"><apex:pageBlock title="Delivery Address"> <apex:outputField value="{!leadObj.Delivery_Address__c}"/> <apex:outputField value="{!leadObj.Delivery_Unit_No__c}"/> <apex:outputField value="{!leadObj.Delivery_City__c}"/> <apex:outputField value="{!leadObj.Delivery_State__c}"/> <apex:outputField value="{!leadObj.Delivery_Zipcode__c}"/> </apex:pageBlock></apex:pageBlockSection> <apex:pageBlockSection columns="2"><apex:pageBlock title="Inventory"> <apex:outputField value="{!leadObj.Appliances_Dishwasher__c}"/> <apex:outputField value="{!leadObj.Appliances_Dryer__c}"/> <apex:outputField value="{!leadObj.Appliances_Freezer__c}"/> <apex:outputField value="{!leadObj.Appliances_Microwave__c}"/> <apex:outputField value="{!leadObj.Appliances_Dishwasher__c}"/> <apex:outputField value="{!leadObj.Appliances_Range_Stove__c}"/> <apex:outputField value="{!leadObj.Appliances_Refrigerator__c}"/> <apex:outputField value="{!leadObj.Appliances_Toaster_Oven__c}"/> <apex:outputField value="{!leadObj.Appliances_Washer__c}"/> <apex:outputField value="{!leadObj.Bedroom_Armoire__c}"/> <apex:outputField value="{!leadObj.Bedroom_Bunk_Bed__c}"/> <apex:outputField value="{!leadObj.Bedroom_Changing_Table__c}"/> <apex:outputField value="{!leadObj.Bedroom_Chest_of_Drawers__c}"/> <apex:outputField value="{!leadObj.Bedroom_Crib__c}"/> <apex:outputField value="{!leadObj.Bedroom_Dresser_Long__c}"/> <apex:outputField value="{!leadObj.Bedroom_Dresser_Tall__c}"/> <apex:outputField value="{!leadObj.Bedroom_Full_Bed__c}"/> <apex:outputField value="{!leadObj.Bedroom_King_Bed__c}"/> <apex:outputField value="{!leadObj.Bedroom_Night_Stand__c}"/> <apex:outputField value="{!leadObj.Bedroom_Queen_Bed__c}"/> <apex:outputField value="{!leadObj.Bedroom_Rocker_Glider_Chair__c}"/> <apex:outputField value="{!leadObj.Bedroom_Twin_Bed__c}"/> <apex:outputField value="{!leadObj.Boxes_Book_Box__c}"/> <apex:outputField value="{!leadObj.Boxes_Dishpack_Box__c}"/> <apex:outputField value="{!leadObj.Boxes_Large_Box__c}"/> <apex:outputField value="{!leadObj.Boxes_Large_Frame_Mirror_Box__c}"/> <apex:outputField value="{!leadObj.Boxes_Mattress_Box__c}"/> <apex:outputField value="{!leadObj.Boxes_Medium_Box__c}"/> <apex:outputField value="{!leadObj.Boxes_TV_Box__c}"/> <apex:outputField value="{!leadObj.Boxes_Wardrobe_Box__c}"/> <apex:outputField value="{!leadObj.Dining_Buffet__c}"/> <apex:outputField value="{!leadObj.Dining_China_Cabinet__c}"/> <apex:outputField value="{!leadObj.Dining_Corner_Cabinet__c}"/> <apex:outputField value="{!leadObj.Dining_Dining_Chairs__c}"/> <apex:outputField value="{!leadObj.Dining_Dining_Table__c}"/> <apex:outputField value="{!leadObj.Kitchen_Bakers_Rack__c}"/> <apex:outputField value="{!leadObj.Kitchen_Bar_High_Chair__c}"/> <apex:outputField value="{!leadObj.Kitchen_Bar_High_Table__c}"/> <apex:outputField value="{!leadObj.Kitchen_Butcher_Block_Table__c}"/> <apex:outputField value="{!leadObj.Kitchen_Dishwasher__c}"/> <apex:outputField value="{!leadObj.Kitchen_Freezer__c}"/> <apex:outputField value="{!leadObj.Kitchen_Kitchen_Cabinet__c}"/> <apex:outputField value="{!leadObj.Kitchen_Kitchen_Cart__c}"/> <apex:outputField value="{!leadObj.Kitchen_Kitchen_Chairs__c}"/> <apex:outputField value="{!leadObj.Kitchen_Kitchen_Table__c}"/> <apex:outputField value="{!leadObj.Kitchen_Microwave__c}"/> <apex:outputField value="{!leadObj.Kitchen_Range_Stove__c}"/> <apex:outputField value="{!leadObj.Kitchen_Refrigerator__c}"/> <apex:outputField value="{!leadObj.Living_Arm_Chair__c}"/> <apex:outputField value="{!leadObj.Living_Coffee_Table__c}"/> <apex:outputField value="{!leadObj.Living_End_Table__c}"/> <apex:outputField value="{!leadObj.Living_Large_Entertainment_Center__c}"/> <apex:outputField value="{!leadObj.Living_Lazy_Boy_Recliner__c}"/> <apex:outputField value="{!leadObj.Living_Love_Seat__c}"/> <apex:outputField value="{!leadObj.Sofa__c}"/> <apex:outputField value="{!leadObj.Living_Sofa_Bed__c}"/> <apex:outputField value="{!leadObj.Sofa_Sectional__c}"/> <apex:outputField value="{!leadObj.Living_TV__c}"/> <apex:outputField value="{!leadObj.Living_TV_Stand__c}"/> <apex:outputField value="{!leadObj.Misc_Auto_Equipment__c}"/> <apex:outputField value="{!leadObj.Misc_Bicycle__c}"/> <apex:outputField value="{!leadObj.Misc_Children_s_Equipment__c}"/> <apex:outputField value="{!leadObj.Misc_Children_s_toy_car__c}"/> <apex:outputField value="{!leadObj.Misc_Containers__c}"/> <apex:outputField value="{!leadObj.Misc_Exercise_Equipment__c}"/> <apex:outputField value="{!leadObj.Misc_Garden_Tools__c}"/> <apex:outputField value="{!leadObj.Misc_Golf_Equipment__c}"/> <apex:outputField value="{!leadObj.Misc_high_chairs_car_seats_etc__c}"/> <apex:outputField value="{!leadObj.Misc_Ladder__c}"/> <apex:outputField value="{!leadObj.Misc_Lawn_Mower__c}"/> <apex:outputField value="{!leadObj.Misc_Pet_Items_crates_and_beds__c}"/> <apex:outputField value="{!leadObj.Misc_Snow_Blower__c}"/> <apex:outputField value="{!leadObj.Misc_Sports_Equipment__c}"/> <apex:outputField value="{!leadObj.Misc_Tool_Box__c}"/> <apex:outputField value="{!leadObj.Office_Bookcase__c}"/> <apex:outputField value="{!leadObj.Office_Cabinet__c}"/> <apex:outputField value="{!leadObj.Office_Computer__c}"/> <apex:outputField value="{!leadObj.Office_Copier__c}"/> <apex:outputField value="{!leadObj.Office_Credenza__c}"/> <apex:outputField value="{!leadObj.Office_File_Cabinet__c}"/> <apex:outputField value="{!leadObj.Office_Office_Chair__c}"/> <apex:outputField value="{!leadObj.Office_Office_Desk__c}"/> <apex:outputField value="{!leadObj.Office_Printer__c}"/> <apex:outputField value="{!leadObj.Office_Secretary_Desk__c}"/> <apex:outputField value="{!leadObj.Office_Shelving_Unit__c}"/> <apex:outputField value="{!leadObj.Office_Side_Chair__c}"/> <apex:outputField value="{!leadObj.PatioOutdoor_Cooler__c}"/> <apex:outputField value="{!leadObj.PatioOutdoor_Outdoor_Grill__c}"/> <apex:outputField value="{!leadObj.PatioOutdoor_Patio_Bench__c}"/> <apex:outputField value="{!leadObj.PatioOutdoor_Patio_Chaise__c}"/> <apex:outputField value="{!leadObj.PatioOutdoor_Patio_Coffee_Table__c}"/> <apex:outputField value="{!leadObj.PatioOutdoor_Patio_Dining_Chair__c}"/> <apex:outputField value="{!leadObj.PatioOutdoor_Patio_Dining_Table__c}"/> <apex:outputField value="{!leadObj.PatioOutdoor_Patio_Love_Seat__c}"/> <apex:outputField value="{!leadObj.PatioOutdoor_Patio_side_table__c}"/> <apex:outputField value="{!leadObj.PatioOutdoor_Patio_Sofa__c}"/> <apex:outputField value="{!leadObj.PatioOutdoor_Patio_Umbrella__c}"/> <apex:outputField value="{!leadObj.PatioOutdoor_Patio_Upholstered_Chair__c}"/> </apex:pageBlock></apex:pageBlockSection> <apex:pageBlockSection columns="2"><apex:pageBlock title="Pre-Move Summary"> <apex:outputField value="{!leadObj.Men__c}"/> <apex:outputField value="{!leadObj.Truck__c}"/> <apex:outputField value="{!leadObj.Move_Type__c}"/> <apex:outputField value="{!leadObj.Move_Size__c}"/> <apex:outputField value="{!leadObj.calc_Cubic_Ft__c}"/> <apex:outputField value="{!leadObj.calc_Total_Weight__c}"/> </apex:pageBlock></apex:pageBlockSection> <apex:pageBlockSection columns="2"><apex:pageBlock title="Cost Summary"> <apex:outputField value="{!leadObj.Flat_Rate__c}"/> <apex:outputField value="{!leadObj.Travel_Charge__c}"/> <apex:outputField value="{!leadObj.Minimum_Charge__c}"/> <apex:outputField value="{!leadObj.Hourly_Rate__c}"/> </apex:pageBlock></apex:pageBlockSection> <apex:pageBlockSection columns="1"><apex:pageBlock title="Total Estimated Charges"> <apex:outputField value="{!leadObj.Total_Estimated_Charges__c}"/> </apex:pageBlock></apex:pageBlockSection> <apex:outputPanel id="panelId"/> <apex:actionFunction action="{!paramMethod}" name="captureLead" reRender="msg"> <apex:param value="" name="data" assignTo="{!data}"/> </apex:actionFunction> <apex:includeScript value="/resource/1495101312000/modernizr" /> <body> <div> <div id="content"> <div id="signatureparent"> <div></div> <div id="signature"></div></div> <div id="tools"></div> </div> <div id="scrollgrabber"></div> </div> <apex:includeScript value="/resource/1495102943000/jquery" /> <script> (function($) { var topics = {}; $.publish = function(topic, args) { if (topics[topic]) { var currentTopic = topics[topic], args = args || {}; for (var i = 0, j = currentTopic.length; i < j; i++) { currentTopic[i].call($, args); } } }; $.subscribe = function(topic, callback) { if (!topics[topic]) { topics[topic] = []; } topics[topic].push(callback); return { "topic": topic, "callback": callback }; }; $.unsubscribe = function(handle) { var topic = handle.topic; if (topics[topic]) { var currentTopic = topics[topic]; for (var i = 0, j = currentTopic.length; i < j; i++) { if (currentTopic[i] === handle.callback) { currentTopic.splice(i, 1); } } } }; })(jQuery); </script> <apex:includeScript value="/resource/1495101377000/jSignature" /> <apex:includeScript value="/resource/1495102059000/jSignatureCompressorBase30" /> <apex:includeScript value="/resource/1495101503000/jSignatureCompressorSVG" /> <apex:includeScript value="/resource/1495101534000/jSignatureUndoButton" /> <apex:includeScript value="/resource/1495102163000/jSignatureSignHerejs" /> <script> $ = jQuery.noConflict() ; $(document).ready(function() { // This is the part where jSignature is initialized. var $sigdiv = $("#signature").jSignature({'UndoButton':true}) // All the code below is just code driving the demo. , $tools = $('#tools') , $extraarea = $('#displayarea') , pubsubprefix = 'jSignature.demo.' var export_plugins = $sigdiv.jSignature('listPlugins','export'); $('<input type="button" value="Reset">').bind('click', function(e){ $sigdiv.jSignature('reset') }).appendTo($tools) $('<input type="button" value="Capture">').bind('click', function(e){ e.target.value = 'default'; if (e.target.value !== ''){ var data = $sigdiv.jSignature('getData', e.target.value) console.log(data); captureLead(data); e.target.value = 'Capture'; } }).appendTo($tools) if (Modernizr.touch){ $('#scrollgrabber').height($('#content').height()) } }) </script> </body> <apex:pageMessages id="msg" /> </apex:form> </apex:page>



*** CONTROLLER / CLASS ***

public class HIC_SignPageController{
    public string data{get;set;}
    public lead leadObj {get;set;}
    
    public HIC_SignPageController(){
        String leadId = Apexpages.currentPage().getParameters().get('Id');
        leadObj =[select sign__c,name,phone,email,Move_Date__c,Pickup_Address__c,Pickup_Unit_No__c,Pickup_City__c,Pickup_State__c,Pickup_Zipcode__c,Pickup_Notes__c,Delivery_Address__c,Delivery_Unit_No__c,Delivery_City__c,Delivery_State__c,Delivery_Zipcode__c,Appliances_Dishwasher__c,Appliances_Dryer__c,Appliances_Freezer__c,Appliances_Microwave__c,Appliances_Range_Stove__c,Appliances_Refrigerator__c,Appliances_Toaster_Oven__c,Appliances_Washer__c,Bedroom_Armoire__c,Bedroom_Bunk_Bed__c,Bedroom_Changing_Table__c,Bedroom_Chest_of_Drawers__c,Bedroom_Crib__c,Bedroom_Dresser_Long__c,Bedroom_Dresser_Tall__c,Bedroom_Full_Bed__c,Bedroom_King_Bed__c,Bedroom_Night_Stand__c,Bedroom_Queen_Bed__c,Bedroom_Rocker_Glider_Chair__c,Bedroom_Twin_Bed__c,Boxes_Book_Box__c,Boxes_Dishpack_Box__c,Boxes_Large_Box__c,Boxes_Large_Frame_Mirror_Box__c,Boxes_Mattress_Box__c,Boxes_Medium_Box__c,Boxes_TV_Box__c,Boxes_Wardrobe_Box__c,Dining_Buffet__c,Dining_China_Cabinet__c,Dining_Corner_Cabinet__c,Dining_Dining_Chairs__c,Dining_Dining_Table__c,Kitchen_Bakers_Rack__c,Kitchen_Bar_High_Chair__c,Kitchen_Bar_High_Table__c,Kitchen_Butcher_Block_Table__c,Kitchen_Dishwasher__c,Kitchen_Freezer__c,Kitchen_Kitchen_Cabinet__c,Kitchen_Kitchen_Cart__c,Kitchen_Kitchen_Chairs__c,Kitchen_Kitchen_Table__c,Kitchen_Microwave__c,Kitchen_Range_Stove__c,Kitchen_Refrigerator__c,Living_Arm_Chair__c,Living_Coffee_Table__c,Living_End_Table__c,Living_Large_Entertainment_Center__c,Living_Lazy_Boy_Recliner__c,Living_Love_Seat__c,Sofa__c,Living_Sofa_Bed__c,Sofa_Sectional__c,Living_TV__c,Living_TV_Stand__c,Misc_Auto_Equipment__c,Misc_Bicycle__c,Misc_Children_s_Equipment__c,Misc_Children_s_toy_car__c,Misc_Containers__c,Misc_Exercise_Equipment__c,Misc_Garden_Tools__c,Misc_Golf_Equipment__c,Misc_high_chairs_car_seats_etc__c,Misc_Ladder__c,Misc_Lawn_Mower__c,Misc_Pet_Items_crates_and_beds__c,Misc_Snow_Blower__c,Misc_Sports_Equipment__c,Misc_Tool_Box__c,Office_Bookcase__c,Office_Cabinet__c,Office_Computer__c,Office_Copier__c,Office_Credenza__c,Office_File_Cabinet__c,Office_Office_Chair__c,Office_Office_Desk__c,Office_Printer__c,Office_Secretary_Desk__c,Office_Shelving_Unit__c,Office_Side_Chair__c,PatioOutdoor_Cooler__c,PatioOutdoor_Outdoor_Grill__c,PatioOutdoor_Patio_Bench__c,PatioOutdoor_Patio_Chaise__c,PatioOutdoor_Patio_Coffee_Table__c,PatioOutdoor_Patio_Dining_Chair__c,PatioOutdoor_Patio_Dining_Table__c,PatioOutdoor_Patio_Love_Seat__c,PatioOutdoor_Patio_side_table__c,PatioOutdoor_Patio_Sofa__c,PatioOutdoor_Patio_Umbrella__c,PatioOutdoor_Patio_Upholstered_Chair__c,Men__c,Truck__c,Move_Type__c,Move_Size__c,calc_Cubic_Ft__c,calc_Total_Weight__c,Flat_Rate__c,Travel_Charge__c,Minimum_Charge__c,Hourly_Rate__c,Total_Estimated_Charges__c from lead where id =: leadId];
    }
    
    public void paramMethod(){
        leadObj.sign__c= '<img src="'+data+'"/>';
        system.debug('-------Data*****' +Data);
        try{ 
            update leadObj;
            ApexPages.addmessage(new ApexPages.message(ApexPages.severity.INFO,'Thank you for confirming your moving quote. We look forward to serving you. You may close this window.'));
        }catch(Exception e){
        }
         
    }


}




*** CONTROLLER / CLASS ***


@isTest( seeAllData = true )
public class HIC_SignPageControllerTest{

    static testmethod void Testing(){
    
    
        
        Lead tempLead = [ SELECT id FROM Lead LIMIT 1].get( 0 ) ; 
        string leadId = tempLead.id ;
        pagereference Call = new pagereference( '/apex/HIC_SignPage?id='+leadId );
        test.setcurrentpage( Call ) ;
        HIC_SignPageController abc = new HIC_SignPageController() ;
        abc.paramMethod() ;
        //ApexPages.currentPage().getParameters().put('Id',objLeadCenter.id);

        //String leadId = Apexpages.currentPage().getParameters().get('Id');
        
        //signPage.
    
    }


}