Built motion from commit 3594e56.|0.0.120
[motion.git] / server / config / integrations / salesforce.js
index e872115..1ccdc67 100644 (file)
@@ -1 +1 @@
-var _0x86a6=["\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\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\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","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x6C\x6F\x67\x69\x6E","\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","\x55\x73\x65\x72","\x73\x6F\x62\x6A\x65\x63\x74","","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\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\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","\x61\x67\x65\x6E\x74","\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","\x64\x65\x73\x74\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x75\x6D","\x64\x65\x73\x74\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\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","\x66\x6F\x72\x6D\x61\x74","\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","\x69\x64","\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","\x6E\x61\x6D\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","\x25\x73\x3A\x20\x25\x73","\x6B\x65\x79","\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","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\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","\x75\x72\x6C","\x25\x73\x2F\x25\x73\x2F\x65","\x69\x6E\x73\x74\x61\x6E\x63\x65\x55\x72\x6C","\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"];_0x86a6[0];var _=require(_0x86a6[1]);var util=require(_0x86a6[2]);var jsforce=require(_0x86a6[3]);var moment=require(_0x86a6[4]);var SalesforceIntegration=require(_0x86a6[6])[_0x86a6[5]];var SalesforceConfiguration=require(_0x86a6[6])[_0x86a6[7]];var ReportIntegration=require(_0x86a6[6])[_0x86a6[8]];function Salesforce(){console[_0x86a6[10]](_0x86a6[9])}Salesforce[_0x86a6[12]][_0x86a6[11]]=function(_0xdf9cx9,_0xdf9cxa,_0xdf9cxb,_0xdf9cxc,_0xdf9cxd){var _0xdf9cxe={connection:undefined,configuration:undefined,agent:undefined,enduser:undefined,taskId:undefined};if(!_0xdf9cx9|| !_0xdf9cxa){console[_0x86a6[14]](_0x86a6[13]);return};SalesforceConfiguration[_0x86a6[17]]({where:{id:_0xdf9cxa,AccountId:_0xdf9cx9},include:[{all:true,include:[{all:true}]}]})[_0x86a6[16]](handleEntityNotFound())[_0x86a6[16]](handleConnection(_0xdf9cxe))[_0x86a6[16]](searchAgent(_0xdf9cxe,_0xdf9cxb,_0xdf9cxc))[_0x86a6[16]](handleAgent(_0xdf9cxe,_0xdf9cxb,_0xdf9cxc))[_0x86a6[16]](searchAdmin(_0xdf9cxe))[_0x86a6[16]](handleAdmin(_0xdf9cxe))[_0x86a6[16]](searchContact(_0xdf9cxe,_0xdf9cxb,_0xdf9cxc))[_0x86a6[16]](handleContact(_0xdf9cxe,_0xdf9cxb,_0xdf9cxc))[_0x86a6[16]](searchLead(_0xdf9cxe,_0xdf9cxb,_0xdf9cxc))[_0x86a6[16]](handleLead(_0xdf9cxe,_0xdf9cxb,_0xdf9cxc))[_0x86a6[16]](leadCreation(_0xdf9cxe,_0xdf9cxb,_0xdf9cxc))[_0x86a6[16]](handleLeadCreation(_0xdf9cxe,_0xdf9cxb,_0xdf9cxc))[_0x86a6[16]](taskCreation(_0xdf9cxe,_0xdf9cxc,_0xdf9cxd))[_0x86a6[16]](handleTaskDisplay(_0xdf9cxe))[_0x86a6[16]](handleReportIntegration(_0xdf9cxe,_0xdf9cxb,_0xdf9cxc,_0xdf9cx9))[_0x86a6[16]](handleEnd(_0xdf9cxe))[_0x86a6[15]](handleError(_0xdf9cxe,_0xdf9cxb,_0xdf9cxc,_0xdf9cx9))};function handleEntityNotFound(){return function(_0xdf9cx10){if(!_0xdf9cx10){return null};return _0xdf9cx10}}function handleConnection(_0xdf9cxe){return function(_0xdf9cx12){_0xdf9cxe[_0x86a6[18]]= new jsforce.Connection({oauth2:{loginUrl:_0xdf9cx12[_0x86a6[20]][_0x86a6[19]]?_0xdf9cx12[_0x86a6[20]][_0x86a6[19]]:_0x86a6[21],clientId:_0xdf9cx12[_0x86a6[20]][_0x86a6[22]],clientSecret:_0xdf9cx12[_0x86a6[20]][_0x86a6[23]]}});var _0xdf9cx13=_0xdf9cx12[_0x86a6[20]][_0x86a6[26]][_0x86a6[25]](_0xdf9cx12[_0x86a6[20]][_0x86a6[24]]);_0xdf9cxe[_0x86a6[27]]=_0xdf9cx12;return _0xdf9cxe[_0x86a6[18]][_0x86a6[29]](_0xdf9cx12[_0x86a6[20]][_0x86a6[28]],_0xdf9cx13)}}function searchAgent(_0xdf9cxe,_0xdf9cxb,_0xdf9cxc){return function(){console[_0x86a6[10]](_0x86a6[30],getValueFromPropertyName(_0xdf9cxc,getAgentSearchPropertyFromChannel(_0xdf9cxb)));return _0xdf9cxe[_0x86a6[18]][_0x86a6[33]](_0x86a6[32])[_0x86a6[17]]({Name:getValueFromPropertyName(_0xdf9cxc,getAgentSearchPropertyFromChannel(_0xdf9cxb))},{Id:1,Username:1,Name:1})[_0x86a6[31]]()}}function getAgentSearchPropertyFromChannel(_0xdf9cxb){var _0xdf9cx16=_0x86a6[34];if(_0xdf9cxb){switch(_0xdf9cxb){case _0x86a6[36]:_0xdf9cx16=_0x86a6[35];break;default:_0xdf9cx16=_0x86a6[35];console[_0x86a6[14]](_0x86a6[37],_0xdf9cxb)}};return _0xdf9cx16}function getValueFromPropertyName(_0xdf9cxc,_0xdf9cx16){return _[_0x86a6[38]](_0xdf9cxc,_0xdf9cx16)}function handleAgent(_0xdf9cxe,_0xdf9cxb,_0xdf9cx19){return function(_0xdf9cxc){if(_0xdf9cxc[_0x86a6[39]]>0){console[_0x86a6[10]](_0x86a6[40],getValueFromPropertyName(_0xdf9cx19,getAgentSearchPropertyFromChannel(_0xdf9cxb)));_0xdf9cxe[_0x86a6[41]]=getMatchObject(_0xdf9cxc,_0x86a6[42],getValueFromPropertyName(_0xdf9cx19,getAgentSearchPropertyFromChannel(_0xdf9cxb)));return _0xdf9cxe[_0x86a6[41]]};return}}function getMatchObject(_0xdf9cx1b,_0xdf9cx16,_0xdf9cx1c){var _0xdf9cx1d=_[_0x86a6[17]](_0xdf9cx1b,{property:_0xdf9cx1c});if(_0xdf9cx1d){return _0xdf9cx1d};return _[_0x86a6[43]](_0xdf9cx1b)}function searchAdmin(_0xdf9cxe){return function(_0xdf9cxc){if(_0xdf9cxc){return};console[_0x86a6[10]](_0x86a6[44]);return _0xdf9cxe[_0x86a6[18]][_0x86a6[45]]()}}function handleAdmin(_0xdf9cxe){return function(_0xdf9cxc){if(!_0xdf9cxc){return};if(_0xdf9cxc){console[_0x86a6[10]](_0x86a6[46]);_0xdf9cxe[_0x86a6[41]]={Id:_0xdf9cxc[_0x86a6[47]],Name:_0xdf9cxc[_0x86a6[48]],Username:_0xdf9cxc[_0x86a6[28]]}};return}}function searchContact(_0xdf9cxe,_0xdf9cxb,_0xdf9cxc){return function(){console[_0x86a6[10]](_0x86a6[49],getValueFromPropertyName(_0xdf9cxc,getEndUserSearchPropertyFromChannel(_0xdf9cxb)));var _0xdf9cx21={};_0xdf9cx21[getEndUserSearchQueryFromChannel(_0xdf9cxb)]=getValueFromPropertyName(_0xdf9cxc,getEndUserSearchPropertyFromChannel(_0xdf9cxb));return _0xdf9cxe[_0x86a6[18]][_0x86a6[33]](_0x86a6[50])[_0x86a6[17]](_0xdf9cx21,{Id:1,Name:1})[_0x86a6[31]]()}}function getEndUserSearchQueryFromChannel(_0xdf9cxb){var _0xdf9cx16=_0x86a6[34];if(_0xdf9cxb){switch(_0xdf9cxb){case _0x86a6[36]:_0xdf9cx16=_0x86a6[51];break;default:_0xdf9cx16=_0x86a6[51];console[_0x86a6[14]](_0x86a6[37],_0xdf9cxb)}};return _0xdf9cx16}function getEndUserSearchPropertyFromChannel(_0xdf9cxb){var _0xdf9cx16=_0x86a6[34];if(_0xdf9cxb){switch(_0xdf9cxb){case _0x86a6[36]:_0xdf9cx16=_0x86a6[52];break;default:_0xdf9cx16=_0x86a6[52];console[_0x86a6[14]](_0x86a6[37],_0xdf9cxb)}};return _0xdf9cx16}function getEndUserNamePropertyFromChannel(_0xdf9cxb){var _0xdf9cx16=_0x86a6[34];if(_0xdf9cxb){switch(_0xdf9cxb){case _0x86a6[36]:_0xdf9cx16=_0x86a6[53];break;default:_0xdf9cx16=_0x86a6[53];console[_0x86a6[14]](_0x86a6[37],_0xdf9cxb)}};return _0xdf9cx16}function handleContact(_0xdf9cxe,_0xdf9cxb,_0xdf9cx19){return function(_0xdf9cxc){if(_0xdf9cxc[_0x86a6[39]]>0){console[_0x86a6[10]](_0x86a6[54],getValueFromPropertyName(_0xdf9cx19,getEndUserSearchPropertyFromChannel(_0xdf9cxb)));_0xdf9cxe[_0x86a6[55]]=_0xdf9cxc[0];return _0xdf9cxe[_0x86a6[55]]};console[_0x86a6[10]](_0x86a6[56],getValueFromPropertyName(_0xdf9cx19,getEndUserSearchPropertyFromChannel(_0xdf9cxb)));return}}function searchLead(_0xdf9cxe,_0xdf9cxb,_0xdf9cx19){return function(_0xdf9cxc){if(!_0xdf9cxc){console[_0x86a6[10]](_0x86a6[57],getValueFromPropertyName(_0xdf9cx19,getEndUserSearchPropertyFromChannel(_0xdf9cxb)));var _0xdf9cx21={};_0xdf9cx21[getEndUserSearchQueryFromChannel(_0xdf9cxb)]=getValueFromPropertyName(_0xdf9cx19,getEndUserSearchPropertyFromChannel(_0xdf9cxb));return _0xdf9cxe[_0x86a6[18]][_0x86a6[33]](_0x86a6[58])[_0x86a6[17]](_0xdf9cx21,{Id:1,Name:1})[_0x86a6[31]]()};return}}function handleLead(_0xdf9cxe,_0xdf9cxb,_0xdf9cx19){return function(_0xdf9cxc){if(_0xdf9cxc&&_0xdf9cxc[_0x86a6[39]]>0){console[_0x86a6[10]](_0x86a6[59],getValueFromPropertyName(_0xdf9cx19,getEndUserSearchPropertyFromChannel(_0xdf9cxb)));_0xdf9cxe[_0x86a6[55]]=_0xdf9cxc[0];return _0xdf9cxe[_0x86a6[55]]};return}}function leadCreation(_0xdf9cxe,_0xdf9cxb,_0xdf9cx19){return function(_0xdf9cxc){if(_0xdf9cxc||_0xdf9cxe[_0x86a6[55]]){return};console[_0x86a6[10]](_0x86a6[60],getValueFromPropertyName(_0xdf9cx19,getEndUserSearchPropertyFromChannel(_0xdf9cxb)));return _0xdf9cxe[_0x86a6[18]][_0x86a6[33]](_0x86a6[58])[_0x86a6[61]](getJsonForEndUserCreation(_0xdf9cxb,_0xdf9cx19))}}function getJsonForEndUserCreation(_0xdf9cxb,_0xdf9cxc){var _0xdf9cx2a={Company:_0x86a6[62]};switch(_0xdf9cxb){case _0x86a6[36]:if(_0xdf9cxc[_0x86a6[53]]){_0xdf9cx2a[_0x86a6[63]]=getValueFromPropertyName(_0xdf9cxc,getEndUserNamePropertyFromChannel(_0xdf9cxb))}else {_0xdf9cx2a[_0x86a6[63]]=util[_0x86a6[65]](_0x86a6[64],getValueFromPropertyName(_0xdf9cxc,getAgentSearchPropertyFromChannel(_0xdf9cxb)))};_0xdf9cx2a[_0x86a6[51]]=getValueFromPropertyName(_0xdf9cxc,getEndUserSearchPropertyFromChannel(_0xdf9cxb));break;default:console[_0x86a6[14]](_0x86a6[37],_0xdf9cxb)};return _0xdf9cx2a}function handleLeadCreation(_0xdf9cxe,_0xdf9cxb,_0xdf9cx19){return function(_0xdf9cxc){if(!_0xdf9cxc){return};if(_0xdf9cxc&&_0xdf9cxc[_0x86a6[66]]){console[_0x86a6[10]](_0x86a6[67],getValueFromPropertyName(_0xdf9cx19,getEndUserSearchPropertyFromChannel(_0xdf9cxb)));_0xdf9cxe[_0x86a6[55]]={Id:_0xdf9cxc[_0x86a6[68]]}};return}}function taskCreation(_0xdf9cxe,_0xdf9cx19,_0xdf9cxd){return function(){var _0xdf9cx2d={WhoId:_0xdf9cxe[_0x86a6[55]][_0x86a6[69]],OwnerId:_0xdf9cxe[_0x86a6[41]][_0x86a6[69]],ActivityDate:moment[_0x86a6[70]](),IsReminderSet:false,IsRecurrence:false,Subject:createSubjectFromConfiguration(_0xdf9cxe,_0xdf9cx19,_0xdf9cxd),Description:createDescriptionFromConfiguration(_0xdf9cxe,_0xdf9cx19,_0xdf9cxd)};var _0xdf9cx2e=createCustomFieldsFromConfiguration(_0xdf9cxe);if(_0xdf9cx2e[_0x86a6[39]]>0){_[_0x86a6[72]](_0xdf9cx2e,function(_0xdf9cx2f){_0xdf9cx2d[_0xdf9cx2f[_0x86a6[68]]]=_0xdf9cx2f[_0x86a6[71]]})};return _0xdf9cxe[_0x86a6[18]][_0x86a6[33]](_0x86a6[73])[_0x86a6[61]](_0xdf9cx2d)}}function createSubjectFromConfiguration(_0xdf9cxe,_0xdf9cx19,_0xdf9cxd){var _0xdf9cx31=_0x86a6[34];var _0xdf9cx32=[];if(_0xdf9cxe[_0x86a6[27]][_0x86a6[74]][_0x86a6[39]]>0){var _0xdf9cx33=_[_0x86a6[75]](_0xdf9cxe[_0x86a6[27]].Subject,[_0x86a6[68]]);_[_0x86a6[72]](_0xdf9cx33,function(_0xdf9cx34){if(_0xdf9cx34[_0x86a6[76]]===_0x86a6[77]){_0xdf9cx32[_0x86a6[79]](_0xdf9cx34[_0x86a6[78]])}else {if(_0xdf9cx34[_0x86a6[76]]===_0x86a6[80]&&_0xdf9cx34[_0x86a6[81]]){var _0xdf9cx35=getValueFromPropertyName(_0xdf9cx19,_0xdf9cx34[_0x86a6[81]]);if(_0xdf9cx35){_0xdf9cx32[_0x86a6[79]](_0xdf9cx35.toString())}}else {if(_0xdf9cx34[_0x86a6[76]]===_0x86a6[82]){var _0xdf9cx36=_[_0x86a6[17]](_0xdf9cxd,{"\x6E\x61\x6D\x65":_0xdf9cx34[_0x86a6[84]][_0x86a6[83]]});if(_0xdf9cx36){_0xdf9cx32[_0x86a6[79]](_0xdf9cx36[_0x86a6[71]].toString())}}}}});_0xdf9cx31=_0xdf9cx32[_0x86a6[86]](_0x86a6[85])};return _0xdf9cx31}function createDescriptionFromConfiguration(_0xdf9cxe,_0xdf9cx19,_0xdf9cxd){var _0xdf9cx38=_0x86a6[34];var _0xdf9cx32=[];if(_0xdf9cxe[_0x86a6[27]][_0x86a6[87]][_0x86a6[39]]>0){var _0xdf9cx39=_[_0x86a6[75]](_0xdf9cxe[_0x86a6[27]].Description,[_0x86a6[68]]);_[_0x86a6[72]](_0xdf9cx39,function(_0xdf9cx34){if(_0xdf9cx34[_0x86a6[76]]===_0x86a6[77]){_0xdf9cx32[_0x86a6[79]](_0xdf9cx34[_0x86a6[78]])}else {if(_0xdf9cx34[_0x86a6[76]]===_0x86a6[88]){if(_0xdf9cx34[_0x86a6[89]]===_0x86a6[77]){_0xdf9cx32[_0x86a6[79]](util[_0x86a6[65]](_0x86a6[90],_0xdf9cx34[_0x86a6[91]],_0xdf9cx34[_0x86a6[92]]))}else {if(_0xdf9cx34[_0x86a6[89]]===_0x86a6[80]&&_0xdf9cx34[_0x86a6[81]]){var _0xdf9cx35=getValueFromPropertyName(_0xdf9cx19,_0xdf9cx34[_0x86a6[81]]);if(_0xdf9cx35){_0xdf9cx32[_0x86a6[79]](util[_0x86a6[65]](_0x86a6[90],_0xdf9cx34[_0x86a6[91]],_0xdf9cx35.toString()))}}else {if(_0xdf9cx34[_0x86a6[89]]===_0x86a6[82]){var _0xdf9cx36=_[_0x86a6[17]](_0xdf9cxd,{"\x6E\x61\x6D\x65":_0xdf9cx34[_0x86a6[84]][_0x86a6[83]]});if(_0xdf9cx36){_0xdf9cx32[_0x86a6[79]](util[_0x86a6[65]](_0x86a6[90],_0xdf9cx34[_0x86a6[91]],_0xdf9cx36[_0x86a6[71]].toString()))}}}}}}});_0xdf9cx38=_0xdf9cx32[_0x86a6[86]](_0x86a6[93])};return _0xdf9cx38}function createCustomFieldsFromConfiguration(_0xdf9cxe,_0xdf9cx19,_0xdf9cxd){var _0xdf9cx3b=[];var _0xdf9cx3c=[];if(_0xdf9cxe[_0x86a6[27]][_0x86a6[94]][_0x86a6[39]]>0){_0xdf9cx3b=_0xdf9cxe[_0x86a6[27]][_0x86a6[94]];_[_0x86a6[72]](_0xdf9cx3b,function(_0xdf9cx2f){if(_0xdf9cx2f[_0x86a6[76]]===_0x86a6[77]){_0xdf9cx3c[_0x86a6[79]]({id:_0xdf9cx2f[_0x86a6[95]],value:_0xdf9cx2f[_0x86a6[78]]})}else {if(_0xdf9cx2f[_0x86a6[76]]===_0x86a6[80]){var _0xdf9cx35=getValueFromPropertyName(_0xdf9cx19,_0xdf9cx2f[_0x86a6[81]]);if(_0xdf9cx35){_0xdf9cx3c[_0x86a6[79]]({id:_0xdf9cx2f[_0x86a6[95]],value:_0xdf9cx35.toString()})}}else {if(_0xdf9cx2f[_0x86a6[76]]===_0x86a6[82]){var _0xdf9cx36=_[_0x86a6[17]](_0xdf9cxd,{"\x6E\x61\x6D\x65":_0xdf9cx2f[_0x86a6[84]][_0x86a6[83]]});if(_0xdf9cx36){_0xdf9cx3c[_0x86a6[79]]({id:_0xdf9cx2f[_0x86a6[95]],value:_0xdf9cx36[_0x86a6[71]].toString()})}}}}})};return _0xdf9cx3c}function handleTaskDisplay(_0xdf9cxe){return function(_0xdf9cxc){if(_0xdf9cxc&&_0xdf9cxc[_0x86a6[66]]){console[_0x86a6[10]](_0x86a6[96],_0xdf9cxc[_0x86a6[68]]);_0xdf9cxe[_0x86a6[97]]=_0xdf9cxc[_0x86a6[68]];return};return}}function handleReportIntegration(_0xdf9cxe,_0xdf9cxb,_0xdf9cxc,_0xdf9cx9){return function(){_0xdf9cxc=_0xdf9cxc[_0x86a6[98]];delete _0xdf9cxc[_0x86a6[68]];_0xdf9cxc[_0x86a6[99]]=_0x86a6[100];_0xdf9cxc[_0x86a6[101]]=_0xdf9cxb;_0xdf9cxc[_0x86a6[102]]=_0x86a6[66];_0xdf9cxc[_0x86a6[103]]=_0xdf9cxe[_0x86a6[97]];_0xdf9cxc[_0x86a6[104]]=_0xdf9cx9;_0xdf9cxc[_0x86a6[105]]=util[_0x86a6[65]](_0x86a6[106],_0xdf9cxe[_0x86a6[18]][_0x86a6[107]],_0xdf9cxe[_0x86a6[97]]);return ReportIntegration[_0x86a6[61]](_0xdf9cxc)}}function handleEnd(_0xdf9cxe,_0xdf9cxc,_0xdf9cxb){return function(){console[_0x86a6[10]](util[_0x86a6[65]](_0x86a6[108],_0xdf9cxe[_0x86a6[97]],_0xdf9cxe[_0x86a6[41]].Id));_0xdf9cxe=undefined;return}}function handleError(_0xdf9cxe,_0xdf9cxb,_0xdf9cxc,_0xdf9cx9){return function(_0xdf9cx41){console[_0x86a6[14]](_0x86a6[109]);console[_0x86a6[14]](_0x86a6[110],_0xdf9cx41[_0x86a6[111]]);console[_0x86a6[14]](_0x86a6[112],_0xdf9cx41[_0x86a6[113]]);_0xdf9cxe=undefined;delete _0xdf9cxc[_0x86a6[68]];_0xdf9cxc=_0xdf9cxc[_0x86a6[98]];_0xdf9cxc[_0x86a6[99]]=_0x86a6[100];_0xdf9cxc[_0x86a6[101]]=_0xdf9cxb;_0xdf9cxc[_0x86a6[102]]=_0x86a6[114];_0xdf9cxc[_0x86a6[104]]=_0xdf9cx9;ReportIntegration[_0x86a6[61]](_0xdf9cxc)[_0x86a6[16]](function(){return})[_0x86a6[15]](function(_0xdf9cx41){console[_0x86a6[14]](_0x86a6[115]);return})}}function stripTrailingSlash(_0xdf9cx43){if(_0xdf9cx43[_0x86a6[116]](-1)===_0x86a6[117]){return _0xdf9cx43[_0x86a6[116]](0,_0xdf9cx43[_0x86a6[39]]-1)};return _0xdf9cx43}module[_0x86a6[118]]=Salesforce
\ No newline at end of file
+var _0xb39d=["\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\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\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","\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","\x71\x75\x65\x75\x65","\x6E\x61\x6D\x65","\x6D\x6F\x6E\x69\x74\x6F\x72\x5F\x66\x6F\x72\x6D\x61\x74","\x66\x69\x6E\x64\x4F\x6E\x65","\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\x20","\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","\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","\x55\x73\x65\x72","\x73\x6F\x62\x6A\x65\x63\x74","","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\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","\x75\x6E\x69\x71\x75\x65\x69\x64","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\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","\x61\x67\x65\x6E\x74","\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","\x64\x65\x73\x74\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x75\x6D","\x64\x65\x73\x74\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\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","\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","\x69\x64","\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","\x25\x73\x3A\x20\x25\x73","\x6B\x65\x79","\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","\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","\x75\x72\x6C","\x25\x73\x2F\x25\x73\x2F\x65","\x69\x6E\x73\x74\x61\x6E\x63\x65\x55\x72\x6C","\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"];_0xb39d[0];var _=require(_0xb39d[1]);var util=require(_0xb39d[2]);var jsforce=require(_0xb39d[3]);var moment=require(_0xb39d[4]);var SalesforceIntegration=require(_0xb39d[6])[_0xb39d[5]];var SalesforceConfiguration=require(_0xb39d[6])[_0xb39d[7]];var ReportIntegration=require(_0xb39d[6])[_0xb39d[8]];var VoiceQueue=require(_0xb39d[6])[_0xb39d[9]];function Salesforce(){console[_0xb39d[11]](_0xb39d[10])}Salesforce[_0xb39d[13]][_0xb39d[12]]= function(_0xffdaxa,_0xffdaxb,_0xffdaxc,_0xffdaxd,_0xffdaxe){var _0xffdaxf={connection:undefined,configuration:undefined,agent:undefined,enduser:undefined,taskId:undefined,recordEnable:false,serverURL:undefined};if(!_0xffdaxa||  !_0xffdaxb){console[_0xb39d[15]](_0xb39d[14]);return};SalesforceConfiguration[_0xb39d[18]]({where:{id:_0xffdaxb,AccountId:_0xffdaxa},include:[{all:true,include:[{all:true}]}]})[_0xb39d[17]](handleEntityNotFound())[_0xb39d[17]](handleConnection(_0xffdaxf))[_0xb39d[17]](searchQueue(_0xffdaxd))[_0xb39d[17]](handleRecordings(_0xffdaxf))[_0xb39d[17]](searchAgent(_0xffdaxf,_0xffdaxc,_0xffdaxd))[_0xb39d[17]](handleAgent(_0xffdaxf,_0xffdaxc,_0xffdaxd))[_0xb39d[17]](searchAdmin(_0xffdaxf))[_0xb39d[17]](handleAdmin(_0xffdaxf))[_0xb39d[17]](searchContact(_0xffdaxf,_0xffdaxc,_0xffdaxd))[_0xb39d[17]](handleContact(_0xffdaxf,_0xffdaxc,_0xffdaxd))[_0xb39d[17]](searchLead(_0xffdaxf,_0xffdaxc,_0xffdaxd))[_0xb39d[17]](handleLead(_0xffdaxf,_0xffdaxc,_0xffdaxd))[_0xb39d[17]](leadCreation(_0xffdaxf,_0xffdaxc,_0xffdaxd))[_0xb39d[17]](handleLeadCreation(_0xffdaxf,_0xffdaxc,_0xffdaxd))[_0xb39d[17]](taskCreation(_0xffdaxf,_0xffdaxd,_0xffdaxe))[_0xb39d[17]](handleTaskDisplay(_0xffdaxf))[_0xb39d[17]](handleReportIntegration(_0xffdaxf,_0xffdaxc,_0xffdaxd,_0xffdaxa))[_0xb39d[17]](handleEnd(_0xffdaxf))[_0xb39d[16]](handleError(_0xffdaxf,_0xffdaxc,_0xffdaxd,_0xffdaxa))};function handleEntityNotFound(){return function(_0xffdax11){if(!_0xffdax11){return null};return _0xffdax11}}function handleConnection(_0xffdaxf){return function(_0xffdax13){_0xffdaxf[_0xb39d[19]]=  new jsforce.Connection({oauth2:{loginUrl:_0xffdax13[_0xb39d[21]][_0xb39d[20]]?_0xffdax13[_0xb39d[21]][_0xb39d[20]]:_0xb39d[22],clientId:_0xffdax13[_0xb39d[21]][_0xb39d[23]],clientSecret:_0xffdax13[_0xb39d[21]][_0xb39d[24]]}});var _0xffdax14=_0xffdax13[_0xb39d[21]][_0xb39d[27]][_0xb39d[26]](_0xffdax13[_0xb39d[21]][_0xb39d[25]]);_0xffdaxf[_0xb39d[28]]= _0xffdax13;_0xffdaxf[_0xb39d[29]]= _0xffdax13[_0xb39d[21]][_0xb39d[30]];return _0xffdaxf[_0xb39d[19]][_0xb39d[32]](_0xffdax13[_0xb39d[21]][_0xb39d[31]],_0xffdax14)}}function searchQueue(_0xffdaxd){return function(){if(_0xffdaxd[_0xb39d[33]]){return VoiceQueue[_0xb39d[36]]({where:{name:_0xffdaxd[_0xb39d[33]]},attributes:[_0xb39d[34],_0xb39d[35]]})}else {return}}}function handleRecordings(_0xffdaxf){return function(_0xffdax17){if(_0xffdax17&& _0xffdax17[_0xb39d[35]]){console[_0xb39d[11]](_0xb39d[37],_0xffdax17[_0xb39d[34]]);_0xffdaxf[_0xb39d[38]]= true}else {_0xffdaxf[_0xb39d[38]]= false;console[_0xb39d[11]](_0xb39d[39]);return}}}function searchAgent(_0xffdaxf,_0xffdaxc,_0xffdaxd){return function(){console[_0xb39d[11]](_0xb39d[40],getValueFromPropertyName(_0xffdaxd,getAgentSearchPropertyFromChannel(_0xffdaxc)));return _0xffdaxf[_0xb39d[19]][_0xb39d[43]](_0xb39d[42])[_0xb39d[18]]({Name:getValueFromPropertyName(_0xffdaxd,getAgentSearchPropertyFromChannel(_0xffdaxc))},{Id:1,Username:1,Name:1})[_0xb39d[41]]()}}function getAgentSearchPropertyFromChannel(_0xffdaxc){var _0xffdax1a=_0xb39d[44];if(_0xffdaxc){switch(_0xffdaxc){case _0xb39d[46]:_0xffdax1a= _0xb39d[45];break;default:_0xffdax1a= _0xb39d[45];console[_0xb39d[15]](_0xb39d[47],_0xffdaxc)}};return _0xffdax1a}function getValueFromPropertyName(_0xffdaxd,_0xffdax1a,_0xffdaxf){if(_0xffdax1a=== _0xb39d[48]){if(_0xffdaxf&& _0xffdaxf[_0xb39d[38]]&& _0xffdaxf[_0xb39d[29]]){return util[_0xb39d[52]](_0xb39d[49],stripTrailingSlash(_0xffdaxf[_0xb39d[29]]),_0xffdaxd[_0xb39d[51]][_0xb39d[50]])}else {return null}}else {return _[_0xb39d[53]](_0xffdaxd,_0xffdax1a)}}function handleAgent(_0xffdaxf,_0xffdaxc,_0xffdax1d){return function(_0xffdaxd){if(_0xffdaxd[_0xb39d[54]]> 0){console[_0xb39d[11]](_0xb39d[55],getValueFromPropertyName(_0xffdax1d,getAgentSearchPropertyFromChannel(_0xffdaxc)));_0xffdaxf[_0xb39d[56]]= getMatchObject(_0xffdaxd,_0xb39d[57],getValueFromPropertyName(_0xffdax1d,getAgentSearchPropertyFromChannel(_0xffdaxc)));return _0xffdaxf[_0xb39d[56]]};return}}function getMatchObject(_0xffdax1f,_0xffdax1a,_0xffdax20){var _0xffdax21=_[_0xb39d[18]](_0xffdax1f,{property:_0xffdax20});if(_0xffdax21){return _0xffdax21};return _[_0xb39d[58]](_0xffdax1f)}function searchAdmin(_0xffdaxf){return function(_0xffdaxd){if(_0xffdaxd){return};console[_0xb39d[11]](_0xb39d[59]);return _0xffdaxf[_0xb39d[19]][_0xb39d[60]]()}}function handleAdmin(_0xffdaxf){return function(_0xffdaxd){if(!_0xffdaxd){return};if(_0xffdaxd){console[_0xb39d[11]](_0xb39d[61]);_0xffdaxf[_0xb39d[56]]= {Id:_0xffdaxd[_0xb39d[62]],Name:_0xffdaxd[_0xb39d[63]],Username:_0xffdaxd[_0xb39d[31]]}};return}}function searchContact(_0xffdaxf,_0xffdaxc,_0xffdaxd){return function(){console[_0xb39d[11]](_0xb39d[64],getValueFromPropertyName(_0xffdaxd,getEndUserSearchPropertyFromChannel(_0xffdaxc)));var _0xffdax25={};_0xffdax25[getEndUserSearchQueryFromChannel(_0xffdaxc)]= getValueFromPropertyName(_0xffdaxd,getEndUserSearchPropertyFromChannel(_0xffdaxc));return _0xffdaxf[_0xb39d[19]][_0xb39d[43]](_0xb39d[65])[_0xb39d[18]](_0xffdax25,{Id:1,Name:1})[_0xb39d[41]]()}}function getEndUserSearchQueryFromChannel(_0xffdaxc){var _0xffdax1a=_0xb39d[44];if(_0xffdaxc){switch(_0xffdaxc){case _0xb39d[46]:_0xffdax1a= _0xb39d[66];break;default:_0xffdax1a= _0xb39d[66];console[_0xb39d[15]](_0xb39d[47],_0xffdaxc)}};return _0xffdax1a}function getEndUserSearchPropertyFromChannel(_0xffdaxc){var _0xffdax1a=_0xb39d[44];if(_0xffdaxc){switch(_0xffdaxc){case _0xb39d[46]:_0xffdax1a= _0xb39d[67];break;default:_0xffdax1a= _0xb39d[67];console[_0xb39d[15]](_0xb39d[47],_0xffdaxc)}};return _0xffdax1a}function getEndUserNamePropertyFromChannel(_0xffdaxc){var _0xffdax1a=_0xb39d[44];if(_0xffdaxc){switch(_0xffdaxc){case _0xb39d[46]:_0xffdax1a= _0xb39d[68];break;default:_0xffdax1a= _0xb39d[68];console[_0xb39d[15]](_0xb39d[47],_0xffdaxc)}};return _0xffdax1a}function handleContact(_0xffdaxf,_0xffdaxc,_0xffdax1d){return function(_0xffdaxd){if(_0xffdaxd[_0xb39d[54]]> 0){console[_0xb39d[11]](_0xb39d[69],getValueFromPropertyName(_0xffdax1d,getEndUserSearchPropertyFromChannel(_0xffdaxc)));_0xffdaxf[_0xb39d[70]]= _0xffdaxd[0];return _0xffdaxf[_0xb39d[70]]};console[_0xb39d[11]](_0xb39d[71],getValueFromPropertyName(_0xffdax1d,getEndUserSearchPropertyFromChannel(_0xffdaxc)));return}}function searchLead(_0xffdaxf,_0xffdaxc,_0xffdax1d){return function(_0xffdaxd){if(!_0xffdaxd){console[_0xb39d[11]](_0xb39d[72],getValueFromPropertyName(_0xffdax1d,getEndUserSearchPropertyFromChannel(_0xffdaxc)));var _0xffdax25={};_0xffdax25[getEndUserSearchQueryFromChannel(_0xffdaxc)]= getValueFromPropertyName(_0xffdax1d,getEndUserSearchPropertyFromChannel(_0xffdaxc));return _0xffdaxf[_0xb39d[19]][_0xb39d[43]](_0xb39d[73])[_0xb39d[18]](_0xffdax25,{Id:1,Name:1})[_0xb39d[41]]()};return}}function handleLead(_0xffdaxf,_0xffdaxc,_0xffdax1d){return function(_0xffdaxd){if(_0xffdaxd&& _0xffdaxd[_0xb39d[54]]> 0){console[_0xb39d[11]](_0xb39d[74],getValueFromPropertyName(_0xffdax1d,getEndUserSearchPropertyFromChannel(_0xffdaxc)));_0xffdaxf[_0xb39d[70]]= _0xffdaxd[0];return _0xffdaxf[_0xb39d[70]]};return}}function leadCreation(_0xffdaxf,_0xffdaxc,_0xffdax1d){return function(_0xffdaxd){if(_0xffdaxd|| _0xffdaxf[_0xb39d[70]]){return};console[_0xb39d[11]](_0xb39d[75],getValueFromPropertyName(_0xffdax1d,getEndUserSearchPropertyFromChannel(_0xffdaxc)));return _0xffdaxf[_0xb39d[19]][_0xb39d[43]](_0xb39d[73])[_0xb39d[76]](getJsonForEndUserCreation(_0xffdaxc,_0xffdax1d))}}function getJsonForEndUserCreation(_0xffdaxc,_0xffdaxd){var _0xffdax2e={Company:_0xb39d[77]};switch(_0xffdaxc){case _0xb39d[46]:if(_0xffdaxd[_0xb39d[68]]){_0xffdax2e[_0xb39d[78]]= getValueFromPropertyName(_0xffdaxd,getEndUserNamePropertyFromChannel(_0xffdaxc))}else {_0xffdax2e[_0xb39d[78]]= util[_0xb39d[52]](_0xb39d[79],getValueFromPropertyName(_0xffdaxd,getAgentSearchPropertyFromChannel(_0xffdaxc)))};_0xffdax2e[_0xb39d[66]]= getValueFromPropertyName(_0xffdaxd,getEndUserSearchPropertyFromChannel(_0xffdaxc));break;default:console[_0xb39d[15]](_0xb39d[47],_0xffdaxc)};return _0xffdax2e}function handleLeadCreation(_0xffdaxf,_0xffdaxc,_0xffdax1d){return function(_0xffdaxd){if(!_0xffdaxd){return};if(_0xffdaxd&& _0xffdaxd[_0xb39d[80]]){console[_0xb39d[11]](_0xb39d[81],getValueFromPropertyName(_0xffdax1d,getEndUserSearchPropertyFromChannel(_0xffdaxc)));_0xffdaxf[_0xb39d[70]]= {Id:_0xffdaxd[_0xb39d[82]]}};return}}function taskCreation(_0xffdaxf,_0xffdax1d,_0xffdaxe){return function(){var _0xffdax31={WhoId:_0xffdaxf[_0xb39d[70]][_0xb39d[83]],OwnerId:_0xffdaxf[_0xb39d[56]][_0xb39d[83]],ActivityDate:moment[_0xb39d[84]](),IsReminderSet:false,IsRecurrence:false,Subject:createSubjectFromConfiguration(_0xffdaxf,_0xffdax1d,_0xffdaxe),Description:createDescriptionFromConfiguration(_0xffdaxf,_0xffdax1d,_0xffdaxe)};var _0xffdax32=createCustomFieldsFromConfiguration(_0xffdaxf,_0xffdax1d,_0xffdaxe);if(_0xffdax32[_0xb39d[54]]> 0){_[_0xb39d[86]](_0xffdax32,function(_0xffdax33){_0xffdax31[_0xffdax33[_0xb39d[82]]]= _0xffdax33[_0xb39d[85]]})};return _0xffdaxf[_0xb39d[19]][_0xb39d[43]](_0xb39d[87])[_0xb39d[76]](_0xffdax31)}}function createSubjectFromConfiguration(_0xffdaxf,_0xffdax1d,_0xffdaxe){var _0xffdax35=_0xb39d[44];var _0xffdax36=[];if(_0xffdaxf[_0xb39d[28]][_0xb39d[88]][_0xb39d[54]]> 0){var _0xffdax37=_[_0xb39d[89]](_0xffdaxf[_0xb39d[28]].Subject,[_0xb39d[82]]);_[_0xb39d[86]](_0xffdax37,function(_0xffdax38){if(_0xffdax38[_0xb39d[90]]=== _0xb39d[91]){_0xffdax36[_0xb39d[93]](_0xffdax38[_0xb39d[92]])}else {if(_0xffdax38[_0xb39d[90]]=== _0xb39d[94]&& _0xffdax38[_0xb39d[95]]){var _0xffdax39=getValueFromPropertyName(_0xffdax1d,_0xffdax38[_0xb39d[95]],_0xffdaxf);if(_0xffdax39){_0xffdax36[_0xb39d[93]](_0xffdax39.toString())}}else {if(_0xffdax38[_0xb39d[90]]=== _0xb39d[96]){var _0xffdax3a=_[_0xb39d[18]](_0xffdaxe,{"\x6E\x61\x6D\x65":_0xffdax38[_0xb39d[97]][_0xb39d[34]]});if(_0xffdax3a){_0xffdax36[_0xb39d[93]](_0xffdax3a[_0xb39d[85]].toString())}}}}});_0xffdax35= _0xffdax36[_0xb39d[99]](_0xb39d[98])};return _0xffdax35}function createDescriptionFromConfiguration(_0xffdaxf,_0xffdax1d,_0xffdaxe){var _0xffdax3c=_0xb39d[44];var _0xffdax36=[];if(_0xffdaxf[_0xb39d[28]][_0xb39d[100]][_0xb39d[54]]> 0){var _0xffdax3d=_[_0xb39d[89]](_0xffdaxf[_0xb39d[28]].Description,[_0xb39d[82]]);_[_0xb39d[86]](_0xffdax3d,function(_0xffdax38){if(_0xffdax38[_0xb39d[90]]=== _0xb39d[91]){_0xffdax36[_0xb39d[93]](_0xffdax38[_0xb39d[92]])}else {if(_0xffdax38[_0xb39d[90]]=== _0xb39d[101]){if(_0xffdax38[_0xb39d[102]]=== _0xb39d[91]){_0xffdax36[_0xb39d[93]](util[_0xb39d[52]](_0xb39d[103],_0xffdax38[_0xb39d[104]],_0xffdax38[_0xb39d[105]]))}else {if(_0xffdax38[_0xb39d[102]]=== _0xb39d[94]&& _0xffdax38[_0xb39d[95]]){var _0xffdax39=getValueFromPropertyName(_0xffdax1d,_0xffdax38[_0xb39d[95]],_0xffdaxf);if(_0xffdax39){_0xffdax36[_0xb39d[93]](util[_0xb39d[52]](_0xb39d[103],_0xffdax38[_0xb39d[104]],_0xffdax39.toString()))}}else {if(_0xffdax38[_0xb39d[102]]=== _0xb39d[96]){var _0xffdax3a=_[_0xb39d[18]](_0xffdaxe,{"\x6E\x61\x6D\x65":_0xffdax38[_0xb39d[97]][_0xb39d[34]]});if(_0xffdax3a){_0xffdax36[_0xb39d[93]](util[_0xb39d[52]](_0xb39d[103],_0xffdax38[_0xb39d[104]],_0xffdax3a[_0xb39d[85]].toString()))}}}}}}});_0xffdax3c= _0xffdax36[_0xb39d[99]](_0xb39d[106])};return _0xffdax3c}function createCustomFieldsFromConfiguration(_0xffdaxf,_0xffdax1d,_0xffdaxe){var _0xffdax3f=[];var _0xffdax40=[];if(_0xffdaxf[_0xb39d[28]][_0xb39d[107]][_0xb39d[54]]> 0){_0xffdax3f= _0xffdaxf[_0xb39d[28]][_0xb39d[107]];_[_0xb39d[86]](_0xffdax3f,function(_0xffdax33){if(_0xffdax33[_0xb39d[90]]=== _0xb39d[91]){_0xffdax40[_0xb39d[93]]({id:_0xffdax33[_0xb39d[108]],value:_0xffdax33[_0xb39d[92]]})}else {if(_0xffdax33[_0xb39d[90]]=== _0xb39d[94]){var _0xffdax39=getValueFromPropertyName(_0xffdax1d,_0xffdax33[_0xb39d[95]],_0xffdaxf);if(_0xffdax39){_0xffdax40[_0xb39d[93]]({id:_0xffdax33[_0xb39d[108]],value:_0xffdax39.toString()})}}else {if(_0xffdax33[_0xb39d[90]]=== _0xb39d[96]){var _0xffdax3a=_[_0xb39d[18]](_0xffdaxe,{"\x6E\x61\x6D\x65":_0xffdax33[_0xb39d[97]][_0xb39d[34]]});if(_0xffdax3a){_0xffdax40[_0xb39d[93]]({id:_0xffdax33[_0xb39d[108]],value:_0xffdax3a[_0xb39d[85]].toString()})}}}}})};return _0xffdax40}function handleTaskDisplay(_0xffdaxf){return function(_0xffdaxd){if(_0xffdaxd&& _0xffdaxd[_0xb39d[80]]){console[_0xb39d[11]](_0xb39d[109],_0xffdaxd[_0xb39d[82]]);_0xffdaxf[_0xb39d[110]]= _0xffdaxd[_0xb39d[82]];return};return}}function handleReportIntegration(_0xffdaxf,_0xffdaxc,_0xffdaxd,_0xffdaxa){return function(){_0xffdaxd= _0xffdaxd[_0xb39d[51]];delete _0xffdaxd[_0xb39d[82]];_0xffdaxd[_0xb39d[111]]= _0xb39d[112];_0xffdaxd[_0xb39d[113]]= _0xffdaxc;_0xffdaxd[_0xb39d[114]]= _0xb39d[80];_0xffdaxd[_0xb39d[115]]= _0xffdaxf[_0xb39d[110]];_0xffdaxd[_0xb39d[116]]= _0xffdaxa;_0xffdaxd[_0xb39d[117]]= util[_0xb39d[52]](_0xb39d[118],_0xffdaxf[_0xb39d[19]][_0xb39d[119]],_0xffdaxf[_0xb39d[110]]);return ReportIntegration[_0xb39d[76]](_0xffdaxd)}}function handleEnd(_0xffdaxf,_0xffdaxd,_0xffdaxc){return function(){console[_0xb39d[11]](util[_0xb39d[52]](_0xb39d[120],_0xffdaxf[_0xb39d[110]],_0xffdaxf[_0xb39d[56]].Id));_0xffdaxf= undefined;return}}function handleError(_0xffdaxf,_0xffdaxc,_0xffdaxd,_0xffdaxa){return function(_0xffdax45){console[_0xb39d[15]](_0xb39d[121]);console[_0xb39d[15]](_0xb39d[122],_0xffdax45[_0xb39d[123]]);console[_0xb39d[15]](_0xb39d[124],_0xffdax45[_0xb39d[125]]);_0xffdaxf= undefined;delete _0xffdaxd[_0xb39d[82]];_0xffdaxd= _0xffdaxd[_0xb39d[51]];_0xffdaxd[_0xb39d[111]]= _0xb39d[112];_0xffdaxd[_0xb39d[113]]= _0xffdaxc;_0xffdaxd[_0xb39d[114]]= _0xb39d[126];_0xffdaxd[_0xb39d[116]]= _0xffdaxa;ReportIntegration[_0xb39d[76]](_0xffdaxd)[_0xb39d[17]](function(){return})[_0xb39d[16]](function(_0xffdax45){console[_0xb39d[15]](_0xb39d[127]);return})}}function stripTrailingSlash(_0xffdax47){if(_0xffdax47[_0xb39d[128]](-1) === _0xb39d[129]){return _0xffdax47[_0xb39d[128]](0,_0xffdax47[_0xb39d[54]]- 1)};return _0xffdax47}module[_0xb39d[130]]= Salesforce
\ No newline at end of file