Built motion from commit b18b7a808.|1.0.23
[motion.git] / server / config / integrations / salesforce.js
index 93fe052..2fb6562 100644 (file)
@@ -1 +1 @@
-var _0xd2cb=["\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","\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"];_0xd2cb[0];var _=require(_0xd2cb[1]);var util=require(_0xd2cb[2]);var jsforce=require(_0xd2cb[3]);var moment=require(_0xd2cb[4]);var logger=require(_0xd2cb[6])(_0xd2cb[5]);var SalesforceConfiguration=require(_0xd2cb[8])[_0xd2cb[7]];var ReportIntegration=require(_0xd2cb[8])[_0xd2cb[9]];var VoiceQueue=require(_0xd2cb[8])[_0xd2cb[10]];var VoiceExtension=require(_0xd2cb[8])[_0xd2cb[11]];var Agent=require(_0xd2cb[8])[_0xd2cb[12]];function Salesforce(){logger[_0xd2cb[14]](_0xd2cb[13])}Salesforce[_0xd2cb[16]][_0xd2cb[15]]= function(_0x18f7xc,_0x18f7xd,_0x18f7xe,_0x18f7xf,_0x18f7x10,_0x18f7x11,_0x18f7x12){var _0x18f7x13={connection:undefined,configuration:undefined,agent:undefined,enduser:undefined,taskId:undefined,recordEnable:false,serverURL:undefined,agentName:undefined};if(!_0x18f7xc||  !_0x18f7xd){logger[_0xd2cb[18]](_0xd2cb[17]);return};SalesforceConfiguration[_0xd2cb[21]]({where:{id:_0x18f7xd,AccountId:_0x18f7xc},include:[{all:true,include:[{all:true}]}]})[_0xd2cb[20]](handleEntityNotFound())[_0xd2cb[20]](handleConnection(_0x18f7x13))[_0xd2cb[20]](searchMotionAgent(_0x18f7xe,_0x18f7x10))[_0xd2cb[20]](handleMotionAgent(_0x18f7x13))[_0xd2cb[20]](searchQueue(_0x18f7x10))[_0xd2cb[20]](handleQueueRecordings(_0x18f7x13,_0x18f7x10))[_0xd2cb[20]](searchRoute(_0x18f7x10))[_0xd2cb[20]](handleOutboundRecordings(_0x18f7x13,_0x18f7x10))[_0xd2cb[20]](searchAgent(_0x18f7x13,_0x18f7xe,_0x18f7x10))[_0xd2cb[20]](handleAgent(_0x18f7x13,_0x18f7xe,_0x18f7x10))[_0xd2cb[20]](searchAdmin(_0x18f7x13))[_0xd2cb[20]](handleAdmin(_0x18f7x13))[_0xd2cb[20]](searchContact(_0x18f7x13,_0x18f7xe,_0x18f7x10,_0x18f7xf))[_0xd2cb[20]](handleContact(_0x18f7x13,_0x18f7xe,_0x18f7x10,_0x18f7xf))[_0xd2cb[20]](searchLead(_0x18f7x13,_0x18f7xe,_0x18f7x10,_0x18f7xf))[_0xd2cb[20]](handleLead(_0x18f7x13,_0x18f7xe,_0x18f7x10,_0x18f7xf))[_0xd2cb[20]](leadCreation(_0x18f7x13,_0x18f7xe,_0x18f7x10,_0x18f7xf))[_0xd2cb[20]](handleLeadCreation(_0x18f7x13,_0x18f7xe,_0x18f7x10,_0x18f7xf))[_0xd2cb[20]](taskCreation(_0x18f7x13,_0x18f7x10,_0x18f7x11))[_0xd2cb[20]](handleTaskDisplay(_0x18f7x13))[_0xd2cb[20]](handleReportIntegration(_0x18f7x13,_0x18f7xe,_0x18f7x10,_0x18f7xc,_0x18f7x12,_0x18f7xf))[_0xd2cb[20]](handleEnd(_0x18f7x13))[_0xd2cb[19]](handleError(_0x18f7x13,_0x18f7xe,_0x18f7x10,_0x18f7xc))};function handleEntityNotFound(){return function(_0x18f7x15){if(!_0x18f7x15){return null};return _0x18f7x15}}function handleConnection(_0x18f7x13){return function(_0x18f7x17){_0x18f7x13[_0xd2cb[22]]=  new jsforce.Connection({oauth2:{loginUrl:_0x18f7x17[_0xd2cb[24]][_0xd2cb[23]]?_0x18f7x17[_0xd2cb[24]][_0xd2cb[23]]:_0xd2cb[25],clientId:_0x18f7x17[_0xd2cb[24]][_0xd2cb[26]],clientSecret:_0x18f7x17[_0xd2cb[24]][_0xd2cb[27]]}});var _0x18f7x18=_0x18f7x17[_0xd2cb[24]][_0xd2cb[30]][_0xd2cb[29]](_0x18f7x17[_0xd2cb[24]][_0xd2cb[28]]);_0x18f7x13[_0xd2cb[31]]= _0x18f7x17;_0x18f7x13[_0xd2cb[32]]= _0x18f7x17[_0xd2cb[24]][_0xd2cb[33]];return _0x18f7x13[_0xd2cb[22]][_0xd2cb[35]](_0x18f7x17[_0xd2cb[24]][_0xd2cb[34]],_0x18f7x18)}}function searchMotionAgent(_0x18f7xe,_0x18f7x10){return function(){var _0x18f7x1a=getAgentSearchPropertyFromChannel(_0x18f7xe);if(_0x18f7x10[_0xd2cb[36]](_0x18f7x1a)){return Agent[_0xd2cb[40]](_0xd2cb[39])[_0xd2cb[38]]({where:{name:getValueFromPropertyName(_0x18f7x10,_0x18f7x1a)},attributes:[_0xd2cb[37]]})};return}}function handleMotionAgent(_0x18f7x13){return function(_0x18f7x1c){if(_0x18f7x1c&& _0x18f7x1c[_0xd2cb[37]]){_0x18f7x13[_0xd2cb[41]]= _0x18f7x1c[_0xd2cb[37]]};return}}function searchQueue(_0x18f7x10){return function(){if(_0x18f7x10[_0xd2cb[42]]){return VoiceQueue[_0xd2cb[38]]({where:{name:_0x18f7x10[_0xd2cb[42]]},attributes:[_0xd2cb[43],_0xd2cb[44]]})}else {return}}}function handleQueueRecordings(_0x18f7x13,_0x18f7x10){return function(_0x18f7x1f){if(_0x18f7x10[_0xd2cb[42]]){if(_0x18f7x1f&& _0x18f7x1f[_0xd2cb[44]]){logger[_0xd2cb[14]](_0xd2cb[45],_0x18f7x1f[_0xd2cb[43]]);_0x18f7x13[_0xd2cb[46]]= true}else {_0x18f7x13[_0xd2cb[46]]= false;logger[_0xd2cb[14]](_0xd2cb[47])}};return}}function searchRoute(_0x18f7x10){return function(){if(_0x18f7x10[_0xd2cb[48]]){return VoiceExtension[_0xd2cb[38]]({where:{id:_0x18f7x10[_0xd2cb[48]]},attributes:[_0xd2cb[49],_0xd2cb[50]]})}else {return}}}function handleOutboundRecordings(_0x18f7x13,_0x18f7x10){return function(_0x18f7x22){if(_0x18f7x10[_0xd2cb[48]]){if(_0x18f7x22&& _0x18f7x22[_0xd2cb[50]]){logger[_0xd2cb[14]](_0xd2cb[51],_0x18f7x22[_0xd2cb[49]]);_0x18f7x13[_0xd2cb[46]]= true}else {_0x18f7x13[_0xd2cb[46]]= false;logger[_0xd2cb[14]](_0xd2cb[52])}};return}}function searchAgent(_0x18f7x13,_0x18f7xe,_0x18f7x10){return function(){if(_0x18f7x13[_0xd2cb[41]]){logger[_0xd2cb[14]](_0xd2cb[53],_0x18f7x13[_0xd2cb[41]]);return _0x18f7x13[_0xd2cb[22]][_0xd2cb[55]](_0xd2cb[12])[_0xd2cb[21]]({Name:_0x18f7x13[_0xd2cb[41]]},{Id:1,Username:1,Name:1})[_0xd2cb[54]]()};return}}function getAgentSearchPropertyFromChannel(_0x18f7xe){var _0x18f7x25=_0xd2cb[56];if(_0x18f7xe){switch(_0x18f7xe){case _0xd2cb[58]:_0x18f7x25= _0xd2cb[57];break;default:_0x18f7x25= _0xd2cb[57];logger[_0xd2cb[18]](_0xd2cb[59],_0x18f7xe)}};return _0x18f7x25}function getValueFromPropertyName(_0x18f7x10,_0x18f7x25,_0x18f7x13){if(_0x18f7x25=== _0xd2cb[60]){if(_0x18f7x13&& _0x18f7x13[_0xd2cb[46]]&& _0x18f7x13[_0xd2cb[32]]){return util[_0xd2cb[63]](_0xd2cb[61],stripTrailingSlash(_0x18f7x13[_0xd2cb[32]]),_0x18f7x10[_0xd2cb[62]])}else {return null}}else {return _[_0xd2cb[64]](_0x18f7x10,_0x18f7x25)}}function handleAgent(_0x18f7x13,_0x18f7xe,_0x18f7x28){return function(_0x18f7x10){if(_0x18f7x10&& _0x18f7x10[_0xd2cb[65]]> 0){logger[_0xd2cb[14]](_0xd2cb[66],_0x18f7x13[_0xd2cb[41]]);_0x18f7x13[_0xd2cb[39]]= getMatchObject(_0x18f7x10,_0xd2cb[67],_0x18f7x13[_0xd2cb[41]]);return _0x18f7x13[_0xd2cb[39]]};return}}function getMatchObject(_0x18f7x2a,_0x18f7x25,_0x18f7x2b){var _0x18f7x2c=_[_0xd2cb[21]](_0x18f7x2a,{property:_0x18f7x2b});if(_0x18f7x2c){return _0x18f7x2c};return _[_0xd2cb[68]](_0x18f7x2a)}function searchAdmin(_0x18f7x13){return function(_0x18f7x10){if(_0x18f7x10){return};logger[_0xd2cb[14]](_0xd2cb[69]);return _0x18f7x13[_0xd2cb[22]][_0xd2cb[70]]()}}function handleAdmin(_0x18f7x13){return function(_0x18f7x10){if(!_0x18f7x10){return};if(_0x18f7x10){logger[_0xd2cb[14]](_0xd2cb[71]);_0x18f7x13[_0xd2cb[39]]= {Id:_0x18f7x10[_0xd2cb[72]],Name:_0x18f7x10[_0xd2cb[73]],Username:_0x18f7x10[_0xd2cb[34]]}};return}}function searchContact(_0x18f7x13,_0x18f7xe,_0x18f7x10,_0x18f7xf){return function(){logger[_0xd2cb[14]](_0xd2cb[74],getValueFromPropertyName(_0x18f7x10,getEndUserSearchPropertyFromChannel(_0x18f7xe,_0x18f7xf)));var _0x18f7x30={};_0x18f7x30[getEndUserSearchQueryFromChannel(_0x18f7xe)]= getValueFromPropertyName(_0x18f7x10,getEndUserSearchPropertyFromChannel(_0x18f7xe,_0x18f7xf));return _0x18f7x13[_0xd2cb[22]][_0xd2cb[55]](_0xd2cb[75])[_0xd2cb[21]](_0x18f7x30,{Id:1,Name:1})[_0xd2cb[54]]()}}function getEndUserSearchQueryFromChannel(_0x18f7xe){var _0x18f7x25=_0xd2cb[56];if(_0x18f7xe){switch(_0x18f7xe){case _0xd2cb[58]:_0x18f7x25= _0xd2cb[76];break;default:_0x18f7x25= _0xd2cb[76];logger[_0xd2cb[18]](_0xd2cb[59],_0x18f7xe)}};return _0x18f7x25}function getEndUserSearchPropertyFromChannel(_0x18f7xe,_0x18f7xf){var _0x18f7x25=_0xd2cb[56];if(_0x18f7xe){switch(_0x18f7xe){case _0xd2cb[58]:if(_0x18f7xf=== _0xd2cb[77]){_0x18f7x25= _0xd2cb[78]}else {if(_0x18f7xf=== _0xd2cb[42]){_0x18f7x25= _0xd2cb[79]}};break;default:_0x18f7x25= _0xd2cb[79];logger[_0xd2cb[18]](_0xd2cb[59],_0x18f7xe)}};return _0x18f7x25}function getEndUserNamePropertyFromChannel(_0x18f7xe,_0x18f7xf){var _0x18f7x25=_0xd2cb[56];if(_0x18f7xe){switch(_0x18f7xe){case _0xd2cb[58]:if(_0x18f7xf=== _0xd2cb[77]){_0x18f7x25= _0xd2cb[80]}else {if(_0x18f7xf=== _0xd2cb[42]){_0x18f7x25= _0xd2cb[81]}};break;default:_0x18f7x25= _0xd2cb[81];logger[_0xd2cb[18]](_0xd2cb[59],_0x18f7xe)}};return _0x18f7x25}function handleContact(_0x18f7x13,_0x18f7xe,_0x18f7x28,_0x18f7xf){return function(_0x18f7x10){if(_0x18f7x10[_0xd2cb[65]]> 0){logger[_0xd2cb[14]](_0xd2cb[82],getValueFromPropertyName(_0x18f7x28,getEndUserSearchPropertyFromChannel(_0x18f7xe,_0x18f7xf)));_0x18f7x13[_0xd2cb[83]]= _0x18f7x10[0];return _0x18f7x13[_0xd2cb[83]]};logger[_0xd2cb[14]](_0xd2cb[84],getValueFromPropertyName(_0x18f7x28,getEndUserSearchPropertyFromChannel(_0x18f7xe,_0x18f7xf)));return}}function searchLead(_0x18f7x13,_0x18f7xe,_0x18f7x28,_0x18f7xf){return function(_0x18f7x10){if(!_0x18f7x10){logger[_0xd2cb[14]](_0xd2cb[85],getValueFromPropertyName(_0x18f7x28,getEndUserSearchPropertyFromChannel(_0x18f7xe,_0x18f7xf)));var _0x18f7x30={};_0x18f7x30[getEndUserSearchQueryFromChannel(_0x18f7xe)]= getValueFromPropertyName(_0x18f7x28,getEndUserSearchPropertyFromChannel(_0x18f7xe,_0x18f7xf));return _0x18f7x13[_0xd2cb[22]][_0xd2cb[55]](_0xd2cb[86])[_0xd2cb[21]](_0x18f7x30,{Id:1,Name:1})[_0xd2cb[54]]()};return}}function handleLead(_0x18f7x13,_0x18f7xe,_0x18f7x28,_0x18f7xf){return function(_0x18f7x10){if(_0x18f7x10&& _0x18f7x10[_0xd2cb[65]]> 0){logger[_0xd2cb[14]](_0xd2cb[87],getValueFromPropertyName(_0x18f7x28,getEndUserSearchPropertyFromChannel(_0x18f7xe,_0x18f7xf)));_0x18f7x13[_0xd2cb[83]]= _0x18f7x10[0];return _0x18f7x13[_0xd2cb[83]]};return}}function leadCreation(_0x18f7x13,_0x18f7xe,_0x18f7x28,_0x18f7xf){return function(_0x18f7x10){if(_0x18f7x10|| _0x18f7x13[_0xd2cb[83]]){return};logger[_0xd2cb[14]](_0xd2cb[88],getValueFromPropertyName(_0x18f7x28,getEndUserSearchPropertyFromChannel(_0x18f7xe,_0x18f7xf)));return _0x18f7x13[_0xd2cb[22]][_0xd2cb[55]](_0xd2cb[86])[_0xd2cb[89]](getJsonForEndUserCreation(_0x18f7xe,_0x18f7x28,_0x18f7xf))}}function getJsonForEndUserCreation(_0x18f7xe,_0x18f7x10,_0x18f7xf){var _0x18f7x39={Company:_0xd2cb[90]};switch(_0x18f7xe){case _0xd2cb[58]:if(_0x18f7xf=== _0xd2cb[42]){if(isValidName(_0x18f7x10[_0xd2cb[81]])){_0x18f7x39[_0xd2cb[91]]= getValueFromPropertyName(_0x18f7x10,getEndUserNamePropertyFromChannel(_0x18f7xe,_0x18f7xf))}else {_0x18f7x39[_0xd2cb[91]]= util[_0xd2cb[63]](_0xd2cb[92],getValueFromPropertyName(_0x18f7x10,getEndUserSearchPropertyFromChannel(_0x18f7xe,_0x18f7xf)))}}else {if(_0x18f7xf=== _0xd2cb[77]){if(isValidName(_0x18f7x10[_0xd2cb[80]])){_0x18f7x39[_0xd2cb[91]]= getValueFromPropertyName(_0x18f7x10,getEndUserNamePropertyFromChannel(_0x18f7xe,_0x18f7xf))}else {_0x18f7x39[_0xd2cb[91]]= util[_0xd2cb[63]](_0xd2cb[92],getValueFromPropertyName(_0x18f7x10,getEndUserSearchPropertyFromChannel(_0x18f7xe,_0x18f7xf)))}}};_0x18f7x39[_0xd2cb[76]]= getValueFromPropertyName(_0x18f7x10,getEndUserSearchPropertyFromChannel(_0x18f7xe,_0x18f7xf));break;default:logger[_0xd2cb[18]](_0xd2cb[59],_0x18f7xe)};return _0x18f7x39}function isValidName(_0x18f7x3b){return _0x18f7x3b&& _0x18f7x3b!== _0xd2cb[93]}function handleLeadCreation(_0x18f7x13,_0x18f7xe,_0x18f7x28,_0x18f7xf){return function(_0x18f7x10){if(!_0x18f7x10){return};if(_0x18f7x10&& _0x18f7x10[_0xd2cb[94]]){logger[_0xd2cb[14]](_0xd2cb[95],getValueFromPropertyName(_0x18f7x28,getEndUserSearchPropertyFromChannel(_0x18f7xe,_0x18f7xf)));_0x18f7x13[_0xd2cb[83]]= {Id:_0x18f7x10[_0xd2cb[49]]}};return}}function taskCreation(_0x18f7x13,_0x18f7x28,_0x18f7x11){return function(){var _0x18f7x3e={WhoId:_0x18f7x13[_0xd2cb[83]][_0xd2cb[96]],OwnerId:_0x18f7x13[_0xd2cb[39]][_0xd2cb[96]],ActivityDate:moment[_0xd2cb[97]](),IsReminderSet:false,IsRecurrence:false,Subject:createSubjectFromConfiguration(_0x18f7x13,_0x18f7x28,_0x18f7x11),Description:createDescriptionFromConfiguration(_0x18f7x13,_0x18f7x28,_0x18f7x11)};var _0x18f7x3f=createCustomFieldsFromConfiguration(_0x18f7x13,_0x18f7x28,_0x18f7x11);if(_0x18f7x3f[_0xd2cb[65]]> 0){_[_0xd2cb[99]](_0x18f7x3f,function(_0x18f7x40){_0x18f7x3e[_0x18f7x40[_0xd2cb[49]]]= _0x18f7x40[_0xd2cb[98]]})};return _0x18f7x13[_0xd2cb[22]][_0xd2cb[55]](_0xd2cb[100])[_0xd2cb[89]](_0x18f7x3e)}}function createSubjectFromConfiguration(_0x18f7x13,_0x18f7x28,_0x18f7x11){var _0x18f7x42=_0xd2cb[56];var _0x18f7x43=[];if(_0x18f7x13[_0xd2cb[31]][_0xd2cb[101]][_0xd2cb[65]]> 0){var _0x18f7x44=_[_0xd2cb[102]](_0x18f7x13[_0xd2cb[31]].Subject,[_0xd2cb[49]]);_[_0xd2cb[99]](_0x18f7x44,function(_0x18f7x45){if(_0x18f7x45[_0xd2cb[103]]=== _0xd2cb[104]){_0x18f7x43[_0xd2cb[106]](_0x18f7x45[_0xd2cb[105]])}else {if(_0x18f7x45[_0xd2cb[103]]=== _0xd2cb[107]&& _0x18f7x45[_0xd2cb[108]]){var _0x18f7x46=getValueFromPropertyName(_0x18f7x28,_0x18f7x45[_0xd2cb[108]],_0x18f7x13);if(_0x18f7x46){_0x18f7x43[_0xd2cb[106]](_0x18f7x46.toString())}}else {if(_0x18f7x45[_0xd2cb[103]]=== _0xd2cb[109]&& _0x18f7x45[_0xd2cb[110]]&& _0x18f7x45[_0xd2cb[110]][_0xd2cb[43]]){_0x18f7x11[_0x18f7x45[_0xd2cb[110]][_0xd2cb[43]]]&& _0x18f7x43[_0xd2cb[106]](_0x18f7x11[_0x18f7x45[_0xd2cb[110]][_0xd2cb[43]]].toString())}}}});_0x18f7x42= _0x18f7x43[_0xd2cb[112]](_0xd2cb[111])};return _0x18f7x42}function createDescriptionFromConfiguration(_0x18f7x13,_0x18f7x28,_0x18f7x11){var _0x18f7x48=_0xd2cb[56];var _0x18f7x43=[];if(_0x18f7x13[_0xd2cb[31]][_0xd2cb[113]][_0xd2cb[65]]> 0){var _0x18f7x49=_[_0xd2cb[102]](_0x18f7x13[_0xd2cb[31]].Description,[_0xd2cb[49]]);_[_0xd2cb[99]](_0x18f7x49,function(_0x18f7x45){if(_0x18f7x45[_0xd2cb[103]]=== _0xd2cb[104]){_0x18f7x43[_0xd2cb[106]](_0x18f7x45[_0xd2cb[105]])}else {if(_0x18f7x45[_0xd2cb[103]]=== _0xd2cb[114]){if(_0x18f7x45[_0xd2cb[115]]=== _0xd2cb[104]&& _0x18f7x45[_0xd2cb[116]]){_0x18f7x43[_0xd2cb[106]](util[_0xd2cb[63]](_0xd2cb[117],_0x18f7x45[_0xd2cb[116]],_0x18f7x45[_0xd2cb[118]]))}else {if(_0x18f7x45[_0xd2cb[115]]=== _0xd2cb[107]&& _0x18f7x45[_0xd2cb[108]]&& _0x18f7x45[_0xd2cb[116]]){var _0x18f7x46=getValueFromPropertyName(_0x18f7x28,_0x18f7x45[_0xd2cb[108]],_0x18f7x13);if(_0x18f7x46){_0x18f7x43[_0xd2cb[106]](util[_0xd2cb[63]](_0xd2cb[117],_0x18f7x45[_0xd2cb[116]],_0x18f7x46.toString()))}}else {if(_0x18f7x45[_0xd2cb[115]]=== _0xd2cb[109]&& _0x18f7x45[_0xd2cb[110]]&& _0x18f7x45[_0xd2cb[110]][_0xd2cb[43]]&& _0x18f7x45[_0xd2cb[116]]){_0x18f7x11[_0x18f7x45[_0xd2cb[110]][_0xd2cb[43]]]&& _0x18f7x43[_0xd2cb[106]](util[_0xd2cb[63]](_0xd2cb[117],_0x18f7x45[_0xd2cb[116]],_0x18f7x11[_0x18f7x45[_0xd2cb[110]][_0xd2cb[43]]]))}}}}}});_0x18f7x48= _0x18f7x43[_0xd2cb[112]](_0xd2cb[119])};return _0x18f7x48}function createCustomFieldsFromConfiguration(_0x18f7x13,_0x18f7x28,_0x18f7x11){var _0x18f7x4b=[];var _0x18f7x4c=[];if(_0x18f7x13[_0xd2cb[31]][_0xd2cb[120]][_0xd2cb[65]]> 0){_0x18f7x4b= _0x18f7x13[_0xd2cb[31]][_0xd2cb[120]];_[_0xd2cb[99]](_0x18f7x4b,function(_0x18f7x40){if(_0x18f7x40[_0xd2cb[103]]=== _0xd2cb[104]&& _0x18f7x40[_0xd2cb[121]]){_0x18f7x4c[_0xd2cb[106]]({id:_0x18f7x40[_0xd2cb[121]],value:_0x18f7x40[_0xd2cb[105]]})}else {if(_0x18f7x40[_0xd2cb[103]]=== _0xd2cb[107]&& _0x18f7x40[_0xd2cb[108]]&& _0x18f7x40[_0xd2cb[121]]){var _0x18f7x46=getValueFromPropertyName(_0x18f7x28,_0x18f7x40[_0xd2cb[108]],_0x18f7x13);if(_0x18f7x46){_0x18f7x4c[_0xd2cb[106]]({id:_0x18f7x40[_0xd2cb[121]],value:_0x18f7x46.toString()})}}else {if(_0x18f7x40[_0xd2cb[103]]=== _0xd2cb[109]&& _0x18f7x40[_0xd2cb[121]]&& _0x18f7x40[_0xd2cb[110]]&& _0x18f7x40[_0xd2cb[110]][_0xd2cb[43]]){_0x18f7x11[_0x18f7x40[_0xd2cb[110]][_0xd2cb[43]]]&& _0x18f7x4c[_0xd2cb[106]]({id:_0x18f7x40[_0xd2cb[121]],value:_0x18f7x11[_0x18f7x40[_0xd2cb[110]][_0xd2cb[43]]].toString()})}}}})};return _0x18f7x4c}function handleTaskDisplay(_0x18f7x13){return function(_0x18f7x10){if(_0x18f7x10&& _0x18f7x10[_0xd2cb[94]]){logger[_0xd2cb[14]](_0xd2cb[122],_0x18f7x10[_0xd2cb[49]]);_0x18f7x13[_0xd2cb[123]]= _0x18f7x10[_0xd2cb[49]];return};return}}function handleReportIntegration(_0x18f7x13,_0x18f7xe,_0x18f7x10,_0x18f7xc,_0x18f7x12,_0x18f7xf){return function(){delete _0x18f7x10[_0xd2cb[49]];delete _0x18f7x10[_0xd2cb[124]];delete _0x18f7x10[_0xd2cb[125]];_0x18f7x10[_0xd2cb[126]]= _0xd2cb[127];_0x18f7x10[_0xd2cb[128]]= _0x18f7xe;_0x18f7x10[_0xd2cb[129]]= _0xd2cb[94];_0x18f7x10[_0xd2cb[130]]= _0x18f7x13[_0xd2cb[123]];_0x18f7x10[_0xd2cb[131]]= _0x18f7xc;_0x18f7x10[_0xd2cb[132]]= _0x18f7xf;_0x18f7x10[_0xd2cb[133]]= util[_0xd2cb[63]](_0xd2cb[134],_0x18f7x13[_0xd2cb[22]][_0xd2cb[135]],_0x18f7x13[_0xd2cb[123]]);_0x18f7x12[_0xd2cb[137]](_0xd2cb[136],_0x18f7x10);return ReportIntegration[_0xd2cb[89]](_0x18f7x10)}}function handleEnd(_0x18f7x13,_0x18f7x10,_0x18f7xe){return function(){logger[_0xd2cb[14]](util[_0xd2cb[63]](_0xd2cb[138],_0x18f7x13[_0xd2cb[123]],_0x18f7x13[_0xd2cb[39]].Id));_0x18f7x13= undefined;return}}function handleError(_0x18f7x13,_0x18f7xe,_0x18f7x10,_0x18f7xc){return function(_0x18f7x51){logger[_0xd2cb[18]](_0xd2cb[139]);logger[_0xd2cb[18]](_0xd2cb[140],_0x18f7x51[_0xd2cb[141]]);logger[_0xd2cb[18]](_0xd2cb[142],_0x18f7x51[_0xd2cb[143]]);_0x18f7x13= undefined;delete _0x18f7x10[_0xd2cb[49]];delete _0x18f7x10[_0xd2cb[124]];delete _0x18f7x10[_0xd2cb[125]];_0x18f7x10[_0xd2cb[126]]= _0xd2cb[127];_0x18f7x10[_0xd2cb[128]]= _0x18f7xe;_0x18f7x10[_0xd2cb[129]]= _0xd2cb[144];_0x18f7x10[_0xd2cb[131]]= _0x18f7xc;ReportIntegration[_0xd2cb[89]](_0x18f7x10)[_0xd2cb[20]](function(){return})[_0xd2cb[19]](function(_0x18f7x51){logger[_0xd2cb[18]](_0xd2cb[145]);return})}}function stripTrailingSlash(_0x18f7x53){if(_0x18f7x53[_0xd2cb[146]](-1) === _0xd2cb[147]){return _0x18f7x53[_0xd2cb[146]](0,_0x18f7x53[_0xd2cb[65]]- 1)};return _0x18f7x53}module[_0xd2cb[148]]= Salesforce
\ No newline at end of file
+var _0x56c2=["\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","\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"];_0x56c2[0];var _=require(_0x56c2[1]);var util=require(_0x56c2[2]);var jsforce=require(_0x56c2[3]);var moment=require(_0x56c2[4]);var logger=require(_0x56c2[6])(_0x56c2[5]);var SalesforceConfiguration=require(_0x56c2[8])[_0x56c2[7]];var ReportIntegration=require(_0x56c2[8])[_0x56c2[9]];var VoiceQueue=require(_0x56c2[8])[_0x56c2[10]];var VoiceExtension=require(_0x56c2[8])[_0x56c2[11]];var Agent=require(_0x56c2[8])[_0x56c2[12]];function Salesforce(){logger[_0x56c2[14]](_0x56c2[13])}Salesforce[_0x56c2[16]][_0x56c2[15]]= function(_0x1b91xc,_0x1b91xd,_0x1b91xe,_0x1b91xf,_0x1b91x10,_0x1b91x11,_0x1b91x12){var _0x1b91x13={connection:undefined,configuration:undefined,agent:undefined,enduser:undefined,taskId:undefined,recordEnable:false,serverURL:undefined,agentName:undefined};if(!_0x1b91xc||  !_0x1b91xd){logger[_0x56c2[18]](_0x56c2[17]);return};SalesforceConfiguration[_0x56c2[21]]({where:{id:_0x1b91xd,AccountId:_0x1b91xc},include:[{all:true,include:[{all:true}]}]})[_0x56c2[20]](handleEntityNotFound())[_0x56c2[20]](handleConnection(_0x1b91x13))[_0x56c2[20]](searchMotionAgent(_0x1b91xe,_0x1b91x10))[_0x56c2[20]](handleMotionAgent(_0x1b91x13))[_0x56c2[20]](searchQueue(_0x1b91x10))[_0x56c2[20]](handleQueueRecordings(_0x1b91x13,_0x1b91x10))[_0x56c2[20]](searchRoute(_0x1b91x10))[_0x56c2[20]](handleOutboundRecordings(_0x1b91x13,_0x1b91x10))[_0x56c2[20]](searchAgent(_0x1b91x13,_0x1b91xe,_0x1b91x10))[_0x56c2[20]](handleAgent(_0x1b91x13,_0x1b91xe,_0x1b91x10))[_0x56c2[20]](searchAdmin(_0x1b91x13))[_0x56c2[20]](handleAdmin(_0x1b91x13))[_0x56c2[20]](searchContact(_0x1b91x13,_0x1b91xe,_0x1b91x10,_0x1b91xf))[_0x56c2[20]](handleContact(_0x1b91x13,_0x1b91xe,_0x1b91x10,_0x1b91xf))[_0x56c2[20]](searchLead(_0x1b91x13,_0x1b91xe,_0x1b91x10,_0x1b91xf))[_0x56c2[20]](handleLead(_0x1b91x13,_0x1b91xe,_0x1b91x10,_0x1b91xf))[_0x56c2[20]](leadCreation(_0x1b91x13,_0x1b91xe,_0x1b91x10,_0x1b91xf))[_0x56c2[20]](handleLeadCreation(_0x1b91x13,_0x1b91xe,_0x1b91x10,_0x1b91xf))[_0x56c2[20]](taskCreation(_0x1b91x13,_0x1b91x10,_0x1b91x11))[_0x56c2[20]](handleTaskDisplay(_0x1b91x13))[_0x56c2[20]](handleReportIntegration(_0x1b91x13,_0x1b91xe,_0x1b91x10,_0x1b91xc,_0x1b91x12,_0x1b91xf))[_0x56c2[20]](handleEnd(_0x1b91x13))[_0x56c2[19]](handleError(_0x1b91x13,_0x1b91xe,_0x1b91x10,_0x1b91xc))};function handleEntityNotFound(){return function(_0x1b91x15){if(!_0x1b91x15){return null};return _0x1b91x15}}function handleConnection(_0x1b91x13){return function(_0x1b91x17){_0x1b91x13[_0x56c2[22]]=  new jsforce.Connection({oauth2:{loginUrl:_0x1b91x17[_0x56c2[24]][_0x56c2[23]]?_0x1b91x17[_0x56c2[24]][_0x56c2[23]]:_0x56c2[25],clientId:_0x1b91x17[_0x56c2[24]][_0x56c2[26]],clientSecret:_0x1b91x17[_0x56c2[24]][_0x56c2[27]]}});var _0x1b91x18=_0x1b91x17[_0x56c2[24]][_0x56c2[30]][_0x56c2[29]](_0x1b91x17[_0x56c2[24]][_0x56c2[28]]);_0x1b91x13[_0x56c2[31]]= _0x1b91x17;_0x1b91x13[_0x56c2[32]]= _0x1b91x17[_0x56c2[24]][_0x56c2[33]];return _0x1b91x13[_0x56c2[22]][_0x56c2[35]](_0x1b91x17[_0x56c2[24]][_0x56c2[34]],_0x1b91x18)}}function searchMotionAgent(_0x1b91xe,_0x1b91x10){return function(){var _0x1b91x1a=getAgentSearchPropertyFromChannel(_0x1b91xe);if(_0x1b91x10[_0x56c2[36]](_0x1b91x1a)){return Agent[_0x56c2[40]](_0x56c2[39])[_0x56c2[38]]({where:{name:getValueFromPropertyName(_0x1b91x10,_0x1b91x1a)},attributes:[_0x56c2[37]]})};return}}function handleMotionAgent(_0x1b91x13){return function(_0x1b91x1c){if(_0x1b91x1c&& _0x1b91x1c[_0x56c2[37]]){_0x1b91x13[_0x56c2[41]]= _0x1b91x1c[_0x56c2[37]]};return}}function searchQueue(_0x1b91x10){return function(){if(_0x1b91x10[_0x56c2[42]]){return VoiceQueue[_0x56c2[38]]({where:{name:_0x1b91x10[_0x56c2[42]]},attributes:[_0x56c2[43],_0x56c2[44]]})}else {return}}}function handleQueueRecordings(_0x1b91x13,_0x1b91x10){return function(_0x1b91x1f){if(_0x1b91x10[_0x56c2[42]]){if(_0x1b91x1f&& _0x1b91x1f[_0x56c2[44]]){logger[_0x56c2[14]](_0x56c2[45],_0x1b91x1f[_0x56c2[43]]);_0x1b91x13[_0x56c2[46]]= true}else {_0x1b91x13[_0x56c2[46]]= false;logger[_0x56c2[14]](_0x56c2[47])}};return}}function searchRoute(_0x1b91x10){return function(){if(_0x1b91x10[_0x56c2[48]]){return VoiceExtension[_0x56c2[38]]({where:{id:_0x1b91x10[_0x56c2[48]]},attributes:[_0x56c2[49],_0x56c2[50]]})}else {return}}}function handleOutboundRecordings(_0x1b91x13,_0x1b91x10){return function(_0x1b91x22){if(_0x1b91x10[_0x56c2[48]]){if(_0x1b91x22&& _0x1b91x22[_0x56c2[50]]){logger[_0x56c2[14]](_0x56c2[51],_0x1b91x22[_0x56c2[49]]);_0x1b91x13[_0x56c2[46]]= true}else {_0x1b91x13[_0x56c2[46]]= false;logger[_0x56c2[14]](_0x56c2[52])}};return}}function searchAgent(_0x1b91x13,_0x1b91xe,_0x1b91x10){return function(){if(_0x1b91x13[_0x56c2[41]]){logger[_0x56c2[14]](_0x56c2[53],_0x1b91x13[_0x56c2[41]]);return _0x1b91x13[_0x56c2[22]][_0x56c2[55]](_0x56c2[12])[_0x56c2[21]]({Name:_0x1b91x13[_0x56c2[41]]},{Id:1,Username:1,Name:1})[_0x56c2[54]]()};return}}function getAgentSearchPropertyFromChannel(_0x1b91xe){var _0x1b91x25=_0x56c2[56];if(_0x1b91xe){switch(_0x1b91xe){case _0x56c2[58]:_0x1b91x25= _0x56c2[57];break;default:_0x1b91x25= _0x56c2[57];logger[_0x56c2[18]](_0x56c2[59],_0x1b91xe)}};return _0x1b91x25}function getValueFromPropertyName(_0x1b91x10,_0x1b91x25,_0x1b91x13){if(_0x1b91x25=== _0x56c2[60]){if(_0x1b91x13&& _0x1b91x13[_0x56c2[46]]&& _0x1b91x13[_0x56c2[32]]){return util[_0x56c2[63]](_0x56c2[61],stripTrailingSlash(_0x1b91x13[_0x56c2[32]]),_0x1b91x10[_0x56c2[62]])}else {return null}}else {return _[_0x56c2[64]](_0x1b91x10,_0x1b91x25)}}function handleAgent(_0x1b91x13,_0x1b91xe,_0x1b91x28){return function(_0x1b91x10){if(_0x1b91x10&& _0x1b91x10[_0x56c2[65]]> 0){logger[_0x56c2[14]](_0x56c2[66],_0x1b91x13[_0x56c2[41]]);_0x1b91x13[_0x56c2[39]]= getMatchObject(_0x1b91x10,_0x56c2[67],_0x1b91x13[_0x56c2[41]]);return _0x1b91x13[_0x56c2[39]]};return}}function getMatchObject(_0x1b91x2a,_0x1b91x25,_0x1b91x2b){var _0x1b91x2c=_[_0x56c2[21]](_0x1b91x2a,{property:_0x1b91x2b});if(_0x1b91x2c){return _0x1b91x2c};return _[_0x56c2[68]](_0x1b91x2a)}function searchAdmin(_0x1b91x13){return function(_0x1b91x10){if(_0x1b91x10){return};logger[_0x56c2[14]](_0x56c2[69]);return _0x1b91x13[_0x56c2[22]][_0x56c2[70]]()}}function handleAdmin(_0x1b91x13){return function(_0x1b91x10){if(!_0x1b91x10){return};if(_0x1b91x10){logger[_0x56c2[14]](_0x56c2[71]);_0x1b91x13[_0x56c2[39]]= {Id:_0x1b91x10[_0x56c2[72]],Name:_0x1b91x10[_0x56c2[73]],Username:_0x1b91x10[_0x56c2[34]]}};return}}function searchContact(_0x1b91x13,_0x1b91xe,_0x1b91x10,_0x1b91xf){return function(){logger[_0x56c2[14]](_0x56c2[74],getValueFromPropertyName(_0x1b91x10,getEndUserSearchPropertyFromChannel(_0x1b91xe,_0x1b91xf)));var _0x1b91x30={};_0x1b91x30[getEndUserSearchQueryFromChannel(_0x1b91xe)]= getValueFromPropertyName(_0x1b91x10,getEndUserSearchPropertyFromChannel(_0x1b91xe,_0x1b91xf));return _0x1b91x13[_0x56c2[22]][_0x56c2[55]](_0x56c2[75])[_0x56c2[21]](_0x1b91x30,{Id:1,Name:1})[_0x56c2[54]]()}}function getEndUserSearchQueryFromChannel(_0x1b91xe){var _0x1b91x25=_0x56c2[56];if(_0x1b91xe){switch(_0x1b91xe){case _0x56c2[58]:_0x1b91x25= _0x56c2[76];break;default:_0x1b91x25= _0x56c2[76];logger[_0x56c2[18]](_0x56c2[59],_0x1b91xe)}};return _0x1b91x25}function getEndUserSearchPropertyFromChannel(_0x1b91xe,_0x1b91xf){var _0x1b91x25=_0x56c2[56];if(_0x1b91xe){switch(_0x1b91xe){case _0x56c2[58]:if(_0x1b91xf=== _0x56c2[77]){_0x1b91x25= _0x56c2[78]}else {if(_0x1b91xf=== _0x56c2[42]){_0x1b91x25= _0x56c2[79]}};break;default:_0x1b91x25= _0x56c2[79];logger[_0x56c2[18]](_0x56c2[59],_0x1b91xe)}};return _0x1b91x25}function getEndUserNamePropertyFromChannel(_0x1b91xe,_0x1b91xf){var _0x1b91x25=_0x56c2[56];if(_0x1b91xe){switch(_0x1b91xe){case _0x56c2[58]:if(_0x1b91xf=== _0x56c2[77]){_0x1b91x25= _0x56c2[80]}else {if(_0x1b91xf=== _0x56c2[42]){_0x1b91x25= _0x56c2[81]}};break;default:_0x1b91x25= _0x56c2[81];logger[_0x56c2[18]](_0x56c2[59],_0x1b91xe)}};return _0x1b91x25}function handleContact(_0x1b91x13,_0x1b91xe,_0x1b91x28,_0x1b91xf){return function(_0x1b91x10){if(_0x1b91x10[_0x56c2[65]]> 0){logger[_0x56c2[14]](_0x56c2[82],getValueFromPropertyName(_0x1b91x28,getEndUserSearchPropertyFromChannel(_0x1b91xe,_0x1b91xf)));_0x1b91x13[_0x56c2[83]]= _0x1b91x10[0];return _0x1b91x13[_0x56c2[83]]};logger[_0x56c2[14]](_0x56c2[84],getValueFromPropertyName(_0x1b91x28,getEndUserSearchPropertyFromChannel(_0x1b91xe,_0x1b91xf)));return}}function searchLead(_0x1b91x13,_0x1b91xe,_0x1b91x28,_0x1b91xf){return function(_0x1b91x10){if(!_0x1b91x10){logger[_0x56c2[14]](_0x56c2[85],getValueFromPropertyName(_0x1b91x28,getEndUserSearchPropertyFromChannel(_0x1b91xe,_0x1b91xf)));var _0x1b91x30={};_0x1b91x30[getEndUserSearchQueryFromChannel(_0x1b91xe)]= getValueFromPropertyName(_0x1b91x28,getEndUserSearchPropertyFromChannel(_0x1b91xe,_0x1b91xf));return _0x1b91x13[_0x56c2[22]][_0x56c2[55]](_0x56c2[86])[_0x56c2[21]](_0x1b91x30,{Id:1,Name:1})[_0x56c2[54]]()};return}}function handleLead(_0x1b91x13,_0x1b91xe,_0x1b91x28,_0x1b91xf){return function(_0x1b91x10){if(_0x1b91x10&& _0x1b91x10[_0x56c2[65]]> 0){logger[_0x56c2[14]](_0x56c2[87],getValueFromPropertyName(_0x1b91x28,getEndUserSearchPropertyFromChannel(_0x1b91xe,_0x1b91xf)));_0x1b91x13[_0x56c2[83]]= _0x1b91x10[0];return _0x1b91x13[_0x56c2[83]]};return}}function leadCreation(_0x1b91x13,_0x1b91xe,_0x1b91x28,_0x1b91xf){return function(_0x1b91x10){if(_0x1b91x10|| _0x1b91x13[_0x56c2[83]]){return};logger[_0x56c2[14]](_0x56c2[88],getValueFromPropertyName(_0x1b91x28,getEndUserSearchPropertyFromChannel(_0x1b91xe,_0x1b91xf)));return _0x1b91x13[_0x56c2[22]][_0x56c2[55]](_0x56c2[86])[_0x56c2[89]](getJsonForEndUserCreation(_0x1b91xe,_0x1b91x28,_0x1b91xf))}}function getJsonForEndUserCreation(_0x1b91xe,_0x1b91x10,_0x1b91xf){var _0x1b91x39={Company:_0x56c2[90]};switch(_0x1b91xe){case _0x56c2[58]:if(_0x1b91xf=== _0x56c2[42]){if(isValidName(_0x1b91x10[_0x56c2[81]])){_0x1b91x39[_0x56c2[91]]= getValueFromPropertyName(_0x1b91x10,getEndUserNamePropertyFromChannel(_0x1b91xe,_0x1b91xf))}else {_0x1b91x39[_0x56c2[91]]= util[_0x56c2[63]](_0x56c2[92],getValueFromPropertyName(_0x1b91x10,getEndUserSearchPropertyFromChannel(_0x1b91xe,_0x1b91xf)))}}else {if(_0x1b91xf=== _0x56c2[77]){if(isValidName(_0x1b91x10[_0x56c2[80]])){_0x1b91x39[_0x56c2[91]]= getValueFromPropertyName(_0x1b91x10,getEndUserNamePropertyFromChannel(_0x1b91xe,_0x1b91xf))}else {_0x1b91x39[_0x56c2[91]]= util[_0x56c2[63]](_0x56c2[92],getValueFromPropertyName(_0x1b91x10,getEndUserSearchPropertyFromChannel(_0x1b91xe,_0x1b91xf)))}}};_0x1b91x39[_0x56c2[76]]= getValueFromPropertyName(_0x1b91x10,getEndUserSearchPropertyFromChannel(_0x1b91xe,_0x1b91xf));break;default:logger[_0x56c2[18]](_0x56c2[59],_0x1b91xe)};return _0x1b91x39}function isValidName(_0x1b91x3b){return _0x1b91x3b&& _0x1b91x3b!== _0x56c2[93]}function handleLeadCreation(_0x1b91x13,_0x1b91xe,_0x1b91x28,_0x1b91xf){return function(_0x1b91x10){if(!_0x1b91x10){return};if(_0x1b91x10&& _0x1b91x10[_0x56c2[94]]){logger[_0x56c2[14]](_0x56c2[95],getValueFromPropertyName(_0x1b91x28,getEndUserSearchPropertyFromChannel(_0x1b91xe,_0x1b91xf)));_0x1b91x13[_0x56c2[83]]= {Id:_0x1b91x10[_0x56c2[49]]}};return}}function taskCreation(_0x1b91x13,_0x1b91x28,_0x1b91x11){return function(){var _0x1b91x3e={WhoId:_0x1b91x13[_0x56c2[83]][_0x56c2[96]],OwnerId:_0x1b91x13[_0x56c2[39]][_0x56c2[96]],ActivityDate:moment[_0x56c2[97]](),IsReminderSet:false,IsRecurrence:false,Subject:createSubjectFromConfiguration(_0x1b91x13,_0x1b91x28,_0x1b91x11),Description:createDescriptionFromConfiguration(_0x1b91x13,_0x1b91x28,_0x1b91x11)};var _0x1b91x3f=createCustomFieldsFromConfiguration(_0x1b91x13,_0x1b91x28,_0x1b91x11);if(_0x1b91x3f[_0x56c2[65]]> 0){_[_0x56c2[99]](_0x1b91x3f,function(_0x1b91x40){_0x1b91x3e[_0x1b91x40[_0x56c2[49]]]= _0x1b91x40[_0x56c2[98]]})};return _0x1b91x13[_0x56c2[22]][_0x56c2[55]](_0x56c2[100])[_0x56c2[89]](_0x1b91x3e)}}function createSubjectFromConfiguration(_0x1b91x13,_0x1b91x28,_0x1b91x11){var _0x1b91x42=_0x56c2[56];var _0x1b91x43=[];if(_0x1b91x13[_0x56c2[31]][_0x56c2[101]][_0x56c2[65]]> 0){var _0x1b91x44=_[_0x56c2[102]](_0x1b91x13[_0x56c2[31]].Subject,[_0x56c2[49]]);_[_0x56c2[99]](_0x1b91x44,function(_0x1b91x45){if(_0x1b91x45[_0x56c2[103]]=== _0x56c2[104]){_0x1b91x43[_0x56c2[106]](_0x1b91x45[_0x56c2[105]])}else {if(_0x1b91x45[_0x56c2[103]]=== _0x56c2[107]&& _0x1b91x45[_0x56c2[108]]){var _0x1b91x46=getValueFromPropertyName(_0x1b91x28,_0x1b91x45[_0x56c2[108]],_0x1b91x13);if(_0x1b91x46){_0x1b91x43[_0x56c2[106]](_0x1b91x46.toString())}}else {if(_0x1b91x45[_0x56c2[103]]=== _0x56c2[109]&& _0x1b91x45[_0x56c2[110]]&& _0x1b91x45[_0x56c2[110]][_0x56c2[43]]){_0x1b91x11[_0x1b91x45[_0x56c2[110]][_0x56c2[43]]]&& _0x1b91x43[_0x56c2[106]](_0x1b91x11[_0x1b91x45[_0x56c2[110]][_0x56c2[43]]].toString())}}}});_0x1b91x42= _0x1b91x43[_0x56c2[112]](_0x56c2[111])};return _0x1b91x42}function createDescriptionFromConfiguration(_0x1b91x13,_0x1b91x28,_0x1b91x11){var _0x1b91x48=_0x56c2[56];var _0x1b91x43=[];if(_0x1b91x13[_0x56c2[31]][_0x56c2[113]][_0x56c2[65]]> 0){var _0x1b91x49=_[_0x56c2[102]](_0x1b91x13[_0x56c2[31]].Description,[_0x56c2[49]]);_[_0x56c2[99]](_0x1b91x49,function(_0x1b91x45){if(_0x1b91x45[_0x56c2[103]]=== _0x56c2[104]){_0x1b91x43[_0x56c2[106]](_0x1b91x45[_0x56c2[105]])}else {if(_0x1b91x45[_0x56c2[103]]=== _0x56c2[114]){if(_0x1b91x45[_0x56c2[115]]=== _0x56c2[104]&& _0x1b91x45[_0x56c2[116]]){_0x1b91x43[_0x56c2[106]](util[_0x56c2[63]](_0x56c2[117],_0x1b91x45[_0x56c2[116]],_0x1b91x45[_0x56c2[118]]))}else {if(_0x1b91x45[_0x56c2[115]]=== _0x56c2[107]&& _0x1b91x45[_0x56c2[108]]&& _0x1b91x45[_0x56c2[116]]){var _0x1b91x46=getValueFromPropertyName(_0x1b91x28,_0x1b91x45[_0x56c2[108]],_0x1b91x13);if(_0x1b91x46){_0x1b91x43[_0x56c2[106]](util[_0x56c2[63]](_0x56c2[117],_0x1b91x45[_0x56c2[116]],_0x1b91x46.toString()))}}else {if(_0x1b91x45[_0x56c2[115]]=== _0x56c2[109]&& _0x1b91x45[_0x56c2[110]]&& _0x1b91x45[_0x56c2[110]][_0x56c2[43]]&& _0x1b91x45[_0x56c2[116]]){_0x1b91x11[_0x1b91x45[_0x56c2[110]][_0x56c2[43]]]&& _0x1b91x43[_0x56c2[106]](util[_0x56c2[63]](_0x56c2[117],_0x1b91x45[_0x56c2[116]],_0x1b91x11[_0x1b91x45[_0x56c2[110]][_0x56c2[43]]]))}}}}}});_0x1b91x48= _0x1b91x43[_0x56c2[112]](_0x56c2[119])};return _0x1b91x48}function createCustomFieldsFromConfiguration(_0x1b91x13,_0x1b91x28,_0x1b91x11){var _0x1b91x4b=[];var _0x1b91x4c=[];if(_0x1b91x13[_0x56c2[31]][_0x56c2[120]][_0x56c2[65]]> 0){_0x1b91x4b= _0x1b91x13[_0x56c2[31]][_0x56c2[120]];_[_0x56c2[99]](_0x1b91x4b,function(_0x1b91x40){if(_0x1b91x40[_0x56c2[103]]=== _0x56c2[104]&& _0x1b91x40[_0x56c2[121]]){_0x1b91x4c[_0x56c2[106]]({id:_0x1b91x40[_0x56c2[121]],value:_0x1b91x40[_0x56c2[105]]})}else {if(_0x1b91x40[_0x56c2[103]]=== _0x56c2[107]&& _0x1b91x40[_0x56c2[108]]&& _0x1b91x40[_0x56c2[121]]){var _0x1b91x46=getValueFromPropertyName(_0x1b91x28,_0x1b91x40[_0x56c2[108]],_0x1b91x13);if(_0x1b91x46){_0x1b91x4c[_0x56c2[106]]({id:_0x1b91x40[_0x56c2[121]],value:_0x1b91x46.toString()})}}else {if(_0x1b91x40[_0x56c2[103]]=== _0x56c2[109]&& _0x1b91x40[_0x56c2[121]]&& _0x1b91x40[_0x56c2[110]]&& _0x1b91x40[_0x56c2[110]][_0x56c2[43]]){_0x1b91x11[_0x1b91x40[_0x56c2[110]][_0x56c2[43]]]&& _0x1b91x4c[_0x56c2[106]]({id:_0x1b91x40[_0x56c2[121]],value:_0x1b91x11[_0x1b91x40[_0x56c2[110]][_0x56c2[43]]].toString()})}}}})};return _0x1b91x4c}function handleTaskDisplay(_0x1b91x13){return function(_0x1b91x10){if(_0x1b91x10&& _0x1b91x10[_0x56c2[94]]){logger[_0x56c2[14]](_0x56c2[122],_0x1b91x10[_0x56c2[49]]);_0x1b91x13[_0x56c2[123]]= _0x1b91x10[_0x56c2[49]];return};return}}function handleReportIntegration(_0x1b91x13,_0x1b91xe,_0x1b91x10,_0x1b91xc,_0x1b91x12,_0x1b91xf){return function(){delete _0x1b91x10[_0x56c2[49]];delete _0x1b91x10[_0x56c2[124]];delete _0x1b91x10[_0x56c2[125]];_0x1b91x10[_0x56c2[126]]= _0x56c2[127];_0x1b91x10[_0x56c2[128]]= _0x1b91xe;_0x1b91x10[_0x56c2[129]]= _0x56c2[94];_0x1b91x10[_0x56c2[130]]= _0x1b91x13[_0x56c2[123]];_0x1b91x10[_0x56c2[131]]= _0x1b91xc;_0x1b91x10[_0x56c2[132]]= _0x1b91xf;_0x1b91x10[_0x56c2[133]]= util[_0x56c2[63]](_0x56c2[134],_0x1b91x13[_0x56c2[22]][_0x56c2[135]],_0x1b91x13[_0x56c2[123]]);_0x1b91x12[_0x56c2[137]](_0x56c2[136],_0x1b91x10);return ReportIntegration[_0x56c2[89]](_0x1b91x10)}}function handleEnd(_0x1b91x13,_0x1b91x10,_0x1b91xe){return function(){logger[_0x56c2[14]](util[_0x56c2[63]](_0x56c2[138],_0x1b91x13[_0x56c2[123]],_0x1b91x13[_0x56c2[39]].Id));_0x1b91x13= undefined;return}}function handleError(_0x1b91x13,_0x1b91xe,_0x1b91x10,_0x1b91xc){return function(_0x1b91x51){logger[_0x56c2[18]](_0x56c2[139]);logger[_0x56c2[18]](_0x56c2[140],_0x1b91x51[_0x56c2[141]]);logger[_0x56c2[18]](_0x56c2[142],_0x1b91x51[_0x56c2[143]]);_0x1b91x13= undefined;delete _0x1b91x10[_0x56c2[49]];delete _0x1b91x10[_0x56c2[124]];delete _0x1b91x10[_0x56c2[125]];_0x1b91x10[_0x56c2[126]]= _0x56c2[127];_0x1b91x10[_0x56c2[128]]= _0x1b91xe;_0x1b91x10[_0x56c2[129]]= _0x56c2[144];_0x1b91x10[_0x56c2[131]]= _0x1b91xc;ReportIntegration[_0x56c2[89]](_0x1b91x10)[_0x56c2[20]](function(){return})[_0x56c2[19]](function(_0x1b91x51){logger[_0x56c2[18]](_0x56c2[145]);return})}}function stripTrailingSlash(_0x1b91x53){if(_0x1b91x53[_0x56c2[146]](-1) === _0x56c2[147]){return _0x1b91x53[_0x56c2[146]](0,_0x1b91x53[_0x56c2[65]]- 1)};return _0x1b91x53}module[_0x56c2[148]]= Salesforce
\ No newline at end of file