93e990092b60ca18167f5fddb084c742017b22c1
[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 _0xb5fb=['clientId','clientSecret','securityToken','serverUrl','type','moduleCreate','ticketType','additionalSearchContact','SalesforceField','Subjects','Variable','Descriptions','Fields','../../client','getSalesforceAccounts','Request','GetSalesforceAccount','name','username','password','remoteUri'];(function(_0x3cd0e9,_0x2b2cbf){var _0xf8a2c4=function(_0x32e6fa){while(--_0x32e6fa){_0x3cd0e9['push'](_0x3cd0e9['shift']());}};_0xf8a2c4(++_0x2b2cbf);}(_0xb5fb,0x172));var _0xbb5f=function(_0x2201e1,_0x50ba88){_0x2201e1=_0x2201e1-0x0;var _0x5a063f=_0xb5fb[_0x2201e1];return _0x5a063f;};'use strict';var client=require(_0xbb5f('0x0'));exports[_0xbb5f('0x1')]=function(){return function(_0x1aeade){return client[_0xbb5f('0x2')](_0xbb5f('0x3'),{'options':{'raw':![],'attributes':['id',_0xbb5f('0x4'),_0xbb5f('0x5'),_0xbb5f('0x6'),_0xbb5f('0x7'),_0xbb5f('0x8'),_0xbb5f('0x9'),_0xbb5f('0xa'),_0xbb5f('0xb'),_0xbb5f('0xc')],'include':[{'model':'SalesforceConfiguration','as':'Configurations','attributes':['id',_0xbb5f('0x4'),'moduleSearch',_0xbb5f('0xd'),_0xbb5f('0xe'),'leadId','additionalSearchAccount',_0xbb5f('0xf'),'additionalSearchLead'],'include':[{'model':_0xbb5f('0x10'),'as':_0xbb5f('0x11'),'include':[{'model':_0xbb5f('0x12'),'as':_0xbb5f('0x12'),'attributes':['id',_0xbb5f('0x4')]}]},{'model':_0xbb5f('0x10'),'as':_0xbb5f('0x13'),'include':[{'model':_0xbb5f('0x12'),'as':'Variable','attributes':['id',_0xbb5f('0x4')]}]},{'model':'SalesforceField','as':_0xbb5f('0x14'),'include':[{'model':_0xbb5f('0x12'),'as':_0xbb5f('0x12'),'attributes':['id','name']}]}]}]},'log':_0xbb5f('0x3')});};};