e1d50b7fe261dcb7428969dab53e790f004f94cc
[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 _0x4123=['moduleSearch','moduleCreate','leadId','additionalSearchAccount','additionalSearchContact','additionalSearchLead','SalesforceField','Subjects','Variable','../../client','getSalesforceAccounts','Request','GetSalesforceAccount','name','username','password','clientSecret','securityToken','type','SalesforceConfiguration','Configurations'];(function(_0x2f5718,_0x5c9232){var _0x5af8e4=function(_0x9fe3e2){while(--_0x9fe3e2){_0x2f5718['push'](_0x2f5718['shift']());}};_0x5af8e4(++_0x5c9232);}(_0x4123,0x87));var _0x3412=function(_0x13ee11,_0x129ca5){_0x13ee11=_0x13ee11-0x0;var _0xfe3915=_0x4123[_0x13ee11];return _0xfe3915;};'use strict';var client=require(_0x3412('0x0'));exports[_0x3412('0x1')]=function(){return function(_0x1085b8){return client[_0x3412('0x2')](_0x3412('0x3'),{'options':{'raw':![],'attributes':['id',_0x3412('0x4'),_0x3412('0x5'),_0x3412('0x6'),'remoteUri','clientId',_0x3412('0x7'),_0x3412('0x8'),'serverUrl',_0x3412('0x9')],'include':[{'model':_0x3412('0xa'),'as':_0x3412('0xb'),'attributes':['id',_0x3412('0x4'),_0x3412('0xc'),_0x3412('0xd'),'ticketType',_0x3412('0xe'),_0x3412('0xf'),_0x3412('0x10'),_0x3412('0x11')],'include':[{'model':_0x3412('0x12'),'as':_0x3412('0x13'),'include':[{'model':_0x3412('0x14'),'as':_0x3412('0x14'),'attributes':['id',_0x3412('0x4')]}]},{'model':'SalesforceField','as':'Descriptions','include':[{'model':_0x3412('0x14'),'as':_0x3412('0x14'),'attributes':['id',_0x3412('0x4')]}]},{'model':'SalesforceField','as':'Fields','include':[{'model':'Variable','as':_0x3412('0x14'),'attributes':['id',_0x3412('0x4')]}]}]}]},'log':_0x3412('0x3')});};};