Built motion from commit 4d2cf597c.|1.0.26
[motion.git] / server / config / integrations / salesforce.js
index db6ebdd..961b7e1 100644 (file)
@@ -1 +1 @@
-var _0x962c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6A\x73\x66\x6F\x72\x63\x65","\x6D\x6F\x6D\x65\x6E\x74","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x55\x73\x65\x72","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x69\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x68\x61\x6E\x64\x6C\x65\x45\x76\x65\x6E\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x50\x61\x73\x73\x65\x64\x20\x70\x61\x72\x61\x6D\x65\x74\x65\x72\x73\x20\x61\x72\x65\x20\x6E\x6F\x74\x20\x65\x6E\x6F\x75\x67\x68\x20\x74\x6F\x20\x63\x72\x65\x61\x74\x65\x20\x61\x20\x6E\x65\x77\x20\x74\x69\x63\x6B\x65\x74\x3A\x20\x6D\x69\x73\x73\x20\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x49\x64\x20\x6F\x72\x20\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x49\x64","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x66\x69\x6E\x64","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x6F\x67\x69\x6E\x2E\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x2E\x63\x6F\x6D","\x63\x6C\x69\x65\x6E\x74\x49\x64","\x63\x6C\x69\x65\x6E\x74\x53\x65\x63\x72\x65\x74","\x73\x65\x63\x75\x72\x69\x74\x79\x54\x6F\x6B\x65\x6E","\x63\x6F\x6E\x63\x61\x74","\x70\x61\x73\x73\x77\x6F\x72\x64","\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x73\x65\x72\x76\x65\x72\x55\x52\x4C","\x73\x65\x72\x76\x65\x72\x55\x72\x6C","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x6C\x6F\x67\x69\x6E","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x66\x69\x6E\x64\x4F\x6E\x65","\x61\x67\x65\x6E\x74","\x73\x63\x6F\x70\x65","\x61\x67\x65\x6E\x74\x4E\x61\x6D\x65","\x71\x75\x65\x75\x65","\x6E\x61\x6D\x65","\x6D\x6F\x6E\x69\x74\x6F\x72\x5F\x66\x6F\x72\x6D\x61\x74","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x65\x6E\x61\x62\x6C\x65\x64\x20\x66\x6F\x72\x20\x74\x68\x65\x20\x51\x75\x65\x75\x65","\x72\x65\x63\x6F\x72\x64\x45\x6E\x61\x62\x6C\x65","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x51\x75\x65\x75\x65\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x20\x6F\x72\x20\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x6E\x6F\x74\x20\x65\x6E\x61\x62\x6C\x65\x64","\x72\x6F\x75\x74\x65\x49\x64","\x69\x64","\x72\x65\x63\x6F\x72\x64","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x65\x6E\x61\x62\x6C\x65\x64\x20\x66\x6F\x72\x20\x74\x68\x65\x20\x52\x6F\x75\x74\x65\x20\x4F\x75\x74\x62\x6F\x75\x6E\x64","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x52\x6F\x75\x74\x65\x20\x4F\x75\x74\x62\x6F\x75\x6E\x64\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x20\x6F\x72\x20\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x6E\x6F\x74\x20\x65\x6E\x61\x62\x6C\x65\x64","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x41\x67\x65\x6E\x74\x20\x74\x6F\x20\x73\x65\x61\x72\x63\x68\x3A","\x65\x78\x65\x63\x75\x74\x65","\x73\x6F\x62\x6A\x65\x63\x74","","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x76\x6F\x69\x63\x65","\x43\x68\x61\x6E\x6E\x65\x6C\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64\x3A","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x55\x52\x4C","\x25\x73\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73\x2F\x25\x73\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64\x3F\x74\x79\x70\x65\x3D\x75\x6E\x69\x71\x75\x65\x69\x64","\x75\x6E\x69\x71\x75\x65\x69\x64","\x66\x6F\x72\x6D\x61\x74","\x72\x65\x73\x75\x6C\x74","\x6C\x65\x6E\x67\x74\x68","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x41\x67\x65\x6E\x74\x20\x66\x6F\x75\x6E\x64\x3A","\x4E\x61\x6D\x65","\x66\x69\x72\x73\x74","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x41\x67\x65\x6E\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2E\x20\x55\x73\x65\x20\x74\x68\x65\x20\x61\x64\x6D\x69\x6E\x20\x61\x63\x63\x6F\x75\x6E\x74","\x69\x64\x65\x6E\x74\x69\x74\x79","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x41\x64\x6D\x69\x6E\x20\x73\x65\x6C\x65\x63\x74\x65\x64","\x75\x73\x65\x72\x5F\x69\x64","\x64\x69\x73\x70\x6C\x61\x79\x5F\x6E\x61\x6D\x65","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x43\x6F\x6E\x74\x61\x63\x74\x20\x74\x6F\x20\x73\x65\x61\x72\x63\x68\x3A","\x43\x6F\x6E\x74\x61\x63\x74","\x50\x68\x6F\x6E\x65","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x43\x6F\x6E\x74\x61\x63\x74\x20\x66\x6F\x75\x6E\x64\x3A","\x65\x6E\x64\x75\x73\x65\x72","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x43\x6F\x6E\x74\x61\x63\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x3A","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x4C\x65\x61\x64\x20\x74\x6F\x20\x73\x65\x61\x72\x63\x68\x3A","\x4C\x65\x61\x64","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x4C\x65\x61\x64\x20\x66\x6F\x75\x6E\x64\x3A","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x43\x6F\x6E\x74\x61\x63\x74\x2F\x4C\x65\x61\x64\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x3A","\x63\x72\x65\x61\x74\x65","\x4E\x6F\x20\x43\x6F\x6D\x70\x61\x6E\x79","\x4C\x61\x73\x74\x4E\x61\x6D\x65","\x43\x61\x6C\x6C\x65\x72\x20\x2D\x20\x25\x73","\x3C\x75\x6E\x6B\x6E\x6F\x77\x6E\x3E","\x73\x75\x63\x63\x65\x73\x73","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x4C\x65\x61\x64\x20\x63\x72\x65\x61\x74\x65\x64\x3A\x20","\x49\x64","\x75\x74\x63","\x76\x61\x6C\x75\x65","\x66\x6F\x72\x45\x61\x63\x68","\x54\x61\x73\x6B","\x53\x75\x62\x6A\x65\x63\x74","\x73\x6F\x72\x74\x42\x79","\x74\x79\x70\x65","\x73\x74\x72\x69\x6E\x67","\x63\x6F\x6E\x74\x65\x6E\x74","\x70\x75\x73\x68","\x76\x61\x72\x69\x61\x62\x6C\x65","\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65","\x63\x75\x73\x74\x6F\x6D\x56\x61\x72\x69\x61\x62\x6C\x65","\x56\x61\x72\x69\x61\x62\x6C\x65","\x20","\x6A\x6F\x69\x6E","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x6B\x65\x79\x56\x61\x6C\x75\x65","\x6B\x65\x79\x54\x79\x70\x65","\x6B\x65\x79","\x25\x73\x3A\x20\x25\x73","\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74","\x0A","\x46\x69\x65\x6C\x64","\x69\x64\x46\x69\x65\x6C\x64","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x54\x61\x73\x6B\x20\x63\x72\x65\x61\x74\x65\x64\x20","\x74\x61\x73\x6B\x49\x64","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65","\x65\x76\x65\x6E\x74\x43\x68\x61\x6E\x6E\x65\x6C","\x65\x78\x69\x74\x53\x74\x61\x74\x75\x73","\x74\x69\x63\x6B\x65\x74\x49\x64","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x49\x64","\x73\x75\x62\x74\x79\x70\x65\x43\x68\x61\x6E\x6E\x65\x6C","\x75\x72\x6C","\x25\x73\x2F\x25\x73\x2F\x65","\x69\x6E\x73\x74\x61\x6E\x63\x65\x55\x72\x6C","\x72\x65\x70\x6F\x72\x74\x5F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x3A\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65","\x65\x6D\x69\x74","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x54\x61\x73\x6B\x20\x25\x73\x20\x64\x69\x73\x70\x6C\x61\x79\x65\x64\x20\x74\x6F\x20\x61\x67\x65\x6E\x74\x20\x25\x73","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x74\x61\x73\x6B\x20\x63\x72\x65\x61\x74\x69\x6F\x6E","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x4D\x65\x73\x73\x61\x67\x65\x3A","\x6D\x65\x73\x73\x61\x67\x65","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x53\x74\x61\x63\x6B\x3A","\x73\x74\x61\x63\x6B","\x66\x61\x69\x6C\x65\x64","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x52\x65\x70\x6F\x72\x74\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x63\x72\x65\x61\x74\x65","\x73\x75\x62\x73\x74\x72","\x2F","\x65\x78\x70\x6F\x72\x74\x73"];_0x962c[0];var _=require(_0x962c[1]);var util=require(_0x962c[2]);var jsforce=require(_0x962c[3]);var moment=require(_0x962c[4]);var SalesforceConfiguration=require(_0x962c[6])[_0x962c[5]];var ReportIntegration=require(_0x962c[6])[_0x962c[7]];var VoiceQueue=require(_0x962c[6])[_0x962c[8]];var VoiceExtension=require(_0x962c[6])[_0x962c[9]];var Agent=require(_0x962c[6])[_0x962c[10]];function Salesforce(){console[_0x962c[12]](_0x962c[11])}Salesforce[_0x962c[14]][_0x962c[13]]= function(_0x8fd2xb,_0x8fd2xc,_0x8fd2xd,_0x8fd2xe,_0x8fd2xf,_0x8fd2x10,_0x8fd2x11){var _0x8fd2x12={connection:undefined,configuration:undefined,agent:undefined,enduser:undefined,taskId:undefined,recordEnable:false,serverURL:undefined,agentName:undefined};if(!_0x8fd2xb||  !_0x8fd2xc){console[_0x962c[16]](_0x962c[15]);return};SalesforceConfiguration[_0x962c[19]]({where:{id:_0x8fd2xc,AccountId:_0x8fd2xb},include:[{all:true,include:[{all:true}]}]})[_0x962c[18]](handleEntityNotFound())[_0x962c[18]](handleConnection(_0x8fd2x12))[_0x962c[18]](searchMotionAgent(_0x8fd2xd,_0x8fd2xf))[_0x962c[18]](handleMotionAgent(_0x8fd2x12))[_0x962c[18]](searchQueue(_0x8fd2xf))[_0x962c[18]](handleQueueRecordings(_0x8fd2x12,_0x8fd2xf))[_0x962c[18]](searchRoute(_0x8fd2xf))[_0x962c[18]](handleOutboundRecordings(_0x8fd2x12,_0x8fd2xf))[_0x962c[18]](searchAgent(_0x8fd2x12,_0x8fd2xd,_0x8fd2xf))[_0x962c[18]](handleAgent(_0x8fd2x12,_0x8fd2xd,_0x8fd2xf))[_0x962c[18]](searchAdmin(_0x8fd2x12))[_0x962c[18]](handleAdmin(_0x8fd2x12))[_0x962c[18]](searchContact(_0x8fd2x12,_0x8fd2xd,_0x8fd2xf,_0x8fd2xe))[_0x962c[18]](handleContact(_0x8fd2x12,_0x8fd2xd,_0x8fd2xf,_0x8fd2xe))[_0x962c[18]](searchLead(_0x8fd2x12,_0x8fd2xd,_0x8fd2xf,_0x8fd2xe))[_0x962c[18]](handleLead(_0x8fd2x12,_0x8fd2xd,_0x8fd2xf,_0x8fd2xe))[_0x962c[18]](leadCreation(_0x8fd2x12,_0x8fd2xd,_0x8fd2xf,_0x8fd2xe))[_0x962c[18]](handleLeadCreation(_0x8fd2x12,_0x8fd2xd,_0x8fd2xf,_0x8fd2xe))[_0x962c[18]](taskCreation(_0x8fd2x12,_0x8fd2xf,_0x8fd2x10))[_0x962c[18]](handleTaskDisplay(_0x8fd2x12))[_0x962c[18]](handleReportIntegration(_0x8fd2x12,_0x8fd2xd,_0x8fd2xf,_0x8fd2xb,_0x8fd2x11,_0x8fd2xe))[_0x962c[18]](handleEnd(_0x8fd2x12))[_0x962c[17]](handleError(_0x8fd2x12,_0x8fd2xd,_0x8fd2xf,_0x8fd2xb))};function handleEntityNotFound(){return function(_0x8fd2x14){if(!_0x8fd2x14){return null};return _0x8fd2x14}}function handleConnection(_0x8fd2x12){return function(_0x8fd2x16){_0x8fd2x12[_0x962c[20]]=  new jsforce.Connection({oauth2:{loginUrl:_0x8fd2x16[_0x962c[22]][_0x962c[21]]?_0x8fd2x16[_0x962c[22]][_0x962c[21]]:_0x962c[23],clientId:_0x8fd2x16[_0x962c[22]][_0x962c[24]],clientSecret:_0x8fd2x16[_0x962c[22]][_0x962c[25]]}});var _0x8fd2x17=_0x8fd2x16[_0x962c[22]][_0x962c[28]][_0x962c[27]](_0x8fd2x16[_0x962c[22]][_0x962c[26]]);_0x8fd2x12[_0x962c[29]]= _0x8fd2x16;_0x8fd2x12[_0x962c[30]]= _0x8fd2x16[_0x962c[22]][_0x962c[31]];return _0x8fd2x12[_0x962c[20]][_0x962c[33]](_0x8fd2x16[_0x962c[22]][_0x962c[32]],_0x8fd2x17)}}function searchMotionAgent(_0x8fd2xd,_0x8fd2xf){return function(){return Agent[_0x962c[37]](_0x962c[36])[_0x962c[35]]({where:{name:getValueFromPropertyName(_0x8fd2xf,getAgentSearchPropertyFromChannel(_0x8fd2xd))},attributes:[_0x962c[34]]})}}function handleMotionAgent(_0x8fd2x12){return function(_0x8fd2x1a){if(_0x8fd2x1a&& _0x8fd2x1a[_0x962c[34]]){_0x8fd2x12[_0x962c[38]]= _0x8fd2x1a[_0x962c[34]]};return}}function searchQueue(_0x8fd2xf){return function(){if(_0x8fd2xf[_0x962c[39]]){return VoiceQueue[_0x962c[35]]({where:{name:_0x8fd2xf[_0x962c[39]]},attributes:[_0x962c[40],_0x962c[41]]})}else {return}}}function handleQueueRecordings(_0x8fd2x12,_0x8fd2xf){return function(_0x8fd2x1d){if(_0x8fd2xf[_0x962c[39]]){if(_0x8fd2x1d&& _0x8fd2x1d[_0x962c[41]]){console[_0x962c[12]](_0x962c[42],_0x8fd2x1d[_0x962c[40]]);_0x8fd2x12[_0x962c[43]]= true}else {_0x8fd2x12[_0x962c[43]]= false;console[_0x962c[12]](_0x962c[44])}};return}}function searchRoute(_0x8fd2xf){return function(){if(_0x8fd2xf[_0x962c[45]]){return VoiceExtension[_0x962c[35]]({where:{id:_0x8fd2xf[_0x962c[45]]},attributes:[_0x962c[46],_0x962c[47]]})}else {return}}}function handleOutboundRecordings(_0x8fd2x12,_0x8fd2xf){return function(_0x8fd2x20){if(_0x8fd2xf[_0x962c[45]]){if(_0x8fd2x20&& _0x8fd2x20[_0x962c[47]]){console[_0x962c[12]](_0x962c[48],_0x8fd2x20[_0x962c[46]]);_0x8fd2x12[_0x962c[43]]= true}else {_0x8fd2x12[_0x962c[43]]= false;console[_0x962c[12]](_0x962c[49])}};return}}function searchAgent(_0x8fd2x12,_0x8fd2xd,_0x8fd2xf){return function(){console[_0x962c[12]](_0x962c[50],_0x8fd2x12[_0x962c[38]]);return _0x8fd2x12[_0x962c[20]][_0x962c[52]](_0x962c[10])[_0x962c[19]]({Name:_0x8fd2x12[_0x962c[38]]},{Id:1,Username:1,Name:1})[_0x962c[51]]()}}function getAgentSearchPropertyFromChannel(_0x8fd2xd){var _0x8fd2x23=_0x962c[53];if(_0x8fd2xd){switch(_0x8fd2xd){case _0x962c[55]:_0x8fd2x23= _0x962c[54];break;default:_0x8fd2x23= _0x962c[54];console[_0x962c[16]](_0x962c[56],_0x8fd2xd)}};return _0x8fd2x23}function getValueFromPropertyName(_0x8fd2xf,_0x8fd2x23,_0x8fd2x12){if(_0x8fd2x23=== _0x962c[57]){if(_0x8fd2x12&& _0x8fd2x12[_0x962c[43]]&& _0x8fd2x12[_0x962c[30]]){return util[_0x962c[60]](_0x962c[58],stripTrailingSlash(_0x8fd2x12[_0x962c[30]]),_0x8fd2xf[_0x962c[59]])}else {return null}}else {return _[_0x962c[61]](_0x8fd2xf,_0x8fd2x23)}}function handleAgent(_0x8fd2x12,_0x8fd2xd,_0x8fd2x26){return function(_0x8fd2xf){if(_0x8fd2xf[_0x962c[62]]> 0){console[_0x962c[12]](_0x962c[63],_0x8fd2x12[_0x962c[38]]);_0x8fd2x12[_0x962c[36]]= getMatchObject(_0x8fd2xf,_0x962c[64],_0x8fd2x12[_0x962c[38]]);return _0x8fd2x12[_0x962c[36]]};return}}function getMatchObject(_0x8fd2x28,_0x8fd2x23,_0x8fd2x29){var _0x8fd2x2a=_[_0x962c[19]](_0x8fd2x28,{property:_0x8fd2x29});if(_0x8fd2x2a){return _0x8fd2x2a};return _[_0x962c[65]](_0x8fd2x28)}function searchAdmin(_0x8fd2x12){return function(_0x8fd2xf){if(_0x8fd2xf){return};console[_0x962c[12]](_0x962c[66]);return _0x8fd2x12[_0x962c[20]][_0x962c[67]]()}}function handleAdmin(_0x8fd2x12){return function(_0x8fd2xf){if(!_0x8fd2xf){return};if(_0x8fd2xf){console[_0x962c[12]](_0x962c[68]);_0x8fd2x12[_0x962c[36]]= {Id:_0x8fd2xf[_0x962c[69]],Name:_0x8fd2xf[_0x962c[70]],Username:_0x8fd2xf[_0x962c[32]]}};return}}function searchContact(_0x8fd2x12,_0x8fd2xd,_0x8fd2xf,_0x8fd2xe){return function(){console[_0x962c[12]](_0x962c[71],getValueFromPropertyName(_0x8fd2xf,getEndUserSearchPropertyFromChannel(_0x8fd2xd,_0x8fd2xe)));var _0x8fd2x2e={};_0x8fd2x2e[getEndUserSearchQueryFromChannel(_0x8fd2xd)]= getValueFromPropertyName(_0x8fd2xf,getEndUserSearchPropertyFromChannel(_0x8fd2xd,_0x8fd2xe));return _0x8fd2x12[_0x962c[20]][_0x962c[52]](_0x962c[72])[_0x962c[19]](_0x8fd2x2e,{Id:1,Name:1})[_0x962c[51]]()}}function getEndUserSearchQueryFromChannel(_0x8fd2xd){var _0x8fd2x23=_0x962c[53];if(_0x8fd2xd){switch(_0x8fd2xd){case _0x962c[55]:_0x8fd2x23= _0x962c[73];break;default:_0x8fd2x23= _0x962c[73];console[_0x962c[16]](_0x962c[56],_0x8fd2xd)}};return _0x8fd2x23}function getEndUserSearchPropertyFromChannel(_0x8fd2xd,_0x8fd2xe){var _0x8fd2x23=_0x962c[53];if(_0x8fd2xd){switch(_0x8fd2xd){case _0x962c[55]:if(_0x8fd2xe=== _0x962c[74]){_0x8fd2x23= _0x962c[75]}else {if(_0x8fd2xe=== _0x962c[39]){_0x8fd2x23= _0x962c[76]}};break;default:_0x8fd2x23= _0x962c[76];console[_0x962c[16]](_0x962c[56],_0x8fd2xd)}};return _0x8fd2x23}function getEndUserNamePropertyFromChannel(_0x8fd2xd,_0x8fd2xe){var _0x8fd2x23=_0x962c[53];if(_0x8fd2xd){switch(_0x8fd2xd){case _0x962c[55]:if(_0x8fd2xe=== _0x962c[74]){_0x8fd2x23= _0x962c[77]}else {if(_0x8fd2xe=== _0x962c[39]){_0x8fd2x23= _0x962c[78]}};break;default:_0x8fd2x23= _0x962c[78];console[_0x962c[16]](_0x962c[56],_0x8fd2xd)}};return _0x8fd2x23}function handleContact(_0x8fd2x12,_0x8fd2xd,_0x8fd2x26,_0x8fd2xe){return function(_0x8fd2xf){if(_0x8fd2xf[_0x962c[62]]> 0){console[_0x962c[12]](_0x962c[79],getValueFromPropertyName(_0x8fd2x26,getEndUserSearchPropertyFromChannel(_0x8fd2xd,_0x8fd2xe)));_0x8fd2x12[_0x962c[80]]= _0x8fd2xf[0];return _0x8fd2x12[_0x962c[80]]};console[_0x962c[12]](_0x962c[81],getValueFromPropertyName(_0x8fd2x26,getEndUserSearchPropertyFromChannel(_0x8fd2xd,_0x8fd2xe)));return}}function searchLead(_0x8fd2x12,_0x8fd2xd,_0x8fd2x26,_0x8fd2xe){return function(_0x8fd2xf){if(!_0x8fd2xf){console[_0x962c[12]](_0x962c[82],getValueFromPropertyName(_0x8fd2x26,getEndUserSearchPropertyFromChannel(_0x8fd2xd,_0x8fd2xe)));var _0x8fd2x2e={};_0x8fd2x2e[getEndUserSearchQueryFromChannel(_0x8fd2xd)]= getValueFromPropertyName(_0x8fd2x26,getEndUserSearchPropertyFromChannel(_0x8fd2xd,_0x8fd2xe));return _0x8fd2x12[_0x962c[20]][_0x962c[52]](_0x962c[83])[_0x962c[19]](_0x8fd2x2e,{Id:1,Name:1})[_0x962c[51]]()};return}}function handleLead(_0x8fd2x12,_0x8fd2xd,_0x8fd2x26,_0x8fd2xe){return function(_0x8fd2xf){if(_0x8fd2xf&& _0x8fd2xf[_0x962c[62]]> 0){console[_0x962c[12]](_0x962c[84],getValueFromPropertyName(_0x8fd2x26,getEndUserSearchPropertyFromChannel(_0x8fd2xd,_0x8fd2xe)));_0x8fd2x12[_0x962c[80]]= _0x8fd2xf[0];return _0x8fd2x12[_0x962c[80]]};return}}function leadCreation(_0x8fd2x12,_0x8fd2xd,_0x8fd2x26,_0x8fd2xe){return function(_0x8fd2xf){if(_0x8fd2xf|| _0x8fd2x12[_0x962c[80]]){return};console[_0x962c[12]](_0x962c[85],getValueFromPropertyName(_0x8fd2x26,getEndUserSearchPropertyFromChannel(_0x8fd2xd,_0x8fd2xe)));return _0x8fd2x12[_0x962c[20]][_0x962c[52]](_0x962c[83])[_0x962c[86]](getJsonForEndUserCreation(_0x8fd2xd,_0x8fd2x26,_0x8fd2xe))}}function getJsonForEndUserCreation(_0x8fd2xd,_0x8fd2xf,_0x8fd2xe){var _0x8fd2x37={Company:_0x962c[87]};switch(_0x8fd2xd){case _0x962c[55]:if(_0x8fd2xe=== _0x962c[39]){if(isValidName(_0x8fd2xf[_0x962c[78]])){_0x8fd2x37[_0x962c[88]]= getValueFromPropertyName(_0x8fd2xf,getEndUserNamePropertyFromChannel(_0x8fd2xd,_0x8fd2xe))}else {_0x8fd2x37[_0x962c[88]]= util[_0x962c[60]](_0x962c[89],getValueFromPropertyName(_0x8fd2xf,getEndUserSearchPropertyFromChannel(_0x8fd2xd,_0x8fd2xe)))}}else {if(_0x8fd2xe=== _0x962c[74]){if(isValidName(_0x8fd2xf[_0x962c[77]])){_0x8fd2x37[_0x962c[88]]= getValueFromPropertyName(_0x8fd2xf,getEndUserNamePropertyFromChannel(_0x8fd2xd,_0x8fd2xe))}else {_0x8fd2x37[_0x962c[88]]= util[_0x962c[60]](_0x962c[89],getValueFromPropertyName(_0x8fd2xf,getEndUserSearchPropertyFromChannel(_0x8fd2xd,_0x8fd2xe)))}}};_0x8fd2x37[_0x962c[73]]= getValueFromPropertyName(_0x8fd2xf,getEndUserSearchPropertyFromChannel(_0x8fd2xd,_0x8fd2xe));break;default:console[_0x962c[16]](_0x962c[56],_0x8fd2xd)};return _0x8fd2x37}function isValidName(_0x8fd2x39){return _0x8fd2x39&& _0x8fd2x39!== _0x962c[90]}function handleLeadCreation(_0x8fd2x12,_0x8fd2xd,_0x8fd2x26,_0x8fd2xe){return function(_0x8fd2xf){if(!_0x8fd2xf){return};if(_0x8fd2xf&& _0x8fd2xf[_0x962c[91]]){console[_0x962c[12]](_0x962c[92],getValueFromPropertyName(_0x8fd2x26,getEndUserSearchPropertyFromChannel(_0x8fd2xd,_0x8fd2xe)));_0x8fd2x12[_0x962c[80]]= {Id:_0x8fd2xf[_0x962c[46]]}};return}}function taskCreation(_0x8fd2x12,_0x8fd2x26,_0x8fd2x10){return function(){var _0x8fd2x3c={WhoId:_0x8fd2x12[_0x962c[80]][_0x962c[93]],OwnerId:_0x8fd2x12[_0x962c[36]][_0x962c[93]],ActivityDate:moment[_0x962c[94]](),IsReminderSet:false,IsRecurrence:false,Subject:createSubjectFromConfiguration(_0x8fd2x12,_0x8fd2x26,_0x8fd2x10),Description:createDescriptionFromConfiguration(_0x8fd2x12,_0x8fd2x26,_0x8fd2x10)};var _0x8fd2x3d=createCustomFieldsFromConfiguration(_0x8fd2x12,_0x8fd2x26,_0x8fd2x10);if(_0x8fd2x3d[_0x962c[62]]> 0){_[_0x962c[96]](_0x8fd2x3d,function(_0x8fd2x3e){_0x8fd2x3c[_0x8fd2x3e[_0x962c[46]]]= _0x8fd2x3e[_0x962c[95]]})};return _0x8fd2x12[_0x962c[20]][_0x962c[52]](_0x962c[97])[_0x962c[86]](_0x8fd2x3c)}}function createSubjectFromConfiguration(_0x8fd2x12,_0x8fd2x26,_0x8fd2x10){var _0x8fd2x40=_0x962c[53];var _0x8fd2x41=[];if(_0x8fd2x12[_0x962c[29]][_0x962c[98]][_0x962c[62]]> 0){var _0x8fd2x42=_[_0x962c[99]](_0x8fd2x12[_0x962c[29]].Subject,[_0x962c[46]]);_[_0x962c[96]](_0x8fd2x42,function(_0x8fd2x43){if(_0x8fd2x43[_0x962c[100]]=== _0x962c[101]){_0x8fd2x41[_0x962c[103]](_0x8fd2x43[_0x962c[102]])}else {if(_0x8fd2x43[_0x962c[100]]=== _0x962c[104]&& _0x8fd2x43[_0x962c[105]]){var _0x8fd2x44=getValueFromPropertyName(_0x8fd2x26,_0x8fd2x43[_0x962c[105]],_0x8fd2x12);if(_0x8fd2x44){_0x8fd2x41[_0x962c[103]](_0x8fd2x44.toString())}}else {if(_0x8fd2x43[_0x962c[100]]=== _0x962c[106]&& _0x8fd2x43[_0x962c[107]]&& _0x8fd2x43[_0x962c[107]][_0x962c[40]]){_0x8fd2x10[_0x8fd2x43[_0x962c[107]][_0x962c[40]]]&& _0x8fd2x41[_0x962c[103]](_0x8fd2x10[_0x8fd2x43[_0x962c[107]][_0x962c[40]]].toString())}}}});_0x8fd2x40= _0x8fd2x41[_0x962c[109]](_0x962c[108])};return _0x8fd2x40}function createDescriptionFromConfiguration(_0x8fd2x12,_0x8fd2x26,_0x8fd2x10){var _0x8fd2x46=_0x962c[53];var _0x8fd2x41=[];if(_0x8fd2x12[_0x962c[29]][_0x962c[110]][_0x962c[62]]> 0){var _0x8fd2x47=_[_0x962c[99]](_0x8fd2x12[_0x962c[29]].Description,[_0x962c[46]]);_[_0x962c[96]](_0x8fd2x47,function(_0x8fd2x43){if(_0x8fd2x43[_0x962c[100]]=== _0x962c[101]){_0x8fd2x41[_0x962c[103]](_0x8fd2x43[_0x962c[102]])}else {if(_0x8fd2x43[_0x962c[100]]=== _0x962c[111]){if(_0x8fd2x43[_0x962c[112]]=== _0x962c[101]&& _0x8fd2x43[_0x962c[113]]){_0x8fd2x41[_0x962c[103]](util[_0x962c[60]](_0x962c[114],_0x8fd2x43[_0x962c[113]],_0x8fd2x43[_0x962c[115]]))}else {if(_0x8fd2x43[_0x962c[112]]=== _0x962c[104]&& _0x8fd2x43[_0x962c[105]]&& _0x8fd2x43[_0x962c[113]]){var _0x8fd2x44=getValueFromPropertyName(_0x8fd2x26,_0x8fd2x43[_0x962c[105]],_0x8fd2x12);if(_0x8fd2x44){_0x8fd2x41[_0x962c[103]](util[_0x962c[60]](_0x962c[114],_0x8fd2x43[_0x962c[113]],_0x8fd2x44.toString()))}}else {if(_0x8fd2x43[_0x962c[112]]=== _0x962c[106]&& _0x8fd2x43[_0x962c[107]]&& _0x8fd2x43[_0x962c[107]][_0x962c[40]]&& _0x8fd2x43[_0x962c[113]]){_0x8fd2x10[_0x8fd2x43[_0x962c[107]][_0x962c[40]]]&& _0x8fd2x41[_0x962c[103]](util[_0x962c[60]](_0x962c[114],_0x8fd2x43[_0x962c[113]],_0x8fd2x10[_0x8fd2x43[_0x962c[107]][_0x962c[40]]]))}}}}}});_0x8fd2x46= _0x8fd2x41[_0x962c[109]](_0x962c[116])};return _0x8fd2x46}function createCustomFieldsFromConfiguration(_0x8fd2x12,_0x8fd2x26,_0x8fd2x10){var _0x8fd2x49=[];var _0x8fd2x4a=[];if(_0x8fd2x12[_0x962c[29]][_0x962c[117]][_0x962c[62]]> 0){_0x8fd2x49= _0x8fd2x12[_0x962c[29]][_0x962c[117]];_[_0x962c[96]](_0x8fd2x49,function(_0x8fd2x3e){if(_0x8fd2x3e[_0x962c[100]]=== _0x962c[101]&& _0x8fd2x3e[_0x962c[118]]){_0x8fd2x4a[_0x962c[103]]({id:_0x8fd2x3e[_0x962c[118]],value:_0x8fd2x3e[_0x962c[102]]})}else {if(_0x8fd2x3e[_0x962c[100]]=== _0x962c[104]&& _0x8fd2x3e[_0x962c[105]]&& _0x8fd2x3e[_0x962c[118]]){var _0x8fd2x44=getValueFromPropertyName(_0x8fd2x26,_0x8fd2x3e[_0x962c[105]],_0x8fd2x12);if(_0x8fd2x44){_0x8fd2x4a[_0x962c[103]]({id:_0x8fd2x3e[_0x962c[118]],value:_0x8fd2x44.toString()})}}else {if(_0x8fd2x3e[_0x962c[100]]=== _0x962c[106]&& _0x8fd2x3e[_0x962c[118]]&& _0x8fd2x3e[_0x962c[107]]&& _0x8fd2x3e[_0x962c[107]][_0x962c[40]]){_0x8fd2x10[_0x8fd2x3e[_0x962c[107]][_0x962c[40]]]&& _0x8fd2x4a[_0x962c[103]]({id:_0x8fd2x3e[_0x962c[118]],value:_0x8fd2x10[_0x8fd2x3e[_0x962c[107]][_0x962c[40]]].toString()})}}}})};return _0x8fd2x4a}function handleTaskDisplay(_0x8fd2x12){return function(_0x8fd2xf){if(_0x8fd2xf&& _0x8fd2xf[_0x962c[91]]){console[_0x962c[12]](_0x962c[119],_0x8fd2xf[_0x962c[46]]);_0x8fd2x12[_0x962c[120]]= _0x8fd2xf[_0x962c[46]];return};return}}function handleReportIntegration(_0x8fd2x12,_0x8fd2xd,_0x8fd2xf,_0x8fd2xb,_0x8fd2x11,_0x8fd2xe){return function(){delete _0x8fd2xf[_0x962c[46]];delete _0x8fd2xf[_0x962c[121]];delete _0x8fd2xf[_0x962c[122]];_0x8fd2xf[_0x962c[123]]= _0x962c[124];_0x8fd2xf[_0x962c[125]]= _0x8fd2xd;_0x8fd2xf[_0x962c[126]]= _0x962c[91];_0x8fd2xf[_0x962c[127]]= _0x8fd2x12[_0x962c[120]];_0x8fd2xf[_0x962c[128]]= _0x8fd2xb;_0x8fd2xf[_0x962c[129]]= _0x8fd2xe;_0x8fd2xf[_0x962c[130]]= util[_0x962c[60]](_0x962c[131],_0x8fd2x12[_0x962c[20]][_0x962c[132]],_0x8fd2x12[_0x962c[120]]);_0x8fd2x11[_0x962c[134]](_0x962c[133],_0x8fd2xf);return ReportIntegration[_0x962c[86]](_0x8fd2xf)}}function handleEnd(_0x8fd2x12,_0x8fd2xf,_0x8fd2xd){return function(){console[_0x962c[12]](util[_0x962c[60]](_0x962c[135],_0x8fd2x12[_0x962c[120]],_0x8fd2x12[_0x962c[36]].Id));_0x8fd2x12= undefined;return}}function handleError(_0x8fd2x12,_0x8fd2xd,_0x8fd2xf,_0x8fd2xb){return function(_0x8fd2x4f){console[_0x962c[16]](_0x962c[136]);console[_0x962c[16]](_0x962c[137],_0x8fd2x4f[_0x962c[138]]);console[_0x962c[16]](_0x962c[139],_0x8fd2x4f[_0x962c[140]]);_0x8fd2x12= undefined;delete _0x8fd2xf[_0x962c[46]];delete _0x8fd2xf[_0x962c[121]];delete _0x8fd2xf[_0x962c[122]];_0x8fd2xf[_0x962c[123]]= _0x962c[124];_0x8fd2xf[_0x962c[125]]= _0x8fd2xd;_0x8fd2xf[_0x962c[126]]= _0x962c[141];_0x8fd2xf[_0x962c[128]]= _0x8fd2xb;ReportIntegration[_0x962c[86]](_0x8fd2xf)[_0x962c[18]](function(){return})[_0x962c[17]](function(_0x8fd2x4f){console[_0x962c[16]](_0x962c[142]);return})}}function stripTrailingSlash(_0x8fd2x51){if(_0x8fd2x51[_0x962c[143]](-1) === _0x962c[144]){return _0x8fd2x51[_0x962c[143]](0,_0x8fd2x51[_0x962c[62]]- 1)};return _0x8fd2x51}module[_0x962c[145]]= Salesforce
\ No newline at end of file
+var _0xc83d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6A\x73\x66\x6F\x72\x63\x65","\x6D\x6F\x6D\x65\x6E\x74","\x6D\x6F\x74\x69\x6F\x6E","\x2E\x2E\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x55\x73\x65\x72","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x69\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x69\x6E\x66\x6F","\x68\x61\x6E\x64\x6C\x65\x45\x76\x65\x6E\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x50\x61\x73\x73\x65\x64\x20\x70\x61\x72\x61\x6D\x65\x74\x65\x72\x73\x20\x61\x72\x65\x20\x6E\x6F\x74\x20\x65\x6E\x6F\x75\x67\x68\x20\x74\x6F\x20\x63\x72\x65\x61\x74\x65\x20\x61\x20\x6E\x65\x77\x20\x74\x69\x63\x6B\x65\x74\x3A\x20\x6D\x69\x73\x73\x20\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x49\x64\x20\x6F\x72\x20\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x49\x64","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x66\x69\x6E\x64","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x6F\x67\x69\x6E\x2E\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x2E\x63\x6F\x6D","\x63\x6C\x69\x65\x6E\x74\x49\x64","\x63\x6C\x69\x65\x6E\x74\x53\x65\x63\x72\x65\x74","\x73\x65\x63\x75\x72\x69\x74\x79\x54\x6F\x6B\x65\x6E","\x63\x6F\x6E\x63\x61\x74","\x70\x61\x73\x73\x77\x6F\x72\x64","\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x73\x65\x72\x76\x65\x72\x55\x52\x4C","\x73\x65\x72\x76\x65\x72\x55\x72\x6C","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x6C\x6F\x67\x69\x6E","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x66\x69\x6E\x64\x4F\x6E\x65","\x61\x67\x65\x6E\x74","\x73\x63\x6F\x70\x65","\x61\x67\x65\x6E\x74\x4E\x61\x6D\x65","\x71\x75\x65\x75\x65","\x6E\x61\x6D\x65","\x6D\x6F\x6E\x69\x74\x6F\x72\x5F\x66\x6F\x72\x6D\x61\x74","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x65\x6E\x61\x62\x6C\x65\x64\x20\x66\x6F\x72\x20\x74\x68\x65\x20\x51\x75\x65\x75\x65","\x72\x65\x63\x6F\x72\x64\x45\x6E\x61\x62\x6C\x65","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x51\x75\x65\x75\x65\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x20\x6F\x72\x20\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x6E\x6F\x74\x20\x65\x6E\x61\x62\x6C\x65\x64","\x72\x6F\x75\x74\x65\x49\x64","\x69\x64","\x72\x65\x63\x6F\x72\x64","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x65\x6E\x61\x62\x6C\x65\x64\x20\x66\x6F\x72\x20\x74\x68\x65\x20\x52\x6F\x75\x74\x65\x20\x4F\x75\x74\x62\x6F\x75\x6E\x64","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x52\x6F\x75\x74\x65\x20\x4F\x75\x74\x62\x6F\x75\x6E\x64\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x20\x6F\x72\x20\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x6E\x6F\x74\x20\x65\x6E\x61\x62\x6C\x65\x64","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x41\x67\x65\x6E\x74\x20\x74\x6F\x20\x73\x65\x61\x72\x63\x68\x3A","\x65\x78\x65\x63\x75\x74\x65","\x73\x6F\x62\x6A\x65\x63\x74","","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x76\x6F\x69\x63\x65","\x43\x68\x61\x6E\x6E\x65\x6C\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64\x3A","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x55\x52\x4C","\x25\x73\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73\x2F\x25\x73\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64\x3F\x74\x79\x70\x65\x3D\x75\x6E\x69\x71\x75\x65\x69\x64","\x75\x6E\x69\x71\x75\x65\x69\x64","\x66\x6F\x72\x6D\x61\x74","\x72\x65\x73\x75\x6C\x74","\x6C\x65\x6E\x67\x74\x68","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x41\x67\x65\x6E\x74\x20\x66\x6F\x75\x6E\x64\x3A","\x4E\x61\x6D\x65","\x66\x69\x72\x73\x74","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x41\x67\x65\x6E\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2E\x20\x55\x73\x65\x20\x74\x68\x65\x20\x61\x64\x6D\x69\x6E\x20\x61\x63\x63\x6F\x75\x6E\x74","\x69\x64\x65\x6E\x74\x69\x74\x79","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x41\x64\x6D\x69\x6E\x20\x73\x65\x6C\x65\x63\x74\x65\x64","\x75\x73\x65\x72\x5F\x69\x64","\x64\x69\x73\x70\x6C\x61\x79\x5F\x6E\x61\x6D\x65","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x43\x6F\x6E\x74\x61\x63\x74\x20\x74\x6F\x20\x73\x65\x61\x72\x63\x68\x3A","\x43\x6F\x6E\x74\x61\x63\x74","\x50\x68\x6F\x6E\x65","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x43\x6F\x6E\x74\x61\x63\x74\x20\x66\x6F\x75\x6E\x64\x3A","\x65\x6E\x64\x75\x73\x65\x72","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x43\x6F\x6E\x74\x61\x63\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x3A","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x4C\x65\x61\x64\x20\x74\x6F\x20\x73\x65\x61\x72\x63\x68\x3A","\x4C\x65\x61\x64","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x4C\x65\x61\x64\x20\x66\x6F\x75\x6E\x64\x3A","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x43\x6F\x6E\x74\x61\x63\x74\x2F\x4C\x65\x61\x64\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x3A","\x63\x72\x65\x61\x74\x65","\x4E\x6F\x20\x43\x6F\x6D\x70\x61\x6E\x79","\x4C\x61\x73\x74\x4E\x61\x6D\x65","\x43\x61\x6C\x6C\x65\x72\x20\x2D\x20\x25\x73","\x3C\x75\x6E\x6B\x6E\x6F\x77\x6E\x3E","\x73\x75\x63\x63\x65\x73\x73","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x4C\x65\x61\x64\x20\x63\x72\x65\x61\x74\x65\x64\x3A\x20","\x49\x64","\x75\x74\x63","\x76\x61\x6C\x75\x65","\x66\x6F\x72\x45\x61\x63\x68","\x54\x61\x73\x6B","\x53\x75\x62\x6A\x65\x63\x74","\x73\x6F\x72\x74\x42\x79","\x74\x79\x70\x65","\x73\x74\x72\x69\x6E\x67","\x63\x6F\x6E\x74\x65\x6E\x74","\x70\x75\x73\x68","\x76\x61\x72\x69\x61\x62\x6C\x65","\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65","\x63\x75\x73\x74\x6F\x6D\x56\x61\x72\x69\x61\x62\x6C\x65","\x56\x61\x72\x69\x61\x62\x6C\x65","\x20","\x6A\x6F\x69\x6E","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x6B\x65\x79\x56\x61\x6C\x75\x65","\x6B\x65\x79\x54\x79\x70\x65","\x6B\x65\x79","\x25\x73\x3A\x20\x25\x73","\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74","\x0A","\x46\x69\x65\x6C\x64","\x69\x64\x46\x69\x65\x6C\x64","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x54\x61\x73\x6B\x20\x63\x72\x65\x61\x74\x65\x64\x20","\x74\x61\x73\x6B\x49\x64","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65","\x65\x76\x65\x6E\x74\x43\x68\x61\x6E\x6E\x65\x6C","\x65\x78\x69\x74\x53\x74\x61\x74\x75\x73","\x74\x69\x63\x6B\x65\x74\x49\x64","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x49\x64","\x73\x75\x62\x74\x79\x70\x65\x43\x68\x61\x6E\x6E\x65\x6C","\x75\x72\x6C","\x25\x73\x2F\x25\x73\x2F\x65","\x69\x6E\x73\x74\x61\x6E\x63\x65\x55\x72\x6C","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x54\x79\x70\x65","\x65\x6D\x62\x65\x64\x64\x65\x64","\x72\x65\x70\x6F\x72\x74\x5F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x3A\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65","\x65\x6D\x69\x74","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x54\x61\x73\x6B\x20\x25\x73\x20\x64\x69\x73\x70\x6C\x61\x79\x65\x64\x20\x74\x6F\x20\x61\x67\x65\x6E\x74\x20\x25\x73","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x74\x61\x73\x6B\x20\x63\x72\x65\x61\x74\x69\x6F\x6E","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x4D\x65\x73\x73\x61\x67\x65\x3A","\x6D\x65\x73\x73\x61\x67\x65","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x53\x74\x61\x63\x6B\x3A","\x73\x74\x61\x63\x6B","\x66\x61\x69\x6C\x65\x64","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x52\x65\x70\x6F\x72\x74\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x63\x72\x65\x61\x74\x65","\x73\x75\x62\x73\x74\x72","\x2F","\x65\x78\x70\x6F\x72\x74\x73"];_0xc83d[0];var _=require(_0xc83d[1]);var util=require(_0xc83d[2]);var jsforce=require(_0xc83d[3]);var moment=require(_0xc83d[4]);var logger=require(_0xc83d[6])(_0xc83d[5]);var SalesforceConfiguration=require(_0xc83d[8])[_0xc83d[7]];var ReportIntegration=require(_0xc83d[8])[_0xc83d[9]];var VoiceQueue=require(_0xc83d[8])[_0xc83d[10]];var VoiceExtension=require(_0xc83d[8])[_0xc83d[11]];var Agent=require(_0xc83d[8])[_0xc83d[12]];function Salesforce(){logger[_0xc83d[14]](_0xc83d[13])}Salesforce[_0xc83d[16]][_0xc83d[15]]= function(_0x5cfbxc,_0x5cfbxd,_0x5cfbxe,_0x5cfbxf,_0x5cfbx10,_0x5cfbx11,_0x5cfbx12){var _0x5cfbx13={connection:undefined,configuration:undefined,agent:undefined,enduser:undefined,taskId:undefined,recordEnable:false,serverURL:undefined,agentName:undefined};if(!_0x5cfbxc||  !_0x5cfbxd){logger[_0xc83d[18]](_0xc83d[17]);return};SalesforceConfiguration[_0xc83d[21]]({where:{id:_0x5cfbxd,AccountId:_0x5cfbxc},include:[{all:true,include:[{all:true}]}]})[_0xc83d[20]](handleEntityNotFound())[_0xc83d[20]](handleConnection(_0x5cfbx13))[_0xc83d[20]](searchMotionAgent(_0x5cfbxe,_0x5cfbx10))[_0xc83d[20]](handleMotionAgent(_0x5cfbx13))[_0xc83d[20]](searchQueue(_0x5cfbx10))[_0xc83d[20]](handleQueueRecordings(_0x5cfbx13,_0x5cfbx10))[_0xc83d[20]](searchRoute(_0x5cfbx10))[_0xc83d[20]](handleOutboundRecordings(_0x5cfbx13,_0x5cfbx10))[_0xc83d[20]](searchAgent(_0x5cfbx13,_0x5cfbxe,_0x5cfbx10))[_0xc83d[20]](handleAgent(_0x5cfbx13,_0x5cfbxe,_0x5cfbx10))[_0xc83d[20]](searchAdmin(_0x5cfbx13))[_0xc83d[20]](handleAdmin(_0x5cfbx13))[_0xc83d[20]](searchContact(_0x5cfbx13,_0x5cfbxe,_0x5cfbx10,_0x5cfbxf))[_0xc83d[20]](handleContact(_0x5cfbx13,_0x5cfbxe,_0x5cfbx10,_0x5cfbxf))[_0xc83d[20]](searchLead(_0x5cfbx13,_0x5cfbxe,_0x5cfbx10,_0x5cfbxf))[_0xc83d[20]](handleLead(_0x5cfbx13,_0x5cfbxe,_0x5cfbx10,_0x5cfbxf))[_0xc83d[20]](leadCreation(_0x5cfbx13,_0x5cfbxe,_0x5cfbx10,_0x5cfbxf))[_0xc83d[20]](handleLeadCreation(_0x5cfbx13,_0x5cfbxe,_0x5cfbx10,_0x5cfbxf))[_0xc83d[20]](taskCreation(_0x5cfbx13,_0x5cfbx10,_0x5cfbx11))[_0xc83d[20]](handleTaskDisplay(_0x5cfbx13))[_0xc83d[20]](handleReportIntegration(_0x5cfbx13,_0x5cfbxe,_0x5cfbx10,_0x5cfbxc,_0x5cfbx12,_0x5cfbxf))[_0xc83d[20]](handleEnd(_0x5cfbx13))[_0xc83d[19]](handleError(_0x5cfbx13,_0x5cfbxe,_0x5cfbx10,_0x5cfbxc))};function handleEntityNotFound(){return function(_0x5cfbx15){if(!_0x5cfbx15){return null};return _0x5cfbx15}}function handleConnection(_0x5cfbx13){return function(_0x5cfbx17){_0x5cfbx13[_0xc83d[22]]=  new jsforce.Connection({oauth2:{loginUrl:_0x5cfbx17[_0xc83d[24]][_0xc83d[23]]?_0x5cfbx17[_0xc83d[24]][_0xc83d[23]]:_0xc83d[25],clientId:_0x5cfbx17[_0xc83d[24]][_0xc83d[26]],clientSecret:_0x5cfbx17[_0xc83d[24]][_0xc83d[27]]}});var _0x5cfbx18=_0x5cfbx17[_0xc83d[24]][_0xc83d[30]][_0xc83d[29]](_0x5cfbx17[_0xc83d[24]][_0xc83d[28]]);_0x5cfbx13[_0xc83d[31]]= _0x5cfbx17;_0x5cfbx13[_0xc83d[32]]= _0x5cfbx17[_0xc83d[24]][_0xc83d[33]];return _0x5cfbx13[_0xc83d[22]][_0xc83d[35]](_0x5cfbx17[_0xc83d[24]][_0xc83d[34]],_0x5cfbx18)}}function searchMotionAgent(_0x5cfbxe,_0x5cfbx10){return function(){var _0x5cfbx1a=getAgentSearchPropertyFromChannel(_0x5cfbxe);if(_0x5cfbx10[_0xc83d[36]](_0x5cfbx1a)){return Agent[_0xc83d[40]](_0xc83d[39])[_0xc83d[38]]({where:{name:getValueFromPropertyName(_0x5cfbx10,_0x5cfbx1a)},attributes:[_0xc83d[37]]})};return}}function handleMotionAgent(_0x5cfbx13){return function(_0x5cfbx1c){if(_0x5cfbx1c&& _0x5cfbx1c[_0xc83d[37]]){_0x5cfbx13[_0xc83d[41]]= _0x5cfbx1c[_0xc83d[37]]};return}}function searchQueue(_0x5cfbx10){return function(){if(_0x5cfbx10[_0xc83d[42]]){return VoiceQueue[_0xc83d[38]]({where:{name:_0x5cfbx10[_0xc83d[42]]},attributes:[_0xc83d[43],_0xc83d[44]]})}else {return}}}function handleQueueRecordings(_0x5cfbx13,_0x5cfbx10){return function(_0x5cfbx1f){if(_0x5cfbx10[_0xc83d[42]]){if(_0x5cfbx1f&& _0x5cfbx1f[_0xc83d[44]]){logger[_0xc83d[14]](_0xc83d[45],_0x5cfbx1f[_0xc83d[43]]);_0x5cfbx13[_0xc83d[46]]= true}else {_0x5cfbx13[_0xc83d[46]]= false;logger[_0xc83d[14]](_0xc83d[47])}};return}}function searchRoute(_0x5cfbx10){return function(){if(_0x5cfbx10[_0xc83d[48]]){return VoiceExtension[_0xc83d[38]]({where:{id:_0x5cfbx10[_0xc83d[48]]},attributes:[_0xc83d[49],_0xc83d[50]]})}else {return}}}function handleOutboundRecordings(_0x5cfbx13,_0x5cfbx10){return function(_0x5cfbx22){if(_0x5cfbx10[_0xc83d[48]]){if(_0x5cfbx22&& _0x5cfbx22[_0xc83d[50]]){logger[_0xc83d[14]](_0xc83d[51],_0x5cfbx22[_0xc83d[49]]);_0x5cfbx13[_0xc83d[46]]= true}else {_0x5cfbx13[_0xc83d[46]]= false;logger[_0xc83d[14]](_0xc83d[52])}};return}}function searchAgent(_0x5cfbx13,_0x5cfbxe,_0x5cfbx10){return function(){if(_0x5cfbx13[_0xc83d[41]]){logger[_0xc83d[14]](_0xc83d[53],_0x5cfbx13[_0xc83d[41]]);return _0x5cfbx13[_0xc83d[22]][_0xc83d[55]](_0xc83d[12])[_0xc83d[21]]({Name:_0x5cfbx13[_0xc83d[41]]},{Id:1,Username:1,Name:1})[_0xc83d[54]]()};return}}function getAgentSearchPropertyFromChannel(_0x5cfbxe){var _0x5cfbx25=_0xc83d[56];if(_0x5cfbxe){switch(_0x5cfbxe){case _0xc83d[58]:_0x5cfbx25= _0xc83d[57];break;default:_0x5cfbx25= _0xc83d[57];logger[_0xc83d[18]](_0xc83d[59],_0x5cfbxe)}};return _0x5cfbx25}function getValueFromPropertyName(_0x5cfbx10,_0x5cfbx25,_0x5cfbx13){if(_0x5cfbx25=== _0xc83d[60]){if(_0x5cfbx13&& _0x5cfbx13[_0xc83d[46]]&& _0x5cfbx13[_0xc83d[32]]){return util[_0xc83d[63]](_0xc83d[61],stripTrailingSlash(_0x5cfbx13[_0xc83d[32]]),_0x5cfbx10[_0xc83d[62]])}else {return null}}else {return _[_0xc83d[64]](_0x5cfbx10,_0x5cfbx25)}}function handleAgent(_0x5cfbx13,_0x5cfbxe,_0x5cfbx28){return function(_0x5cfbx10){if(_0x5cfbx10&& _0x5cfbx10[_0xc83d[65]]> 0){logger[_0xc83d[14]](_0xc83d[66],_0x5cfbx13[_0xc83d[41]]);_0x5cfbx13[_0xc83d[39]]= getMatchObject(_0x5cfbx10,_0xc83d[67],_0x5cfbx13[_0xc83d[41]]);return _0x5cfbx13[_0xc83d[39]]};return}}function getMatchObject(_0x5cfbx2a,_0x5cfbx25,_0x5cfbx2b){var _0x5cfbx2c=_[_0xc83d[21]](_0x5cfbx2a,{property:_0x5cfbx2b});if(_0x5cfbx2c){return _0x5cfbx2c};return _[_0xc83d[68]](_0x5cfbx2a)}function searchAdmin(_0x5cfbx13){return function(_0x5cfbx10){if(_0x5cfbx10){return};logger[_0xc83d[14]](_0xc83d[69]);return _0x5cfbx13[_0xc83d[22]][_0xc83d[70]]()}}function handleAdmin(_0x5cfbx13){return function(_0x5cfbx10){if(!_0x5cfbx10){return};if(_0x5cfbx10){logger[_0xc83d[14]](_0xc83d[71]);_0x5cfbx13[_0xc83d[39]]= {Id:_0x5cfbx10[_0xc83d[72]],Name:_0x5cfbx10[_0xc83d[73]],Username:_0x5cfbx10[_0xc83d[34]]}};return}}function searchContact(_0x5cfbx13,_0x5cfbxe,_0x5cfbx10,_0x5cfbxf){return function(){logger[_0xc83d[14]](_0xc83d[74],getValueFromPropertyName(_0x5cfbx10,getEndUserSearchPropertyFromChannel(_0x5cfbxe,_0x5cfbxf)));var _0x5cfbx30={};_0x5cfbx30[getEndUserSearchQueryFromChannel(_0x5cfbxe)]= getValueFromPropertyName(_0x5cfbx10,getEndUserSearchPropertyFromChannel(_0x5cfbxe,_0x5cfbxf));return _0x5cfbx13[_0xc83d[22]][_0xc83d[55]](_0xc83d[75])[_0xc83d[21]](_0x5cfbx30,{Id:1,Name:1})[_0xc83d[54]]()}}function getEndUserSearchQueryFromChannel(_0x5cfbxe){var _0x5cfbx25=_0xc83d[56];if(_0x5cfbxe){switch(_0x5cfbxe){case _0xc83d[58]:_0x5cfbx25= _0xc83d[76];break;default:_0x5cfbx25= _0xc83d[76];logger[_0xc83d[18]](_0xc83d[59],_0x5cfbxe)}};return _0x5cfbx25}function getEndUserSearchPropertyFromChannel(_0x5cfbxe,_0x5cfbxf){var _0x5cfbx25=_0xc83d[56];if(_0x5cfbxe){switch(_0x5cfbxe){case _0xc83d[58]:if(_0x5cfbxf=== _0xc83d[77]){_0x5cfbx25= _0xc83d[78]}else {if(_0x5cfbxf=== _0xc83d[42]){_0x5cfbx25= _0xc83d[79]}};break;default:_0x5cfbx25= _0xc83d[79];logger[_0xc83d[18]](_0xc83d[59],_0x5cfbxe)}};return _0x5cfbx25}function getEndUserNamePropertyFromChannel(_0x5cfbxe,_0x5cfbxf){var _0x5cfbx25=_0xc83d[56];if(_0x5cfbxe){switch(_0x5cfbxe){case _0xc83d[58]:if(_0x5cfbxf=== _0xc83d[77]){_0x5cfbx25= _0xc83d[80]}else {if(_0x5cfbxf=== _0xc83d[42]){_0x5cfbx25= _0xc83d[81]}};break;default:_0x5cfbx25= _0xc83d[81];logger[_0xc83d[18]](_0xc83d[59],_0x5cfbxe)}};return _0x5cfbx25}function handleContact(_0x5cfbx13,_0x5cfbxe,_0x5cfbx28,_0x5cfbxf){return function(_0x5cfbx10){if(_0x5cfbx10[_0xc83d[65]]> 0){logger[_0xc83d[14]](_0xc83d[82],getValueFromPropertyName(_0x5cfbx28,getEndUserSearchPropertyFromChannel(_0x5cfbxe,_0x5cfbxf)));_0x5cfbx13[_0xc83d[83]]= _0x5cfbx10[0];return _0x5cfbx13[_0xc83d[83]]};logger[_0xc83d[14]](_0xc83d[84],getValueFromPropertyName(_0x5cfbx28,getEndUserSearchPropertyFromChannel(_0x5cfbxe,_0x5cfbxf)));return}}function searchLead(_0x5cfbx13,_0x5cfbxe,_0x5cfbx28,_0x5cfbxf){return function(_0x5cfbx10){if(!_0x5cfbx10){logger[_0xc83d[14]](_0xc83d[85],getValueFromPropertyName(_0x5cfbx28,getEndUserSearchPropertyFromChannel(_0x5cfbxe,_0x5cfbxf)));var _0x5cfbx30={};_0x5cfbx30[getEndUserSearchQueryFromChannel(_0x5cfbxe)]= getValueFromPropertyName(_0x5cfbx28,getEndUserSearchPropertyFromChannel(_0x5cfbxe,_0x5cfbxf));return _0x5cfbx13[_0xc83d[22]][_0xc83d[55]](_0xc83d[86])[_0xc83d[21]](_0x5cfbx30,{Id:1,Name:1})[_0xc83d[54]]()};return}}function handleLead(_0x5cfbx13,_0x5cfbxe,_0x5cfbx28,_0x5cfbxf){return function(_0x5cfbx10){if(_0x5cfbx10&& _0x5cfbx10[_0xc83d[65]]> 0){logger[_0xc83d[14]](_0xc83d[87],getValueFromPropertyName(_0x5cfbx28,getEndUserSearchPropertyFromChannel(_0x5cfbxe,_0x5cfbxf)));_0x5cfbx13[_0xc83d[83]]= _0x5cfbx10[0];return _0x5cfbx13[_0xc83d[83]]};return}}function leadCreation(_0x5cfbx13,_0x5cfbxe,_0x5cfbx28,_0x5cfbxf){return function(_0x5cfbx10){if(_0x5cfbx10|| _0x5cfbx13[_0xc83d[83]]){return};logger[_0xc83d[14]](_0xc83d[88],getValueFromPropertyName(_0x5cfbx28,getEndUserSearchPropertyFromChannel(_0x5cfbxe,_0x5cfbxf)));return _0x5cfbx13[_0xc83d[22]][_0xc83d[55]](_0xc83d[86])[_0xc83d[89]](getJsonForEndUserCreation(_0x5cfbxe,_0x5cfbx28,_0x5cfbxf))}}function getJsonForEndUserCreation(_0x5cfbxe,_0x5cfbx10,_0x5cfbxf){var _0x5cfbx39={Company:_0xc83d[90]};switch(_0x5cfbxe){case _0xc83d[58]:if(_0x5cfbxf=== _0xc83d[42]){if(isValidName(_0x5cfbx10[_0xc83d[81]])){_0x5cfbx39[_0xc83d[91]]= getValueFromPropertyName(_0x5cfbx10,getEndUserNamePropertyFromChannel(_0x5cfbxe,_0x5cfbxf))}else {_0x5cfbx39[_0xc83d[91]]= util[_0xc83d[63]](_0xc83d[92],getValueFromPropertyName(_0x5cfbx10,getEndUserSearchPropertyFromChannel(_0x5cfbxe,_0x5cfbxf)))}}else {if(_0x5cfbxf=== _0xc83d[77]){if(isValidName(_0x5cfbx10[_0xc83d[80]])){_0x5cfbx39[_0xc83d[91]]= getValueFromPropertyName(_0x5cfbx10,getEndUserNamePropertyFromChannel(_0x5cfbxe,_0x5cfbxf))}else {_0x5cfbx39[_0xc83d[91]]= util[_0xc83d[63]](_0xc83d[92],getValueFromPropertyName(_0x5cfbx10,getEndUserSearchPropertyFromChannel(_0x5cfbxe,_0x5cfbxf)))}}};_0x5cfbx39[_0xc83d[76]]= getValueFromPropertyName(_0x5cfbx10,getEndUserSearchPropertyFromChannel(_0x5cfbxe,_0x5cfbxf));break;default:logger[_0xc83d[18]](_0xc83d[59],_0x5cfbxe)};return _0x5cfbx39}function isValidName(_0x5cfbx3b){return _0x5cfbx3b&& _0x5cfbx3b!== _0xc83d[93]}function handleLeadCreation(_0x5cfbx13,_0x5cfbxe,_0x5cfbx28,_0x5cfbxf){return function(_0x5cfbx10){if(!_0x5cfbx10){return};if(_0x5cfbx10&& _0x5cfbx10[_0xc83d[94]]){logger[_0xc83d[14]](_0xc83d[95],getValueFromPropertyName(_0x5cfbx28,getEndUserSearchPropertyFromChannel(_0x5cfbxe,_0x5cfbxf)));_0x5cfbx13[_0xc83d[83]]= {Id:_0x5cfbx10[_0xc83d[49]]}};return}}function taskCreation(_0x5cfbx13,_0x5cfbx28,_0x5cfbx11){return function(){var _0x5cfbx3e={WhoId:_0x5cfbx13[_0xc83d[83]][_0xc83d[96]],OwnerId:_0x5cfbx13[_0xc83d[39]][_0xc83d[96]],ActivityDate:moment[_0xc83d[97]](),IsReminderSet:false,IsRecurrence:false,Subject:createSubjectFromConfiguration(_0x5cfbx13,_0x5cfbx28,_0x5cfbx11),Description:createDescriptionFromConfiguration(_0x5cfbx13,_0x5cfbx28,_0x5cfbx11)};var _0x5cfbx3f=createCustomFieldsFromConfiguration(_0x5cfbx13,_0x5cfbx28,_0x5cfbx11);if(_0x5cfbx3f[_0xc83d[65]]> 0){_[_0xc83d[99]](_0x5cfbx3f,function(_0x5cfbx40){_0x5cfbx3e[_0x5cfbx40[_0xc83d[49]]]= _0x5cfbx40[_0xc83d[98]]})};return _0x5cfbx13[_0xc83d[22]][_0xc83d[55]](_0xc83d[100])[_0xc83d[89]](_0x5cfbx3e)}}function createSubjectFromConfiguration(_0x5cfbx13,_0x5cfbx28,_0x5cfbx11){var _0x5cfbx42=_0xc83d[56];var _0x5cfbx43=[];if(_0x5cfbx13[_0xc83d[31]][_0xc83d[101]][_0xc83d[65]]> 0){var _0x5cfbx44=_[_0xc83d[102]](_0x5cfbx13[_0xc83d[31]].Subject,[_0xc83d[49]]);_[_0xc83d[99]](_0x5cfbx44,function(_0x5cfbx45){if(_0x5cfbx45[_0xc83d[103]]=== _0xc83d[104]){_0x5cfbx43[_0xc83d[106]](_0x5cfbx45[_0xc83d[105]])}else {if(_0x5cfbx45[_0xc83d[103]]=== _0xc83d[107]&& _0x5cfbx45[_0xc83d[108]]){var _0x5cfbx46=getValueFromPropertyName(_0x5cfbx28,_0x5cfbx45[_0xc83d[108]],_0x5cfbx13);if(_0x5cfbx46){_0x5cfbx43[_0xc83d[106]](_0x5cfbx46.toString())}}else {if(_0x5cfbx45[_0xc83d[103]]=== _0xc83d[109]&& _0x5cfbx45[_0xc83d[110]]&& _0x5cfbx45[_0xc83d[110]][_0xc83d[43]]){_0x5cfbx11[_0x5cfbx45[_0xc83d[110]][_0xc83d[43]]]&& _0x5cfbx43[_0xc83d[106]](_0x5cfbx11[_0x5cfbx45[_0xc83d[110]][_0xc83d[43]]].toString())}}}});_0x5cfbx42= _0x5cfbx43[_0xc83d[112]](_0xc83d[111])};return _0x5cfbx42}function createDescriptionFromConfiguration(_0x5cfbx13,_0x5cfbx28,_0x5cfbx11){var _0x5cfbx48=_0xc83d[56];var _0x5cfbx43=[];if(_0x5cfbx13[_0xc83d[31]][_0xc83d[113]][_0xc83d[65]]> 0){var _0x5cfbx49=_[_0xc83d[102]](_0x5cfbx13[_0xc83d[31]].Description,[_0xc83d[49]]);_[_0xc83d[99]](_0x5cfbx49,function(_0x5cfbx45){if(_0x5cfbx45[_0xc83d[103]]=== _0xc83d[104]){_0x5cfbx43[_0xc83d[106]](_0x5cfbx45[_0xc83d[105]])}else {if(_0x5cfbx45[_0xc83d[103]]=== _0xc83d[114]){if(_0x5cfbx45[_0xc83d[115]]=== _0xc83d[104]&& _0x5cfbx45[_0xc83d[116]]){_0x5cfbx43[_0xc83d[106]](util[_0xc83d[63]](_0xc83d[117],_0x5cfbx45[_0xc83d[116]],_0x5cfbx45[_0xc83d[118]]))}else {if(_0x5cfbx45[_0xc83d[115]]=== _0xc83d[107]&& _0x5cfbx45[_0xc83d[108]]&& _0x5cfbx45[_0xc83d[116]]){var _0x5cfbx46=getValueFromPropertyName(_0x5cfbx28,_0x5cfbx45[_0xc83d[108]],_0x5cfbx13);if(_0x5cfbx46){_0x5cfbx43[_0xc83d[106]](util[_0xc83d[63]](_0xc83d[117],_0x5cfbx45[_0xc83d[116]],_0x5cfbx46.toString()))}}else {if(_0x5cfbx45[_0xc83d[115]]=== _0xc83d[109]&& _0x5cfbx45[_0xc83d[110]]&& _0x5cfbx45[_0xc83d[110]][_0xc83d[43]]&& _0x5cfbx45[_0xc83d[116]]){_0x5cfbx11[_0x5cfbx45[_0xc83d[110]][_0xc83d[43]]]&& _0x5cfbx43[_0xc83d[106]](util[_0xc83d[63]](_0xc83d[117],_0x5cfbx45[_0xc83d[116]],_0x5cfbx11[_0x5cfbx45[_0xc83d[110]][_0xc83d[43]]]))}}}}}});_0x5cfbx48= _0x5cfbx43[_0xc83d[112]](_0xc83d[119])};return _0x5cfbx48}function createCustomFieldsFromConfiguration(_0x5cfbx13,_0x5cfbx28,_0x5cfbx11){var _0x5cfbx4b=[];var _0x5cfbx4c=[];if(_0x5cfbx13[_0xc83d[31]][_0xc83d[120]][_0xc83d[65]]> 0){_0x5cfbx4b= _0x5cfbx13[_0xc83d[31]][_0xc83d[120]];_[_0xc83d[99]](_0x5cfbx4b,function(_0x5cfbx40){if(_0x5cfbx40[_0xc83d[103]]=== _0xc83d[104]&& _0x5cfbx40[_0xc83d[121]]){_0x5cfbx4c[_0xc83d[106]]({id:_0x5cfbx40[_0xc83d[121]],value:_0x5cfbx40[_0xc83d[105]]})}else {if(_0x5cfbx40[_0xc83d[103]]=== _0xc83d[107]&& _0x5cfbx40[_0xc83d[108]]&& _0x5cfbx40[_0xc83d[121]]){var _0x5cfbx46=getValueFromPropertyName(_0x5cfbx28,_0x5cfbx40[_0xc83d[108]],_0x5cfbx13);if(_0x5cfbx46){_0x5cfbx4c[_0xc83d[106]]({id:_0x5cfbx40[_0xc83d[121]],value:_0x5cfbx46.toString()})}}else {if(_0x5cfbx40[_0xc83d[103]]=== _0xc83d[109]&& _0x5cfbx40[_0xc83d[121]]&& _0x5cfbx40[_0xc83d[110]]&& _0x5cfbx40[_0xc83d[110]][_0xc83d[43]]){_0x5cfbx11[_0x5cfbx40[_0xc83d[110]][_0xc83d[43]]]&& _0x5cfbx4c[_0xc83d[106]]({id:_0x5cfbx40[_0xc83d[121]],value:_0x5cfbx11[_0x5cfbx40[_0xc83d[110]][_0xc83d[43]]].toString()})}}}})};return _0x5cfbx4c}function handleTaskDisplay(_0x5cfbx13){return function(_0x5cfbx10){if(_0x5cfbx10&& _0x5cfbx10[_0xc83d[94]]){logger[_0xc83d[14]](_0xc83d[122],_0x5cfbx10[_0xc83d[49]]);_0x5cfbx13[_0xc83d[123]]= _0x5cfbx10[_0xc83d[49]];return};return}}function handleReportIntegration(_0x5cfbx13,_0x5cfbxe,_0x5cfbx10,_0x5cfbxc,_0x5cfbx12,_0x5cfbxf){return function(){delete _0x5cfbx10[_0xc83d[49]];delete _0x5cfbx10[_0xc83d[124]];delete _0x5cfbx10[_0xc83d[125]];_0x5cfbx10[_0xc83d[126]]= _0xc83d[127];_0x5cfbx10[_0xc83d[128]]= _0x5cfbxe;_0x5cfbx10[_0xc83d[129]]= _0xc83d[94];_0x5cfbx10[_0xc83d[130]]= _0x5cfbx13[_0xc83d[123]];_0x5cfbx10[_0xc83d[131]]= _0x5cfbxc;_0x5cfbx10[_0xc83d[132]]= _0x5cfbxf;_0x5cfbx10[_0xc83d[133]]= util[_0xc83d[63]](_0xc83d[134],_0x5cfbx13[_0xc83d[22]][_0xc83d[135]],_0x5cfbx13[_0xc83d[123]]);_0x5cfbx10[_0xc83d[136]]= _0x5cfbx13[_0xc83d[31]][_0xc83d[24]][_0xc83d[136]]?_0x5cfbx13[_0xc83d[31]][_0xc83d[24]][_0xc83d[136]]:_0xc83d[137];_0x5cfbx12[_0xc83d[139]](_0xc83d[138],_0x5cfbx10);delete _0x5cfbx10[_0xc83d[136]];return ReportIntegration[_0xc83d[89]](_0x5cfbx10)}}function handleEnd(_0x5cfbx13,_0x5cfbx10,_0x5cfbxe){return function(){logger[_0xc83d[14]](util[_0xc83d[63]](_0xc83d[140],_0x5cfbx13[_0xc83d[123]],_0x5cfbx13[_0xc83d[39]].Id));_0x5cfbx13= undefined;return}}function handleError(_0x5cfbx13,_0x5cfbxe,_0x5cfbx10,_0x5cfbxc){return function(_0x5cfbx51){logger[_0xc83d[18]](_0xc83d[141]);logger[_0xc83d[18]](_0xc83d[142],_0x5cfbx51[_0xc83d[143]]);logger[_0xc83d[18]](_0xc83d[144],_0x5cfbx51[_0xc83d[145]]);_0x5cfbx13= undefined;delete _0x5cfbx10[_0xc83d[49]];delete _0x5cfbx10[_0xc83d[124]];delete _0x5cfbx10[_0xc83d[125]];_0x5cfbx10[_0xc83d[126]]= _0xc83d[127];_0x5cfbx10[_0xc83d[128]]= _0x5cfbxe;_0x5cfbx10[_0xc83d[129]]= _0xc83d[146];_0x5cfbx10[_0xc83d[131]]= _0x5cfbxc;ReportIntegration[_0xc83d[89]](_0x5cfbx10)[_0xc83d[20]](function(){return})[_0xc83d[19]](function(_0x5cfbx51){logger[_0xc83d[18]](_0xc83d[147]);return})}}function stripTrailingSlash(_0x5cfbx53){if(_0x5cfbx53[_0xc83d[148]](-1) === _0xc83d[149]){return _0x5cfbx53[_0xc83d[148]](0,_0x5cfbx53[_0xc83d[65]]- 1)};return _0x5cfbx53}module[_0xc83d[150]]= Salesforce
\ No newline at end of file