Changes

Jump to: navigation, search

Creating SmartConnect Functions

136 bytes added, 18:46, 24 June 2020
no edit summary
* '''Record Type''' – a list of all SmartSimple objects within this instance. This will include: Report (reports you have created in the instance), Organization (company records), Users (system users and contacts), and each Universal Tracking Application™ Level 1, Level 2 and Level 3 type that you have created in the instance.
* '''Action Type''' – this defines the action to be taken by the function. The following actions are available:  GET META, UPDATE META, GET, LIST, UPDATE, UPDATE ASSOCIATIONS, LIST ASSOCIATIONS, DOWNLOAD FILE, LIST FILES, SEARCH FILES, LIST NOTES and  VARIABLE REPLACE. Details on these Action Types / Methods are available below.
* '''Field List''' – is used to define which fields are retrievable through the function call. Please limit field list to ~50 standard fields/custom fields.
==Configurations and Responses==
'''Object Type'''  -  Company<br />
'''Action Type '''  -  Get Meta<br />
'''Field List'''  - companies.*<br /> 
No parameters are needed to retrieve metadata.
 
 
[[File:APIFunctionGetOrgMeta.PNG|800px]]
 
====Get Metadata from Contacts====
<!--63342 - SmartConnect API - metadata option to include Orgs/Contacts-->
'''Field List'''  - contacts.*<br />
No parameters are needed to retrieve metadata.
 
[[File:APIFunctionGetUserMeta.PNG|800px]]
 
===Report===
This function will retrieve the results of the query from an existing report by using the [[Determining_the_reportid|'''reportid''']].
====Retrieve a Single Organization Record====
'''Function Name'''  -  3.03.1 Get Method Sample 1: Retrieve a Single Organization Record<br />
'''Description'''  - This function will retrieve a single record from the organization using the recordid: [[Determining_the_companyid|Company ID]]. The function is set up to retrieve the fields listed under under '''Field List'''.<br />  
'''Object Type'''  -  Company<br />
'''Action Type '''  -  Get<br />
sf_Status ID - assigned [[Determining_the_statusid|Status ID]] of the new UTA L1 record.<br />
--Begin custom parameter --<br />
jsonrset : [{"recordid":"0","sf_Type ID":"20654","sf_Status ID":"25178","sf_Name":"Test 1 Application","sf_Company IDsf_Customer":"1767970","sf_Person ID":"88159402","sf_Owner ID":"3108429","sf_Start Date":"2018-01-01","sf_End Date":"2018-12-31"}]<br />
--End custom parameter--
Parameter Sample#1<br />
--Begin custom parameter --<br />
jsonrset : [{"objectidrecordid":"10697883","contacts":[{"contactid":"3108577","rolename":"Meeting Participant","isupdate":"0"}]}] <br />
--End custom parameter--
Parameter Sample#2 - Starting May 2019 Upgrade<br />
--Begin custom parameter --<br />
jsonrset : [{"objectidrecordid":"10697883","contacts":[{"contactid":"3108577","rolename":"Signee Internal"}]}] <br />
--End custom parameter--
Parameter Sample#3 - adding multiple contacts sample<br />
--Begin custom parameter --<br />
jsonrset : [{"objectidrecordid":"10697883","contacts":[{"contactid":"3108226","rolename":"Signee Internal"},{"contactid":"3108119","rolename":"Meeting Participant"}]}] <br />
--End custom parameter--
--Begin custom parameter --<br />
jsonrset : [{"objectidrecordid":"10697883","contacts":[{"isupdate":"1","contactid":"88435720","rolenameassociationid":"Staff2829620","associationidcf_My customfield":"2829620updated value"}]}]<br />
--End custom parameter--
--Begin custom parameter --<br />
jsonrset : [{"recordid":"1924629"},{"recordid":"1924630"},{"recordid":"1924631"}]<br />
--End custom parameter--<br />
Result:<br />
{"records":[{"recordid":"1924629","status":"Object Deleted"},<br />
1. For May 2019 upgrade, add/update function will not support custom fields of the relationship.<br />
2. Update function is only used to update role between consumer/provider. When roleid/rolename is updated, all custom fields of the relationship from the previous role will be deleted.<br />
3. List function supports standard fields and custom fields of To update either the relationship.<br />4. TO change consumerid or the provideridof the consumer/provider record, the these ids can't be updated. The record should be deleted delete first and a then add new consumer/provider record should be added.<br />3. List function supports standard fields and custom fields of the relationship.  
====List Consumer/Provider Records====
Smartstaff
1,385
edits

Navigation menu