Changes

Jump to: navigation, search

Creating SmartConnect Functions

3,451 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--
[[File:Delete_user.PNG|800px]]
 
====Delete Organization Records (Batch delete)====
<!--89075 - SmartConnect batch delete-->
'''Function Name'''  -  3.09.1 Delete Organization Records<br />
'''Description'''  - Delete existing organization records <br />
'''Object Type'''  -  Company<br />
'''Action Type '''  - Delete<br />
'''Field List'''  -  
--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 />
{"recordid":"1924630","status":"Object Deleted"},<br />
{"recordid":"1924631","status":"Object Deleted"}],"message":{}}
====Delete a Single Contact Record====
'''Function Name'''  -  3.09.2 Delete Contact Record<br />
'''Description'''  - Delete existing user record <br />
'''Object Type'''  -  User<br />
'''Action Type '''  - Delete<br />
'''Field List'''  -  
 
--Begin custom parameter --<br />
jsonrset : [{"recordid":"88173129"}]<br />
--End custom parameter--
====Delete a Single Grant Application Record====
<!--72195 - SmartConnect Function on Transaction Applied to prod for May 2019 Upgrade-->
* <span style="color: #ff0000;">Available after May 2019 upgrade.</span>
Transaction should be [[Category:Transactions Transaction_Attribution| configured]] before using this API function. Transactions can be attached to an object (Organization or User or UTA L1/L2).
====Get Transaction Record====
=====3.10.1.1 Get a Transaction Record from an Organization=====
'''Function Name'''  -  3.10.1.1 Get a Transaction Record from an Organization<br />
'''Description'''  - Retrieve an organization transaction record <br />
'''Mandatory fields''' to get a transaction record:<br/>
recordid -  the unique identifier from the transaction table.<br />
--Begin custom parameter --<br />
recordid:2738520<br />
othersettings :<br />
--End custom parameter--<br />
[[File:TransactionGet1.PNG|800px]]
=====3.10.1.2 Retrieve a Transaction Record from a Submission Manager L1=====
'''Function Name'''  -  3.10.1.2 Get Method Sample 4: Retrieve a Transaction Record from a Submission Manager L1<br />
'''Description'''  - Retrieve a transaction record <br />
'''Mandatory fields''' to get a transaction record:<br/>
recordid -  the unique identifier from the transaction table.<br/>
--Begin custom parameter --<br />
recordid:2738527<br />
othersettings :<br />
--End custom parameter--<br/>
[[File:TransactionGet2.PNG|800px]]
'''Object Type'''  -  Submission Manager - Transactions<br />
'''Action Type '''  - List<br />
'''Field List'''  -  sf_End Date;;sf_Description;;sf_Subject;;sf_Start Date;;sf_Status;;sf_Modified Date;;sf_Updated By;;sf_Created Date;;sf_Created By;;sf_Type;;sf_Transaction ID;;sf_Object ID<br />
<u>'''Sample 2A'''</u><br/>
sortby:<br />
othersettings :<br />
--End custom parameter--<br />
[[File:TransactionList.PNG|800px]]
sortby:<br />
othersettings :<br />
--End custom parameter--<br />
[[File:TransactionList2.PNG|800px]]
====Update Transaction Record====
=====3.10.3.1 Create or Update Transaction Record in Organization Profile=====
'''Function Name'''  -  3.10.3.1 Create or Update Transaction Record in Organization Profile<br />
'''Description'''  - Create new transaction record attached to a Organization record <br />
'''Object Type'''  -  Company Transactions<br />
'''Action Type '''  - Update<br />
'''Field List'''  -  sf_Transaction ID;;sf_Object ID;;sf_Description;;sf_Subject;;sf_Type;;sf_Status;;sf_Created Date;;sf_Modified Date;;sf_Created By;;sf_Updated By<br/>
'''Mandatory fields''' to add a new transaction record:<br/>
[[File:TransactionUpdate1.PNG|800px]]
=====3.10.3.2 Create or Update Transaction Record in Submission Manager L1=====
'''Function Name'''  -  3.10.3.2 Create or Update Transaction Record in Submission Manager L1<br />
'''Description'''  - Create new transaction record attached to a Submission Manager L1 record <br />
====Delete Transaction Record====
'''Function Name'''  -  3.0910.6 4 Delete Transaction Record<br />
'''Description'''  - Delete a transaction record <br />
'''Object Type'''  -  Submission Manager - Company Transactions<br />
'''Action Type '''  - Delete<br />
'''Field List'''  -  
--Begin custom parameter --<br />
jsonrset : [{"recordid":"27379922738523"}]<br />
--End custom parameter--
 
