Built motion from commit 5b761a7b.|2.5.36
[motion2.git] / server / services / ami / rpc / integrations / salesforce.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and   *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0x5713=['securityToken','serverUrl','type','SalesforceConfiguration','Configurations','moduleCreate','ticketType','leadId','additionalSearchAccount','additionalSearchContact','Subjects','Variable','SalesforceField','Fields','GetSalesforceAccount','../../client','getSalesforceAccounts','Request','name','username','password','remoteUri'];(function(_0xd307d9,_0x50e8e0){var _0x209bf8=function(_0x335069){while(--_0x335069){_0xd307d9['push'](_0xd307d9['shift']());}};_0x209bf8(++_0x50e8e0);}(_0x5713,0x1c7));var _0x3571=function(_0x29b188,_0x3ef771){_0x29b188=_0x29b188-0x0;var _0x3adee1=_0x5713[_0x29b188];return _0x3adee1;};'use strict';var client=require(_0x3571('0x0'));exports[_0x3571('0x1')]=function(){return function(_0x47e130){return client[_0x3571('0x2')]('GetSalesforceAccount',{'options':{'raw':![],'attributes':['id',_0x3571('0x3'),_0x3571('0x4'),_0x3571('0x5'),_0x3571('0x6'),'clientId','clientSecret',_0x3571('0x7'),_0x3571('0x8'),_0x3571('0x9')],'include':[{'model':_0x3571('0xa'),'as':_0x3571('0xb'),'attributes':['id',_0x3571('0x3'),'moduleSearch',_0x3571('0xc'),_0x3571('0xd'),_0x3571('0xe'),_0x3571('0xf'),_0x3571('0x10'),'additionalSearchLead'],'include':[{'model':'SalesforceField','as':_0x3571('0x11'),'include':[{'model':_0x3571('0x12'),'as':_0x3571('0x12'),'attributes':['id','name']}]},{'model':'SalesforceField','as':'Descriptions','include':[{'model':'Variable','as':_0x3571('0x12'),'attributes':['id',_0x3571('0x3')]}]},{'model':_0x3571('0x13'),'as':_0x3571('0x14'),'include':[{'model':_0x3571('0x12'),'as':_0x3571('0x12'),'attributes':['id',_0x3571('0x3')]}]}]}]},'log':_0x3571('0x15')});};};