Changes

Creating SmartConnect Functions

1,022 bytes added, 19:43, 6 September 2018
no edit summary
===Metadata===
This function will retrieve the metadata of the selected '''Object Type'''.<br />
====Get Metadata of a Universal Tracking Application====
'''Field List'''  - companies.*
No parameters are needed to retrieve metadata.<br /> 
 
====Get Metadata from Contacts====
<!--63342 - SmartConnect API - metadata option to include Orgs/Contacts-->
'''Field List'''  - contacts.*
No parameters are needed to retrieve metadata.
 
===Update===
This function will create new records or update existing records based on the selected '''Object Type'''.<br/>
====Update====
'''Object Type'''  -  Company<br />
'''Action Type '''  -  Update<br />
'''Field List'''  - sf_Name;;sf_Is External;;sf_Parent Company ID;;sf_Address;;sf_Address 2;;sf_City;;sf_State / Province;;sf_Zip / Postal Code;;sf_Country;;cf_EIN Number;;cf_1523156;;sf_Category ID List<br />
<u>'''Sample 1A'''</u><br/>
===Download File===
This function will download the file.<br/>
====Download File(s) from a company profile====
'''Object Type'''  -  Company<br />
'''Action Type '''  -  Download File<br />
'''Field List'''  -<br /> 
'''Mandatory fields''' to download a file:<br/>
filename - name of the file to be downloaded.<br/>
filename: Test.txt<br />
objectid: 1688407<br />
fieldid: 1523157<br />
--End custom parameter--<br />
Note: In the API website, the content of the file will be shown in the Response section as seen below.<br />
[https://api.smartsimple.com/API/1/report/?url=https://api.smartsimple.com/API/1/report/&companyid=825646&alias=api&username=dataimport@smartsimple.com&password=smartsimple1&apitoken=W0t2dV58fmZGR1lzUmVDc2xibnd8BEdfAgMBAg~~&filename=Test.txt&objectid=1688407&fieldid=1523157| Click here to download the file]<br />
[[File:APIFunctionDownloadFile1.PNG|800px]]
===Search File===
This function will retrieve a list of files by searching for a keyword.<br />
====Search Files Method Sample 1: Search Case Documents====
'''Object Type'''  -  Case Management 360° - Case<br />
'''Action Type '''  -  Search Files<br />
'''Field List'''  - cf_Case Documents;;sf_Application Template Type;;sf_Customer<br />
--Begin custom parameter --<br />
===System Variables===
This function will retrieve a list of all the global [[System_Variables|system variables]], get a single record based on the System Variable ID or update the name or value of the [[System_Variables|system variables]] using the System Variable ID.<br/>
<!--71972 - SmartConnect Function: System Variables - does not show when using '/devtools/dev_api.html'-->
====Variables Replace - Company====
'''Function Name'''  -  3.09.1 System Variables Replace - UserCompany<br />'''Description'''  - passing  This function will send the objectid=[[Determining_the_companyid|Company ID]] and the desired contentwith system variables. It returns a json format of the content with all the [[System_Variables|system variables]] replaced by the variable processor. <br />
'''Object Type'''  -  Company<br />
'''Action Type '''  - Variables Replace<br />
'''Field List'''  - <br /> 
 
--Begin custom parameter --<br />
objectid: 825646<br />
content: Company name is @name@, located at @address@, @city@, @country@. Primary Contact is @primarycontact@.<br />
--End custom parameter--<br />
[[File:APIFunctionVariablesReplace1.PNG|800px]]
====Variables Replace - User====
'''Function Name'''  -  3.09.2 System Variables Replace - User<br />
'''Description'''  - This function will send the objectid=[[Determining_the_userid|User ID]] and the desired content with system variables. It returns a json format of the content with all the [[System_Variables|system variables]] replaced by the variable processor. <br />
'''Object Type'''  -  User<br />
'''Action Type '''  - Variables Replace<br />
'''Field List'''  - <br /> 
 
--Begin custom parameter --<br />
objectid: 88070344<br />
content: Hello @firstname@ (@userid@), from company @company@, located in @company.address@..<br />
--End custom parameter--<br />
 
[[File:APIFunctionVariablesReplace1.PNG|800px]]
====Variables Replace - UTA L1====
 
====Variables Replace - UTA L2====
 
====Variables Replace - UTA L3====
 
==See Also==
[[SmartConnect_-_RESTful_API|SmartConnect - RESTful API]] <br data-attributes="%20/">
Smartstaff
1,385
edits