[[File:TransactionDelete1.PNG|800px]]
===UTA Consumer/Provider===
* <span style="color: #ff0000;">Available after May 2019 upgrade.</span>
Consumer/Provider Relationship should be [[Configuring_UTA_Provider/Receiver_(Consumer)_Relationships | configured]] before using this API function. UTA Provider/Consumer Relationships allows for the sharing of data between different [[UTA|UTAs]].
 
'''Notes'''<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. To update either the consumerid or the providerid of the consumer/provider record, these ids can't be updated. The record should be delete first and then add new consumer/provider record.
3. List function supports standard fields and custom fields of the relationship.
 
 
====List Consumer/Provider Records====
'''Function Name'''  -  3.11.1 List Consumer/Provider Records<br />'''Description'''  -  Get a list of all Consumer/Provider records<br />'''Object Type'''  -  Submission Manager - Grant<br />'''Action Type '''  -  List Provider / Consumer Link<br />'''Provider/Consumer Link '''  -  Meeting Manager - L1 to Submission Manager - L1<br />
'''Field List''' -
<u>'''Sample 1A'''</u><br/>
'''Description'''  - Retrieve list of all consumer/provider records <br />
--Begin custom parameter --<br />
criteria:<br />
sortby:<br />
othersettings :<br />
--End custom parameter--
[[File:ConsumerProviderList1.PNG|800px]]
====Create or Update or Delete Consumer/Provider Record===='''Function Name'''  -  3.11.2 Create or Update or Delete Consumer/Provide Records<br />'''Description'''  -  Create, update or delete consumer/provider records<br />'''Object Type'''  -  Submission Manager - Grant<br />'''Action Type '''  -  Update Provider/ Consumer Link<br />'''Provider/Consumer Link '''  -  Meeting Manager - L1 to Submission Manager - L1<br />
'''Field List''' -
'''Mandatory fields''' to add a new transaction record:<br/>
providerid - [[Determining_the_applicationid|Application ID]] of the provider UTA<br/>
consumerid - [[Determining_the_applicationid|Application ID]] of the consumer UTA <br/>
roleid/rolename - Connection roleid/rolename between consumer/provider <br/>
associationid - Unique identifier for the consumer/provider relationship table
 
 
<u>'''Sample 2A'''</u><br/>
'''Description'''  - Create a new consumer/provider record <br />
--Begin custom parameter --<br />
jsonrset : [{"associationid": "0","roleid": "82840","consumerid":"10697883","providerid":"11191051"}]<br />
--End custom parameter--
 
[[File:ConsumerProviderCreate1.PNG|800px]]
<u>'''Sample 2B'''</u><br/>
'''Description'''  - Update an existing consumer/provider record <br />
--Begin custom parameter --<br />
jsonrset : [{"associationid":"265692","isupdate":"1","rolename":"Cycle","consumerid":"8276105","providerid":"11190976"}]<br />
--End custom parameter--
====Delete Consumer/Provider Record===='''Function Name'''  -  <br />'''Description'''  - <br />'''Object Type'''  -  <br />'''Action Type '''  - <br />'''Provider/Consumer Link '''  - <br />'''Field List''' -[[File:ConsumerProviderUpdate1.PNG|800px]]
<u>'''Sample 2C'''</u><br/>
'''Description'''  - Delete an existing consumer/provider record <br />
--Begin custom parameter --<br />
jsonrset : [{"associationid":"265694","isdelete":"1","rolename": "Meeting","consumerid":"8276202","providerid":"11190976"}]<br />
--End custom parameter--
[[File:ConsumerProviderDelete1.PNG|800px]]
==See Also==
Smartstaff
1,385
edits

Navigation menu