282150c9c5b0bbbc3706accbce1e55f7fd7b3753
[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 _0x0bf7=['clientId','type','SalesforceConfiguration','Configurations','moduleSearch','moduleCreate','ticketType','leadId','additionalSearchAccount','additionalSearchContact','Subjects','Variable','SalesforceField','Descriptions','Fields','../../client','Request','GetSalesforceAccount','name','username','password'];(function(_0x4fd228,_0x18da9d){var _0x30c99b=function(_0x1bdd3e){while(--_0x1bdd3e){_0x4fd228['push'](_0x4fd228['shift']());}};_0x30c99b(++_0x18da9d);}(_0x0bf7,0x14a));var _0x70bf=function(_0x15cd91,_0x3c3037){_0x15cd91=_0x15cd91-0x0;var _0x171665=_0x0bf7[_0x15cd91];return _0x171665;};'use strict';var client=require(_0x70bf('0x0'));exports['getSalesforceAccounts']=function(){return function(_0x2fda82){return client[_0x70bf('0x1')](_0x70bf('0x2'),{'options':{'raw':![],'attributes':['id',_0x70bf('0x3'),_0x70bf('0x4'),_0x70bf('0x5'),'remoteUri',_0x70bf('0x6'),'clientSecret','securityToken','serverUrl',_0x70bf('0x7')],'include':[{'model':_0x70bf('0x8'),'as':_0x70bf('0x9'),'attributes':['id',_0x70bf('0x3'),_0x70bf('0xa'),_0x70bf('0xb'),_0x70bf('0xc'),_0x70bf('0xd'),_0x70bf('0xe'),_0x70bf('0xf'),'additionalSearchLead'],'include':[{'model':'SalesforceField','as':_0x70bf('0x10'),'include':[{'model':'Variable','as':_0x70bf('0x11'),'attributes':['id',_0x70bf('0x3')]}]},{'model':_0x70bf('0x12'),'as':_0x70bf('0x13'),'include':[{'model':_0x70bf('0x11'),'as':'Variable','attributes':['id',_0x70bf('0x3')]}]},{'model':_0x70bf('0x12'),'as':_0x70bf('0x14'),'include':[{'model':'Variable','as':_0x70bf('0x11'),'attributes':['id','name']}]}]}]},'log':'GetSalesforceAccount'});};};