Built motion from commit 0adc88d.|0.0.117
[motion.git] / server / config / integrations / salesforce.js
index 5d122c9..f0d735e 100644 (file)
@@ -1 +1 @@
-var _0xabeb=["\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"];_0xabeb[0];var _=require(_0xabeb[1]);var util=require(_0xabeb[2]);var jsforce=require(_0xabeb[3]);var moment=require(_0xabeb[4]);var SalesforceIntegration=require(_0xabeb[6])[_0xabeb[5]];var SalesforceConfiguration=require(_0xabeb[6])[_0xabeb[7]];var ReportIntegration=require(_0xabeb[6])[_0xabeb[8]];function Salesforce(){console[_0xabeb[10]](_0xabeb[9])}Salesforce[_0xabeb[12]][_0xabeb[11]]=function(_0x1cf2x9,_0x1cf2xa,_0x1cf2xb,_0x1cf2xc,_0x1cf2xd){var _0x1cf2xe={connection:undefined,configuration:undefined,agent:undefined,enduser:undefined,taskId:undefined};if(!_0x1cf2x9|| !_0x1cf2xa){console[_0xabeb[14]](_0xabeb[13]);return};SalesforceConfiguration[_0xabeb[17]]({where:{id:_0x1cf2xa,AccountId:_0x1cf2x9},include:[{all:true,include:[{all:true}]}]})[_0xabeb[16]](handleEntityNotFound())[_0xabeb[16]](handleConnection(_0x1cf2xe))[_0xabeb[16]](searchAgent(_0x1cf2xe,_0x1cf2xb,_0x1cf2xc))[_0xabeb[16]](handleAgent(_0x1cf2xe,_0x1cf2xb,_0x1cf2xc))[_0xabeb[16]](searchAdmin(_0x1cf2xe))[_0xabeb[16]](handleAdmin(_0x1cf2xe))[_0xabeb[16]](searchContact(_0x1cf2xe,_0x1cf2xb,_0x1cf2xc))[_0xabeb[16]](handleContact(_0x1cf2xe,_0x1cf2xb,_0x1cf2xc))[_0xabeb[16]](searchLead(_0x1cf2xe,_0x1cf2xb,_0x1cf2xc))[_0xabeb[16]](handleLead(_0x1cf2xe,_0x1cf2xb,_0x1cf2xc))[_0xabeb[16]](leadCreation(_0x1cf2xe,_0x1cf2xb,_0x1cf2xc))[_0xabeb[16]](handleLeadCreation(_0x1cf2xe,_0x1cf2xb,_0x1cf2xc))[_0xabeb[16]](taskCreation(_0x1cf2xe,_0x1cf2xc,_0x1cf2xd))[_0xabeb[16]](handleTaskDisplay(_0x1cf2xe))[_0xabeb[16]](handleReportIntegration(_0x1cf2xe,_0x1cf2xb,_0x1cf2xc,_0x1cf2x9))[_0xabeb[16]](handleEnd(_0x1cf2xe))[_0xabeb[15]](handleError(_0x1cf2xe,_0x1cf2xb,_0x1cf2xc,_0x1cf2x9))};function handleEntityNotFound(){return function(_0x1cf2x10){if(!_0x1cf2x10){return null};return _0x1cf2x10}}function handleConnection(_0x1cf2xe){return function(_0x1cf2x12){_0x1cf2xe[_0xabeb[18]]= new jsforce.Connection({oauth2:{loginUrl:_0x1cf2x12[_0xabeb[20]][_0xabeb[19]]?_0x1cf2x12[_0xabeb[20]][_0xabeb[19]]:_0xabeb[21],clientId:_0x1cf2x12[_0xabeb[20]][_0xabeb[22]],clientSecret:_0x1cf2x12[_0xabeb[20]][_0xabeb[23]]}});var _0x1cf2x13=_0x1cf2x12[_0xabeb[20]][_0xabeb[26]][_0xabeb[25]](_0x1cf2x12[_0xabeb[20]][_0xabeb[24]]);_0x1cf2xe[_0xabeb[27]]=_0x1cf2x12;return _0x1cf2xe[_0xabeb[18]][_0xabeb[29]](_0x1cf2x12[_0xabeb[20]][_0xabeb[28]],_0x1cf2x13)}}function searchAgent(_0x1cf2xe,_0x1cf2xb,_0x1cf2xc){return function(){console[_0xabeb[10]](_0xabeb[30],getValueFromPropertyName(_0x1cf2xc,getAgentSearchPropertyFromChannel(_0x1cf2xb)));return _0x1cf2xe[_0xabeb[18]][_0xabeb[33]](_0xabeb[32])[_0xabeb[17]]({Name:getValueFromPropertyName(_0x1cf2xc,getAgentSearchPropertyFromChannel(_0x1cf2xb))},{Id:1,Username:1,Name:1})[_0xabeb[31]]()}}function getAgentSearchPropertyFromChannel(_0x1cf2xb){var _0x1cf2x16=_0xabeb[34];if(_0x1cf2xb){switch(_0x1cf2xb){case _0xabeb[36]:_0x1cf2x16=_0xabeb[35];break;default:_0x1cf2x16=_0xabeb[35];console[_0xabeb[14]](_0xabeb[37],_0x1cf2xb)}};return _0x1cf2x16}function getValueFromPropertyName(_0x1cf2xc,_0x1cf2x16){return _[_0xabeb[38]](_0x1cf2xc,_0x1cf2x16)}function handleAgent(_0x1cf2xe,_0x1cf2xb,_0x1cf2x19){return function(_0x1cf2xc){if(_0x1cf2xc[_0xabeb[39]]>0){console[_0xabeb[10]](_0xabeb[40],getValueFromPropertyName(_0x1cf2x19,getAgentSearchPropertyFromChannel(_0x1cf2xb)));_0x1cf2xe[_0xabeb[41]]=getMatchObject(_0x1cf2xc,_0xabeb[42],getValueFromPropertyName(_0x1cf2x19,getAgentSearchPropertyFromChannel(_0x1cf2xb)));return _0x1cf2xe[_0xabeb[41]]};return}}function getMatchObject(_0x1cf2x1b,_0x1cf2x16,_0x1cf2x1c){var _0x1cf2x1d=_[_0xabeb[17]](_0x1cf2x1b,{property:_0x1cf2x1c});if(_0x1cf2x1d){return _0x1cf2x1d};return _[_0xabeb[43]](_0x1cf2x1b)}function searchAdmin(_0x1cf2xe){return function(_0x1cf2xc){if(_0x1cf2xc){return};console[_0xabeb[10]](_0xabeb[44]);return _0x1cf2xe[_0xabeb[18]][_0xabeb[45]]()}}function handleAdmin(_0x1cf2xe){return function(_0x1cf2xc){if(!_0x1cf2xc){return};if(_0x1cf2xc){console[_0xabeb[10]](_0xabeb[46]);_0x1cf2xe[_0xabeb[41]]={Id:_0x1cf2xc[_0xabeb[47]],Name:_0x1cf2xc[_0xabeb[48]],Username:_0x1cf2xc[_0xabeb[28]]}};return}}function searchContact(_0x1cf2xe,_0x1cf2xb,_0x1cf2xc){return function(){console[_0xabeb[10]](_0xabeb[49],getValueFromPropertyName(_0x1cf2xc,getEndUserSearchPropertyFromChannel(_0x1cf2xb)));var _0x1cf2x21={};_0x1cf2x21[getEndUserSearchQueryFromChannel(_0x1cf2xb)]=getValueFromPropertyName(_0x1cf2xc,getEndUserSearchPropertyFromChannel(_0x1cf2xb));return _0x1cf2xe[_0xabeb[18]][_0xabeb[33]](_0xabeb[50])[_0xabeb[17]](_0x1cf2x21,{Id:1,Name:1})[_0xabeb[31]]()}}function getEndUserSearchQueryFromChannel(_0x1cf2xb){var _0x1cf2x16=_0xabeb[34];if(_0x1cf2xb){switch(_0x1cf2xb){case _0xabeb[36]:_0x1cf2x16=_0xabeb[51];break;default:_0x1cf2x16=_0xabeb[51];console[_0xabeb[14]](_0xabeb[37],_0x1cf2xb)}};return _0x1cf2x16}function getEndUserSearchPropertyFromChannel(_0x1cf2xb){var _0x1cf2x16=_0xabeb[34];if(_0x1cf2xb){switch(_0x1cf2xb){case _0xabeb[36]:_0x1cf2x16=_0xabeb[52];break;default:_0x1cf2x16=_0xabeb[52];console[_0xabeb[14]](_0xabeb[37],_0x1cf2xb)}};return _0x1cf2x16}function getEndUserNamePropertyFromChannel(_0x1cf2xb){var _0x1cf2x16=_0xabeb[34];if(_0x1cf2xb){switch(_0x1cf2xb){case _0xabeb[36]:_0x1cf2x16=_0xabeb[53];break;default:_0x1cf2x16=_0xabeb[53];console[_0xabeb[14]](_0xabeb[37],_0x1cf2xb)}};return _0x1cf2x16}function handleContact(_0x1cf2xe,_0x1cf2xb,_0x1cf2x19){return function(_0x1cf2xc){if(_0x1cf2xc[_0xabeb[39]]>0){console[_0xabeb[10]](_0xabeb[54],getValueFromPropertyName(_0x1cf2x19,getEndUserSearchPropertyFromChannel(_0x1cf2xb)));_0x1cf2xe[_0xabeb[55]]=_0x1cf2xc[0];return _0x1cf2xe[_0xabeb[55]]};console[_0xabeb[10]](_0xabeb[56],getValueFromPropertyName(_0x1cf2x19,getEndUserSearchPropertyFromChannel(_0x1cf2xb)));return}}function searchLead(_0x1cf2xe,_0x1cf2xb,_0x1cf2x19){return function(_0x1cf2xc){if(!_0x1cf2xc){console[_0xabeb[10]](_0xabeb[57],getValueFromPropertyName(_0x1cf2x19,getEndUserSearchPropertyFromChannel(_0x1cf2xb)));var _0x1cf2x21={};_0x1cf2x21[getEndUserSearchQueryFromChannel(_0x1cf2xb)]=getValueFromPropertyName(_0x1cf2x19,getEndUserSearchPropertyFromChannel(_0x1cf2xb));return _0x1cf2xe[_0xabeb[18]][_0xabeb[33]](_0xabeb[58])[_0xabeb[17]](_0x1cf2x21,{Id:1,Name:1})[_0xabeb[31]]()};return}}function handleLead(_0x1cf2xe,_0x1cf2xb,_0x1cf2x19){return function(_0x1cf2xc){if(_0x1cf2xc&&_0x1cf2xc[_0xabeb[39]]>0){console[_0xabeb[10]](_0xabeb[59],getValueFromPropertyName(_0x1cf2x19,getEndUserSearchPropertyFromChannel(_0x1cf2xb)));_0x1cf2xe[_0xabeb[55]]=_0x1cf2xc[0];return _0x1cf2xe[_0xabeb[55]]};return}}function leadCreation(_0x1cf2xe,_0x1cf2xb,_0x1cf2x19){return function(_0x1cf2xc){if(_0x1cf2xc||_0x1cf2xe[_0xabeb[55]]){return};console[_0xabeb[10]](_0xabeb[60],getValueFromPropertyName(_0x1cf2x19,getEndUserSearchPropertyFromChannel(_0x1cf2xb)));return _0x1cf2xe[_0xabeb[18]][_0xabeb[33]](_0xabeb[58])[_0xabeb[61]](getJsonForEndUserCreation(_0x1cf2xb,_0x1cf2x19))}}function getJsonForEndUserCreation(_0x1cf2xb,_0x1cf2xc){var _0x1cf2x2a={Company:_0xabeb[62]};switch(_0x1cf2xb){case _0xabeb[36]:if(_0x1cf2xc[_0xabeb[53]]){_0x1cf2x2a[_0xabeb[63]]=getValueFromPropertyName(_0x1cf2xc,getEndUserNamePropertyFromChannel(_0x1cf2xb))}else {_0x1cf2x2a[_0xabeb[63]]=util[_0xabeb[65]](_0xabeb[64],getValueFromPropertyName(_0x1cf2xc,getAgentSearchPropertyFromChannel(_0x1cf2xb)))};_0x1cf2x2a[_0xabeb[51]]=getValueFromPropertyName(_0x1cf2xc,getEndUserSearchPropertyFromChannel(_0x1cf2xb));break;default:console[_0xabeb[14]](_0xabeb[37],_0x1cf2xb)};return _0x1cf2x2a}function handleLeadCreation(_0x1cf2xe,_0x1cf2xb,_0x1cf2x19){return function(_0x1cf2xc){if(!_0x1cf2xc){return};if(_0x1cf2xc&&_0x1cf2xc[_0xabeb[66]]){console[_0xabeb[10]](_0xabeb[67],getValueFromPropertyName(_0x1cf2x19,getEndUserSearchPropertyFromChannel(_0x1cf2xb)));_0x1cf2xe[_0xabeb[55]]={Id:_0x1cf2xc[_0xabeb[68]]}};return}}function taskCreation(_0x1cf2xe,_0x1cf2x19,_0x1cf2xd){return function(){var _0x1cf2x2d={WhoId:_0x1cf2xe[_0xabeb[55]][_0xabeb[69]],OwnerId:_0x1cf2xe[_0xabeb[41]][_0xabeb[69]],ActivityDate:moment[_0xabeb[70]](),IsReminderSet:false,IsRecurrence:false,Subject:createSubjectFromConfiguration(_0x1cf2xe,_0x1cf2x19,_0x1cf2xd),Description:createDescriptionFromConfiguration(_0x1cf2xe,_0x1cf2x19,_0x1cf2xd)};var _0x1cf2x2e=createCustomFieldsFromConfiguration(_0x1cf2xe);if(_0x1cf2x2e[_0xabeb[39]]>0){_[_0xabeb[72]](_0x1cf2x2e,function(_0x1cf2x2f){_0x1cf2x2d[_0x1cf2x2f[_0xabeb[68]]]=_0x1cf2x2f[_0xabeb[71]]})};return _0x1cf2xe[_0xabeb[18]][_0xabeb[33]](_0xabeb[73])[_0xabeb[61]](_0x1cf2x2d)}}function createSubjectFromConfiguration(_0x1cf2xe,_0x1cf2x19,_0x1cf2xd){var _0x1cf2x31=_0xabeb[34];var _0x1cf2x32=[];if(_0x1cf2xe[_0xabeb[27]][_0xabeb[74]][_0xabeb[39]]>0){var _0x1cf2x33=_[_0xabeb[75]](_0x1cf2xe[_0xabeb[27]].Subject,[_0xabeb[68]]);_[_0xabeb[72]](_0x1cf2x33,function(_0x1cf2x34){if(_0x1cf2x34[_0xabeb[76]]===_0xabeb[77]){_0x1cf2x32[_0xabeb[79]](_0x1cf2x34[_0xabeb[78]])}else {if(_0x1cf2x34[_0xabeb[76]]===_0xabeb[80]&&_0x1cf2x34[_0xabeb[81]]){var _0x1cf2x35=getValueFromPropertyName(_0x1cf2x19,_0x1cf2x34[_0xabeb[81]]);if(_0x1cf2x35){_0x1cf2x32[_0xabeb[79]](_0x1cf2x35.toString())}}else {if(_0x1cf2x34[_0xabeb[76]]===_0xabeb[82]){var _0x1cf2x36=_[_0xabeb[17]](_0x1cf2xd,{"\x6E\x61\x6D\x65":_0x1cf2x34[_0xabeb[84]][_0xabeb[83]]});if(_0x1cf2x36){_0x1cf2x32[_0xabeb[79]](_0x1cf2x36[_0xabeb[71]].toString())}}}}});_0x1cf2x31=_0x1cf2x32[_0xabeb[86]](_0xabeb[85])};return _0x1cf2x31}function createDescriptionFromConfiguration(_0x1cf2xe,_0x1cf2x19,_0x1cf2xd){var _0x1cf2x38=_0xabeb[34];var _0x1cf2x32=[];if(_0x1cf2xe[_0xabeb[27]][_0xabeb[87]][_0xabeb[39]]>0){var _0x1cf2x39=_[_0xabeb[75]](_0x1cf2xe[_0xabeb[27]].Description,[_0xabeb[68]]);_[_0xabeb[72]](_0x1cf2x39,function(_0x1cf2x34){if(_0x1cf2x34[_0xabeb[76]]===_0xabeb[77]){_0x1cf2x32[_0xabeb[79]](_0x1cf2x34[_0xabeb[78]])}else {if(_0x1cf2x34[_0xabeb[76]]===_0xabeb[88]){if(_0x1cf2x34[_0xabeb[89]]===_0xabeb[77]){_0x1cf2x32[_0xabeb[79]](util[_0xabeb[65]](_0xabeb[90],_0x1cf2x34[_0xabeb[91]],_0x1cf2x34[_0xabeb[92]]))}else {if(_0x1cf2x34[_0xabeb[89]]===_0xabeb[80]&&_0x1cf2x34[_0xabeb[81]]){var _0x1cf2x35=getValueFromPropertyName(_0x1cf2x19,_0x1cf2x34[_0xabeb[81]]);if(_0x1cf2x35){_0x1cf2x32[_0xabeb[79]](util[_0xabeb[65]](_0xabeb[90],_0x1cf2x34[_0xabeb[91]],_0x1cf2x35.toString()))}}else {if(_0x1cf2x34[_0xabeb[89]]===_0xabeb[82]){var _0x1cf2x36=_[_0xabeb[17]](_0x1cf2xd,{"\x6E\x61\x6D\x65":_0x1cf2x34[_0xabeb[84]][_0xabeb[83]]});if(_0x1cf2x36){_0x1cf2x32[_0xabeb[79]](util[_0xabeb[65]](_0xabeb[90],_0x1cf2x34[_0xabeb[91]],_0x1cf2x36[_0xabeb[71]].toString()))}}}}}}});_0x1cf2x38=_0x1cf2x32[_0xabeb[86]](_0xabeb[93])};return _0x1cf2x38}function createCustomFieldsFromConfiguration(_0x1cf2xe,_0x1cf2x19,_0x1cf2xd){var _0x1cf2x3b=[];var _0x1cf2x3c=[];if(_0x1cf2xe[_0xabeb[27]][_0xabeb[94]][_0xabeb[39]]>0){_0x1cf2x3b=_0x1cf2xe[_0xabeb[27]][_0xabeb[94]];_[_0xabeb[72]](_0x1cf2x3b,function(_0x1cf2x2f){if(_0x1cf2x2f[_0xabeb[76]]===_0xabeb[77]){_0x1cf2x3c[_0xabeb[79]]({id:_0x1cf2x2f[_0xabeb[95]],value:_0x1cf2x2f[_0xabeb[78]]})}else {if(_0x1cf2x2f[_0xabeb[76]]===_0xabeb[80]){var _0x1cf2x35=getValueFromPropertyName(_0x1cf2x19,_0x1cf2x2f[_0xabeb[81]]);if(_0x1cf2x35){_0x1cf2x3c[_0xabeb[79]]({id:_0x1cf2x2f[_0xabeb[95]],value:_0x1cf2x35.toString()})}}else {if(_0x1cf2x2f[_0xabeb[76]]===_0xabeb[82]){var _0x1cf2x36=_[_0xabeb[17]](_0x1cf2xd,{"\x6E\x61\x6D\x65":_0x1cf2x2f[_0xabeb[84]][_0xabeb[83]]});if(_0x1cf2x36){_0x1cf2x3c[_0xabeb[79]]({id:_0x1cf2x2f[_0xabeb[95]],value:_0x1cf2x36[_0xabeb[71]].toString()})}}}}})};return _0x1cf2x3c}function handleTaskDisplay(_0x1cf2xe){return function(_0x1cf2xc){if(_0x1cf2xc&&_0x1cf2xc[_0xabeb[66]]){console[_0xabeb[10]](_0xabeb[96],_0x1cf2xc[_0xabeb[68]]);_0x1cf2xe[_0xabeb[97]]=_0x1cf2xc[_0xabeb[68]];return};return}}function handleReportIntegration(_0x1cf2xe,_0x1cf2xb,_0x1cf2xc,_0x1cf2x9){return function(){_0x1cf2xc=_0x1cf2xc[_0xabeb[98]];delete _0x1cf2xc[_0xabeb[68]];_0x1cf2xc[_0xabeb[99]]=_0xabeb[100];_0x1cf2xc[_0xabeb[101]]=_0x1cf2xb;_0x1cf2xc[_0xabeb[102]]=_0xabeb[66];_0x1cf2xc[_0xabeb[103]]=_0x1cf2xe[_0xabeb[97]];_0x1cf2xc[_0xabeb[104]]=_0x1cf2x9;_0x1cf2xc[_0xabeb[105]]=util[_0xabeb[65]](_0xabeb[106],_0x1cf2xe[_0xabeb[18]][_0xabeb[107]],_0x1cf2xe[_0xabeb[97]]);return ReportIntegration[_0xabeb[61]](_0x1cf2xc)}}function handleEnd(_0x1cf2xe,_0x1cf2xc,_0x1cf2xb){return function(){console[_0xabeb[10]](util[_0xabeb[65]](_0xabeb[108],_0x1cf2xe[_0xabeb[97]],_0x1cf2xe[_0xabeb[41]].Id));_0x1cf2xe=undefined;return}}function handleError(_0x1cf2xe,_0x1cf2xb,_0x1cf2xc,_0x1cf2x9){return function(_0x1cf2x41){console[_0xabeb[14]](_0xabeb[109]);console[_0xabeb[14]](_0xabeb[110],_0x1cf2x41[_0xabeb[111]]);console[_0xabeb[14]](_0xabeb[112],_0x1cf2x41[_0xabeb[113]]);_0x1cf2xe=undefined;delete _0x1cf2xc[_0xabeb[68]];_0x1cf2xc=_0x1cf2xc[_0xabeb[98]];_0x1cf2xc[_0xabeb[99]]=_0xabeb[100];_0x1cf2xc[_0xabeb[101]]=_0x1cf2xb;_0x1cf2xc[_0xabeb[102]]=_0xabeb[114];_0x1cf2xc[_0xabeb[104]]=_0x1cf2x9;ReportIntegration[_0xabeb[61]](_0x1cf2xc)[_0xabeb[16]](function(){return})[_0xabeb[15]](function(_0x1cf2x41){console[_0xabeb[14]](_0xabeb[115]);return})}}function stripTrailingSlash(_0x1cf2x43){if(_0x1cf2x43[_0xabeb[116]](-1)===_0xabeb[117]){return _0x1cf2x43[_0xabeb[116]](0,_0x1cf2x43[_0xabeb[39]]-1)};return _0x1cf2x43}module[_0xabeb[118]]=Salesforce
\ No newline at end of file
+var _0x1f3c=["\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"];_0x1f3c[0];var _=require(_0x1f3c[1]);var util=require(_0x1f3c[2]);var jsforce=require(_0x1f3c[3]);var moment=require(_0x1f3c[4]);var SalesforceIntegration=require(_0x1f3c[6])[_0x1f3c[5]];var SalesforceConfiguration=require(_0x1f3c[6])[_0x1f3c[7]];var ReportIntegration=require(_0x1f3c[6])[_0x1f3c[8]];var VoiceQueue=require(_0x1f3c[6])[_0x1f3c[9]];function Salesforce(){console[_0x1f3c[11]](_0x1f3c[10])}Salesforce[_0x1f3c[13]][_0x1f3c[12]]= function(_0x9ec0xa,_0x9ec0xb,_0x9ec0xc,_0x9ec0xd,_0x9ec0xe){var _0x9ec0xf={connection:undefined,configuration:undefined,agent:undefined,enduser:undefined,taskId:undefined,recordEnable:false,serverURL:undefined};if(!_0x9ec0xa||  !_0x9ec0xb){console[_0x1f3c[15]](_0x1f3c[14]);return};SalesforceConfiguration[_0x1f3c[18]]({where:{id:_0x9ec0xb,AccountId:_0x9ec0xa},include:[{all:true,include:[{all:true}]}]})[_0x1f3c[17]](handleEntityNotFound())[_0x1f3c[17]](handleConnection(_0x9ec0xf))[_0x1f3c[17]](searchQueue(_0x9ec0xd))[_0x1f3c[17]](handleRecordings(_0x9ec0xf))[_0x1f3c[17]](searchAgent(_0x9ec0xf,_0x9ec0xc,_0x9ec0xd))[_0x1f3c[17]](handleAgent(_0x9ec0xf,_0x9ec0xc,_0x9ec0xd))[_0x1f3c[17]](searchAdmin(_0x9ec0xf))[_0x1f3c[17]](handleAdmin(_0x9ec0xf))[_0x1f3c[17]](searchContact(_0x9ec0xf,_0x9ec0xc,_0x9ec0xd))[_0x1f3c[17]](handleContact(_0x9ec0xf,_0x9ec0xc,_0x9ec0xd))[_0x1f3c[17]](searchLead(_0x9ec0xf,_0x9ec0xc,_0x9ec0xd))[_0x1f3c[17]](handleLead(_0x9ec0xf,_0x9ec0xc,_0x9ec0xd))[_0x1f3c[17]](leadCreation(_0x9ec0xf,_0x9ec0xc,_0x9ec0xd))[_0x1f3c[17]](handleLeadCreation(_0x9ec0xf,_0x9ec0xc,_0x9ec0xd))[_0x1f3c[17]](taskCreation(_0x9ec0xf,_0x9ec0xd,_0x9ec0xe))[_0x1f3c[17]](handleTaskDisplay(_0x9ec0xf))[_0x1f3c[17]](handleReportIntegration(_0x9ec0xf,_0x9ec0xc,_0x9ec0xd,_0x9ec0xa))[_0x1f3c[17]](handleEnd(_0x9ec0xf))[_0x1f3c[16]](handleError(_0x9ec0xf,_0x9ec0xc,_0x9ec0xd,_0x9ec0xa))};function handleEntityNotFound(){return function(_0x9ec0x11){if(!_0x9ec0x11){return null};return _0x9ec0x11}}function handleConnection(_0x9ec0xf){return function(_0x9ec0x13){_0x9ec0xf[_0x1f3c[19]]=  new jsforce.Connection({oauth2:{loginUrl:_0x9ec0x13[_0x1f3c[21]][_0x1f3c[20]]?_0x9ec0x13[_0x1f3c[21]][_0x1f3c[20]]:_0x1f3c[22],clientId:_0x9ec0x13[_0x1f3c[21]][_0x1f3c[23]],clientSecret:_0x9ec0x13[_0x1f3c[21]][_0x1f3c[24]]}});var _0x9ec0x14=_0x9ec0x13[_0x1f3c[21]][_0x1f3c[27]][_0x1f3c[26]](_0x9ec0x13[_0x1f3c[21]][_0x1f3c[25]]);_0x9ec0xf[_0x1f3c[28]]= _0x9ec0x13;_0x9ec0xf[_0x1f3c[29]]= _0x9ec0x13[_0x1f3c[21]][_0x1f3c[30]];return _0x9ec0xf[_0x1f3c[19]][_0x1f3c[32]](_0x9ec0x13[_0x1f3c[21]][_0x1f3c[31]],_0x9ec0x14)}}function searchQueue(_0x9ec0xd){return function(){if(_0x9ec0xd[_0x1f3c[33]]){return VoiceQueue[_0x1f3c[36]]({where:{name:_0x9ec0xd[_0x1f3c[33]]},attributes:[_0x1f3c[34],_0x1f3c[35]]})}else {return}}}function handleRecordings(_0x9ec0xf){return function(_0x9ec0x17){if(_0x9ec0x17&& _0x9ec0x17[_0x1f3c[35]]){console[_0x1f3c[11]](_0x1f3c[37],_0x9ec0x17[_0x1f3c[34]]);_0x9ec0xf[_0x1f3c[38]]= true}else {_0x9ec0xf[_0x1f3c[38]]= false;console[_0x1f3c[11]](_0x1f3c[39]);return}}}function searchAgent(_0x9ec0xf,_0x9ec0xc,_0x9ec0xd){return function(){console[_0x1f3c[11]](_0x1f3c[40],getValueFromPropertyName(_0x9ec0xd,getAgentSearchPropertyFromChannel(_0x9ec0xc)));return _0x9ec0xf[_0x1f3c[19]][_0x1f3c[43]](_0x1f3c[42])[_0x1f3c[18]]({Name:getValueFromPropertyName(_0x9ec0xd,getAgentSearchPropertyFromChannel(_0x9ec0xc))},{Id:1,Username:1,Name:1})[_0x1f3c[41]]()}}function getAgentSearchPropertyFromChannel(_0x9ec0xc){var _0x9ec0x1a=_0x1f3c[44];if(_0x9ec0xc){switch(_0x9ec0xc){case _0x1f3c[46]:_0x9ec0x1a= _0x1f3c[45];break;default:_0x9ec0x1a= _0x1f3c[45];console[_0x1f3c[15]](_0x1f3c[47],_0x9ec0xc)}};return _0x9ec0x1a}function getValueFromPropertyName(_0x9ec0xd,_0x9ec0x1a,_0x9ec0xf){if(_0x9ec0x1a=== _0x1f3c[48]){if(_0x9ec0xf&& _0x9ec0xf[_0x1f3c[38]]&& _0x9ec0xf[_0x1f3c[29]]){return util[_0x1f3c[52]](_0x1f3c[49],stripTrailingSlash(_0x9ec0xf[_0x1f3c[29]]),_0x9ec0xd[_0x1f3c[51]][_0x1f3c[50]])}else {return null}}else {return _[_0x1f3c[53]](_0x9ec0xd,_0x9ec0x1a)}}function handleAgent(_0x9ec0xf,_0x9ec0xc,_0x9ec0x1d){return function(_0x9ec0xd){if(_0x9ec0xd[_0x1f3c[54]]> 0){console[_0x1f3c[11]](_0x1f3c[55],getValueFromPropertyName(_0x9ec0x1d,getAgentSearchPropertyFromChannel(_0x9ec0xc)));_0x9ec0xf[_0x1f3c[56]]= getMatchObject(_0x9ec0xd,_0x1f3c[57],getValueFromPropertyName(_0x9ec0x1d,getAgentSearchPropertyFromChannel(_0x9ec0xc)));return _0x9ec0xf[_0x1f3c[56]]};return}}function getMatchObject(_0x9ec0x1f,_0x9ec0x1a,_0x9ec0x20){var _0x9ec0x21=_[_0x1f3c[18]](_0x9ec0x1f,{property:_0x9ec0x20});if(_0x9ec0x21){return _0x9ec0x21};return _[_0x1f3c[58]](_0x9ec0x1f)}function searchAdmin(_0x9ec0xf){return function(_0x9ec0xd){if(_0x9ec0xd){return};console[_0x1f3c[11]](_0x1f3c[59]);return _0x9ec0xf[_0x1f3c[19]][_0x1f3c[60]]()}}function handleAdmin(_0x9ec0xf){return function(_0x9ec0xd){if(!_0x9ec0xd){return};if(_0x9ec0xd){console[_0x1f3c[11]](_0x1f3c[61]);_0x9ec0xf[_0x1f3c[56]]= {Id:_0x9ec0xd[_0x1f3c[62]],Name:_0x9ec0xd[_0x1f3c[63]],Username:_0x9ec0xd[_0x1f3c[31]]}};return}}function searchContact(_0x9ec0xf,_0x9ec0xc,_0x9ec0xd){return function(){console[_0x1f3c[11]](_0x1f3c[64],getValueFromPropertyName(_0x9ec0xd,getEndUserSearchPropertyFromChannel(_0x9ec0xc)));var _0x9ec0x25={};_0x9ec0x25[getEndUserSearchQueryFromChannel(_0x9ec0xc)]= getValueFromPropertyName(_0x9ec0xd,getEndUserSearchPropertyFromChannel(_0x9ec0xc));return _0x9ec0xf[_0x1f3c[19]][_0x1f3c[43]](_0x1f3c[65])[_0x1f3c[18]](_0x9ec0x25,{Id:1,Name:1})[_0x1f3c[41]]()}}function getEndUserSearchQueryFromChannel(_0x9ec0xc){var _0x9ec0x1a=_0x1f3c[44];if(_0x9ec0xc){switch(_0x9ec0xc){case _0x1f3c[46]:_0x9ec0x1a= _0x1f3c[66];break;default:_0x9ec0x1a= _0x1f3c[66];console[_0x1f3c[15]](_0x1f3c[47],_0x9ec0xc)}};return _0x9ec0x1a}function getEndUserSearchPropertyFromChannel(_0x9ec0xc){var _0x9ec0x1a=_0x1f3c[44];if(_0x9ec0xc){switch(_0x9ec0xc){case _0x1f3c[46]:_0x9ec0x1a= _0x1f3c[67];break;default:_0x9ec0x1a= _0x1f3c[67];console[_0x1f3c[15]](_0x1f3c[47],_0x9ec0xc)}};return _0x9ec0x1a}function getEndUserNamePropertyFromChannel(_0x9ec0xc){var _0x9ec0x1a=_0x1f3c[44];if(_0x9ec0xc){switch(_0x9ec0xc){case _0x1f3c[46]:_0x9ec0x1a= _0x1f3c[68];break;default:_0x9ec0x1a= _0x1f3c[68];console[_0x1f3c[15]](_0x1f3c[47],_0x9ec0xc)}};return _0x9ec0x1a}function handleContact(_0x9ec0xf,_0x9ec0xc,_0x9ec0x1d){return function(_0x9ec0xd){if(_0x9ec0xd[_0x1f3c[54]]> 0){console[_0x1f3c[11]](_0x1f3c[69],getValueFromPropertyName(_0x9ec0x1d,getEndUserSearchPropertyFromChannel(_0x9ec0xc)));_0x9ec0xf[_0x1f3c[70]]= _0x9ec0xd[0];return _0x9ec0xf[_0x1f3c[70]]};console[_0x1f3c[11]](_0x1f3c[71],getValueFromPropertyName(_0x9ec0x1d,getEndUserSearchPropertyFromChannel(_0x9ec0xc)));return}}function searchLead(_0x9ec0xf,_0x9ec0xc,_0x9ec0x1d){return function(_0x9ec0xd){if(!_0x9ec0xd){console[_0x1f3c[11]](_0x1f3c[72],getValueFromPropertyName(_0x9ec0x1d,getEndUserSearchPropertyFromChannel(_0x9ec0xc)));var _0x9ec0x25={};_0x9ec0x25[getEndUserSearchQueryFromChannel(_0x9ec0xc)]= getValueFromPropertyName(_0x9ec0x1d,getEndUserSearchPropertyFromChannel(_0x9ec0xc));return _0x9ec0xf[_0x1f3c[19]][_0x1f3c[43]](_0x1f3c[73])[_0x1f3c[18]](_0x9ec0x25,{Id:1,Name:1})[_0x1f3c[41]]()};return}}function handleLead(_0x9ec0xf,_0x9ec0xc,_0x9ec0x1d){return function(_0x9ec0xd){if(_0x9ec0xd&& _0x9ec0xd[_0x1f3c[54]]> 0){console[_0x1f3c[11]](_0x1f3c[74],getValueFromPropertyName(_0x9ec0x1d,getEndUserSearchPropertyFromChannel(_0x9ec0xc)));_0x9ec0xf[_0x1f3c[70]]= _0x9ec0xd[0];return _0x9ec0xf[_0x1f3c[70]]};return}}function leadCreation(_0x9ec0xf,_0x9ec0xc,_0x9ec0x1d){return function(_0x9ec0xd){if(_0x9ec0xd|| _0x9ec0xf[_0x1f3c[70]]){return};console[_0x1f3c[11]](_0x1f3c[75],getValueFromPropertyName(_0x9ec0x1d,getEndUserSearchPropertyFromChannel(_0x9ec0xc)));return _0x9ec0xf[_0x1f3c[19]][_0x1f3c[43]](_0x1f3c[73])[_0x1f3c[76]](getJsonForEndUserCreation(_0x9ec0xc,_0x9ec0x1d))}}function getJsonForEndUserCreation(_0x9ec0xc,_0x9ec0xd){var _0x9ec0x2e={Company:_0x1f3c[77]};switch(_0x9ec0xc){case _0x1f3c[46]:if(_0x9ec0xd[_0x1f3c[68]]){_0x9ec0x2e[_0x1f3c[78]]= getValueFromPropertyName(_0x9ec0xd,getEndUserNamePropertyFromChannel(_0x9ec0xc))}else {_0x9ec0x2e[_0x1f3c[78]]= util[_0x1f3c[52]](_0x1f3c[79],getValueFromPropertyName(_0x9ec0xd,getAgentSearchPropertyFromChannel(_0x9ec0xc)))};_0x9ec0x2e[_0x1f3c[66]]= getValueFromPropertyName(_0x9ec0xd,getEndUserSearchPropertyFromChannel(_0x9ec0xc));break;default:console[_0x1f3c[15]](_0x1f3c[47],_0x9ec0xc)};return _0x9ec0x2e}function handleLeadCreation(_0x9ec0xf,_0x9ec0xc,_0x9ec0x1d){return function(_0x9ec0xd){if(!_0x9ec0xd){return};if(_0x9ec0xd&& _0x9ec0xd[_0x1f3c[80]]){console[_0x1f3c[11]](_0x1f3c[81],getValueFromPropertyName(_0x9ec0x1d,getEndUserSearchPropertyFromChannel(_0x9ec0xc)));_0x9ec0xf[_0x1f3c[70]]= {Id:_0x9ec0xd[_0x1f3c[82]]}};return}}function taskCreation(_0x9ec0xf,_0x9ec0x1d,_0x9ec0xe){return function(){var _0x9ec0x31={WhoId:_0x9ec0xf[_0x1f3c[70]][_0x1f3c[83]],OwnerId:_0x9ec0xf[_0x1f3c[56]][_0x1f3c[83]],ActivityDate:moment[_0x1f3c[84]](),IsReminderSet:false,IsRecurrence:false,Subject:createSubjectFromConfiguration(_0x9ec0xf,_0x9ec0x1d,_0x9ec0xe),Description:createDescriptionFromConfiguration(_0x9ec0xf,_0x9ec0x1d,_0x9ec0xe)};var _0x9ec0x32=createCustomFieldsFromConfiguration(_0x9ec0xf,_0x9ec0x1d,_0x9ec0xe);if(_0x9ec0x32[_0x1f3c[54]]> 0){_[_0x1f3c[86]](_0x9ec0x32,function(_0x9ec0x33){_0x9ec0x31[_0x9ec0x33[_0x1f3c[82]]]= _0x9ec0x33[_0x1f3c[85]]})};return _0x9ec0xf[_0x1f3c[19]][_0x1f3c[43]](_0x1f3c[87])[_0x1f3c[76]](_0x9ec0x31)}}function createSubjectFromConfiguration(_0x9ec0xf,_0x9ec0x1d,_0x9ec0xe){var _0x9ec0x35=_0x1f3c[44];var _0x9ec0x36=[];if(_0x9ec0xf[_0x1f3c[28]][_0x1f3c[88]][_0x1f3c[54]]> 0){var _0x9ec0x37=_[_0x1f3c[89]](_0x9ec0xf[_0x1f3c[28]].Subject,[_0x1f3c[82]]);_[_0x1f3c[86]](_0x9ec0x37,function(_0x9ec0x38){if(_0x9ec0x38[_0x1f3c[90]]=== _0x1f3c[91]){_0x9ec0x36[_0x1f3c[93]](_0x9ec0x38[_0x1f3c[92]])}else {if(_0x9ec0x38[_0x1f3c[90]]=== _0x1f3c[94]&& _0x9ec0x38[_0x1f3c[95]]){var _0x9ec0x39=getValueFromPropertyName(_0x9ec0x1d,_0x9ec0x38[_0x1f3c[95]],_0x9ec0xf);if(_0x9ec0x39){_0x9ec0x36[_0x1f3c[93]](_0x9ec0x39.toString())}}else {if(_0x9ec0x38[_0x1f3c[90]]=== _0x1f3c[96]){var _0x9ec0x3a=_[_0x1f3c[18]](_0x9ec0xe,{"\x6E\x61\x6D\x65":_0x9ec0x38[_0x1f3c[97]][_0x1f3c[34]]});if(_0x9ec0x3a){_0x9ec0x36[_0x1f3c[93]](_0x9ec0x3a[_0x1f3c[85]].toString())}}}}});_0x9ec0x35= _0x9ec0x36[_0x1f3c[99]](_0x1f3c[98])};return _0x9ec0x35}function createDescriptionFromConfiguration(_0x9ec0xf,_0x9ec0x1d,_0x9ec0xe){var _0x9ec0x3c=_0x1f3c[44];var _0x9ec0x36=[];if(_0x9ec0xf[_0x1f3c[28]][_0x1f3c[100]][_0x1f3c[54]]> 0){var _0x9ec0x3d=_[_0x1f3c[89]](_0x9ec0xf[_0x1f3c[28]].Description,[_0x1f3c[82]]);_[_0x1f3c[86]](_0x9ec0x3d,function(_0x9ec0x38){if(_0x9ec0x38[_0x1f3c[90]]=== _0x1f3c[91]){_0x9ec0x36[_0x1f3c[93]](_0x9ec0x38[_0x1f3c[92]])}else {if(_0x9ec0x38[_0x1f3c[90]]=== _0x1f3c[101]){if(_0x9ec0x38[_0x1f3c[102]]=== _0x1f3c[91]){_0x9ec0x36[_0x1f3c[93]](util[_0x1f3c[52]](_0x1f3c[103],_0x9ec0x38[_0x1f3c[104]],_0x9ec0x38[_0x1f3c[105]]))}else {if(_0x9ec0x38[_0x1f3c[102]]=== _0x1f3c[94]&& _0x9ec0x38[_0x1f3c[95]]){var _0x9ec0x39=getValueFromPropertyName(_0x9ec0x1d,_0x9ec0x38[_0x1f3c[95]],_0x9ec0xf);if(_0x9ec0x39){_0x9ec0x36[_0x1f3c[93]](util[_0x1f3c[52]](_0x1f3c[103],_0x9ec0x38[_0x1f3c[104]],_0x9ec0x39.toString()))}}else {if(_0x9ec0x38[_0x1f3c[102]]=== _0x1f3c[96]){var _0x9ec0x3a=_[_0x1f3c[18]](_0x9ec0xe,{"\x6E\x61\x6D\x65":_0x9ec0x38[_0x1f3c[97]][_0x1f3c[34]]});if(_0x9ec0x3a){_0x9ec0x36[_0x1f3c[93]](util[_0x1f3c[52]](_0x1f3c[103],_0x9ec0x38[_0x1f3c[104]],_0x9ec0x3a[_0x1f3c[85]].toString()))}}}}}}});_0x9ec0x3c= _0x9ec0x36[_0x1f3c[99]](_0x1f3c[106])};return _0x9ec0x3c}function createCustomFieldsFromConfiguration(_0x9ec0xf,_0x9ec0x1d,_0x9ec0xe){var _0x9ec0x3f=[];var _0x9ec0x40=[];if(_0x9ec0xf[_0x1f3c[28]][_0x1f3c[107]][_0x1f3c[54]]> 0){_0x9ec0x3f= _0x9ec0xf[_0x1f3c[28]][_0x1f3c[107]];_[_0x1f3c[86]](_0x9ec0x3f,function(_0x9ec0x33){if(_0x9ec0x33[_0x1f3c[90]]=== _0x1f3c[91]){_0x9ec0x40[_0x1f3c[93]]({id:_0x9ec0x33[_0x1f3c[108]],value:_0x9ec0x33[_0x1f3c[92]]})}else {if(_0x9ec0x33[_0x1f3c[90]]=== _0x1f3c[94]){var _0x9ec0x39=getValueFromPropertyName(_0x9ec0x1d,_0x9ec0x33[_0x1f3c[95]],_0x9ec0xf);if(_0x9ec0x39){_0x9ec0x40[_0x1f3c[93]]({id:_0x9ec0x33[_0x1f3c[108]],value:_0x9ec0x39.toString()})}}else {if(_0x9ec0x33[_0x1f3c[90]]=== _0x1f3c[96]){var _0x9ec0x3a=_[_0x1f3c[18]](_0x9ec0xe,{"\x6E\x61\x6D\x65":_0x9ec0x33[_0x1f3c[97]][_0x1f3c[34]]});if(_0x9ec0x3a){_0x9ec0x40[_0x1f3c[93]]({id:_0x9ec0x33[_0x1f3c[108]],value:_0x9ec0x3a[_0x1f3c[85]].toString()})}}}}})};return _0x9ec0x40}function handleTaskDisplay(_0x9ec0xf){return function(_0x9ec0xd){if(_0x9ec0xd&& _0x9ec0xd[_0x1f3c[80]]){console[_0x1f3c[11]](_0x1f3c[109],_0x9ec0xd[_0x1f3c[82]]);_0x9ec0xf[_0x1f3c[110]]= _0x9ec0xd[_0x1f3c[82]];return};return}}function handleReportIntegration(_0x9ec0xf,_0x9ec0xc,_0x9ec0xd,_0x9ec0xa){return function(){_0x9ec0xd= _0x9ec0xd[_0x1f3c[51]];delete _0x9ec0xd[_0x1f3c[82]];_0x9ec0xd[_0x1f3c[111]]= _0x1f3c[112];_0x9ec0xd[_0x1f3c[113]]= _0x9ec0xc;_0x9ec0xd[_0x1f3c[114]]= _0x1f3c[80];_0x9ec0xd[_0x1f3c[115]]= _0x9ec0xf[_0x1f3c[110]];_0x9ec0xd[_0x1f3c[116]]= _0x9ec0xa;_0x9ec0xd[_0x1f3c[117]]= util[_0x1f3c[52]](_0x1f3c[118],_0x9ec0xf[_0x1f3c[19]][_0x1f3c[119]],_0x9ec0xf[_0x1f3c[110]]);return ReportIntegration[_0x1f3c[76]](_0x9ec0xd)}}function handleEnd(_0x9ec0xf,_0x9ec0xd,_0x9ec0xc){return function(){console[_0x1f3c[11]](util[_0x1f3c[52]](_0x1f3c[120],_0x9ec0xf[_0x1f3c[110]],_0x9ec0xf[_0x1f3c[56]].Id));_0x9ec0xf= undefined;return}}function handleError(_0x9ec0xf,_0x9ec0xc,_0x9ec0xd,_0x9ec0xa){return function(_0x9ec0x45){console[_0x1f3c[15]](_0x1f3c[121]);console[_0x1f3c[15]](_0x1f3c[122],_0x9ec0x45[_0x1f3c[123]]);console[_0x1f3c[15]](_0x1f3c[124],_0x9ec0x45[_0x1f3c[125]]);_0x9ec0xf= undefined;delete _0x9ec0xd[_0x1f3c[82]];_0x9ec0xd= _0x9ec0xd[_0x1f3c[51]];_0x9ec0xd[_0x1f3c[111]]= _0x1f3c[112];_0x9ec0xd[_0x1f3c[113]]= _0x9ec0xc;_0x9ec0xd[_0x1f3c[114]]= _0x1f3c[126];_0x9ec0xd[_0x1f3c[116]]= _0x9ec0xa;ReportIntegration[_0x1f3c[76]](_0x9ec0xd)[_0x1f3c[17]](function(){return})[_0x1f3c[16]](function(_0x9ec0x45){console[_0x1f3c[15]](_0x1f3c[127]);return})}}function stripTrailingSlash(_0x9ec0x47){if(_0x9ec0x47[_0x1f3c[128]](-1) === _0x1f3c[129]){return _0x9ec0x47[_0x1f3c[128]](0,_0x9ec0x47[_0x1f3c[54]]- 1)};return _0x9ec0x47}module[_0x1f3c[130]]= Salesforce
\ No newline at end of file