Skip to content

Instantly share code, notes, and snippets.

@RockyMtnMarc
RockyMtnMarc / Transfer_To_Agent.csv
Last active August 5, 2019 21:10
Transfer To Agent utterance dataset for Einstein Bots
MlDomainName MlIntentName Utterance
My_First_Intent_Set Transfer_To_Agent A human could do a better job here
My_First_Intent_Set Transfer_To_Agent a real person to chat with
My_First_Intent_Set Transfer_To_Agent Agent
My_First_Intent_Set Transfer_To_Agent Agent damn it
My_First_Intent_Set Transfer_To_Agent Agent now please!
My_First_Intent_Set Transfer_To_Agent Agent please!
My_First_Intent_Set Transfer_To_Agent Agent quick!
My_First_Intent_Set Transfer_To_Agent Are you a bot? I'd like a human
My_First_Intent_Set Transfer_To_Agent Ask agent
@RockyMtnMarc
RockyMtnMarc / Appointment_Related.csv
Last active August 5, 2019 22:53
Appointment utterance dataset for Einstein Bots
@RockyMtnMarc
RockyMtnMarc / SurveyRedirectController.apxc
Created August 17, 2019 04:17
Apex Class which retrieves the Survey_URL__c field from the LiveChatTranscript with the specified ChatKey
public class SurveyRedirectController {
public PageReference redirectToSurvey() {
String url = [SELECT Id, Survey_URL__c, ChatKey FROM LiveChatTranscript WHERE ChatKey = : ApexPages.currentPage().getParameters().get('chatKey')].Survey_URL__c;
PageReference surveyURL = new PageReference(url);
return surveyURL;
}
}
@RockyMtnMarc
RockyMtnMarc / SurveyRedirectPage.vfp
Created August 17, 2019 04:22
Visualforce Page which redirects the user to the Survey URL.
<apex:page controller="SurveyRedirectController" action="{!redirectToSurvey}" >
</apex:page>
@RockyMtnMarc
RockyMtnMarc / themeLayoutNoHeader.cmp
Created August 17, 2019 04:56
Custom Community Theme Layout for post-chat surveys with no header
<aura:component implements="forceCommunity:themeLayout" access="global" description="Custom Community Theme Layout for post-chat surveys with no header">
<div>
<div class="mainContentArea">
{!v.body}
</div>
</div>
</aura:component>
@RockyMtnMarc
RockyMtnMarc / themeLayoutNoHeader.css
Created August 17, 2019 04:59
Custom Community Theme Layout style sheet for post-chat surveys with no header
.THIS {
position: relative;
z-index: 1;
}
.THIS .surveyRuntimeSurvey.surveyScreen {
min-width: 0;
margin: -13px;
width: calc(100% + 25px) !important;
padding-bottom: 50px !important;
@RockyMtnMarc
RockyMtnMarc / SurveyInvitationURLFormula
Last active September 21, 2019 17:25
Salesforce Process Builder Formula for generating a Survey Invitation URL
'https://YOUR_DOMAIN_HERE.force.com/survey/runtimeApp.app?invitationId='+
[SurveyInvitation].Id+
'&surveyName=YOUR_SURVEY_API_NAME_HERE&UUID='
+[SurveyInvitation].UUID
@RockyMtnMarc
RockyMtnMarc / EinsteinBotsUtility2
Created September 26, 2019 00:25
Visualforce code example for an Lightning Console Einstein Bots Utility
<apex:page >
<!--BEGIN Chat Button Code Snippet-->
<a id="liveagent_button_online_5733i000000gfJr" href="javascript://Chat" style="display: none;" onclick="liveagent.startChat('5733i000000gfJr')"><!-- Online Chat Content --></a><div id="liveagent_button_offline_5733i000000gfJr" style="display: none;"><!-- Offline Chat Content --></div><script type="text/javascript">
if (!window._laq) { window._laq = []; }
window._laq.push(function(){liveagent.showWhenOnline('5733i000000gfJr', document.getElementById('liveagent_button_online_5733i000000gfJr'));
liveagent.showWhenOffline('5733i000000gfJr', document.getElementById('liveagent_button_offline_5733i000000gfJr'));
});</script>
@RockyMtnMarc
RockyMtnMarc / EinsteinBotsUtility1
Last active September 26, 2019 00:56
Visualforce code example for an Lightning Console Einstein Bots Utility
<apex:page>
<!--BEGIN Chat Button Code Snippet-->
<a id="liveagent_button_online_5733i000000gfJr" href="javascript://Chat" style="display: none;" onclick="liveagent.startChat('5733i000000gfJr')"><!-- Online Chat Content --></a><div id="liveagent_button_offline_5733i000000gfJr" style="display: none;"><!-- Offline Chat Content --></div><script type="text/javascript">
if (!window._laq) { window._laq = []; }
window._laq.push(function(){liveagent.showWhenOnline('5733i000000gfJr', document.getElementById('liveagent_button_online_5733i000000gfJr'));
liveagent.showWhenOffline('5733i000000gfJr', document.getElementById('liveagent_button_offline_5733i000000gfJr'));
});</script>
@RockyMtnMarc
RockyMtnMarc / EinsteinBotsUtility3
Last active September 26, 2019 18:32
Visualforce code example for an Lightning Console Einstein Bots Utility
<apex:page >
<!--BEGIN Chat Button Code Snippet-->
<a id="liveagent_button_online_5733i000000gfJr" href="javascript://Chat" style="display: none;" onclick="liveagent.startChat('5733i000000gfJr')"><!-- Online Chat Content --></a><div id="liveagent_button_offline_5733i000000gfJr" style="display: none;"><!-- Offline Chat Content --></div><script type="text/javascript">
if (!window._laq) { window._laq = []; }
window._laq.push(function(){liveagent.showWhenOnline('5733i000000gfJr', document.getElementById('liveagent_button_online_5733i000000gfJr'));
liveagent.showWhenOffline('5733i000000gfJr', document.getElementById('liveagent_button_offline_5733i000000gfJr'));
});</script>