Difference between revisions of "Creating SmartConnect Functions"
Line 61: | Line 61: | ||
[[File:APIFunctionSample4.PNG|800px]] | [[File:APIFunctionSample4.PNG|800px]] | ||
+ | |||
+ | ====Get System Variables==== | ||
+ | '''Function Name''' - 3.01.5 System Variables Sample 1: Get<br /> | ||
+ | '''Description''' - Get information on the [[System_Variables|system variables]] by searching the System Variable ID<br /> | ||
+ | '''Object Type''' - System Variables<br /> | ||
+ | '''Action Type ''' - Get<br /> | ||
+ | '''Field List''' - sf_ID;;sf_Name;;sf_Value;; | ||
+ | |||
+ | --Begin custom parameter --<br /> | ||
+ | recordid: 3601<br /> | ||
+ | --End custom parameter-- | ||
+ | |||
+ | [[File:APIFunctionSystemVariables2.PNG|800px]] | ||
+ | |||
===Report=== | ===Report=== | ||
Line 127: | Line 141: | ||
=====Retrieve a list of contacts===== | =====Retrieve a list of contacts===== | ||
− | '''Function Name''' - 3.03 | + | '''Function Name''' - 3.03.1 List Method Sample 1: Retrieve a list of Contacts<br /> |
'''Description''' - This function will retrieve a list of contacts based on criteria specified.<br /> | '''Description''' - This function will retrieve a list of contacts based on criteria specified.<br /> | ||
'''Object Type''' - User<br /> | '''Object Type''' - User<br /> | ||
Line 154: | Line 168: | ||
=====Retrieve a list of organizations===== | =====Retrieve a list of organizations===== | ||
− | '''Function Name''' - 3.03 | + | '''Function Name''' - 3.03.2 List Method Sample 2: Retrieve a list of Organizations<br /> |
'''Description''' - To retrieve a list of organizations. | '''Description''' - To retrieve a list of organizations. | ||
Line 183: | Line 197: | ||
=====Retrieve a list of claims===== | =====Retrieve a list of claims===== | ||
− | '''Function Name''' - 3.03 | + | '''Function Name''' - 3.03.3 List Method Sample 3: CMS360° - Retrieve a list of claims<br /> |
'''Description''' - To retrieve a list of claims by professors sorted by organization name in descending order.<br /> | '''Description''' - To retrieve a list of claims by professors sorted by organization name in descending order.<br /> | ||
'''Object Type''' - Cast Management 360° - Case<br /> | '''Object Type''' - Cast Management 360° - Case<br /> | ||
Line 199: | Line 213: | ||
====List File==== | ====List File==== | ||
=====List files of an existing organization===== | =====List files of an existing organization===== | ||
− | '''Function Name''' - 3.03. | + | '''Function Name''' - 3.03.4.1 List Files Method Sample 1: from an existing organization<br /> |
'''Description''' - To retrieve the list of file(s) from the organization using the [[Determining_the_companyid|Company ID]]<br /> | '''Description''' - To retrieve the list of file(s) from the organization using the [[Determining_the_companyid|Company ID]]<br /> | ||
'''Object Type''' - Company<br /> | '''Object Type''' - Company<br /> | ||
Line 218: | Line 232: | ||
=====List files from an existing application===== | =====List files from an existing application===== | ||
− | '''Function Name''' - 3.03. | + | '''Function Name''' - 3.03.4.2 List Files Method Sample 2: from an existing application<br /> |
'''Description''' - To retrieve the list of file(s) of an existing application using the [[Determining_the_opportunityid|Opportunity ID]]<br /> | '''Description''' - To retrieve the list of file(s) of an existing application using the [[Determining_the_opportunityid|Opportunity ID]]<br /> | ||
'''Object Type''' - Submission Manager - Grant<br /> | '''Object Type''' - Submission Manager - Grant<br /> | ||
Line 238: | Line 252: | ||
====List Notes==== | ====List Notes==== | ||
=====List notes from an existing application===== | =====List notes from an existing application===== | ||
− | '''Function Name''' - 3.03. | + | '''Function Name''' - 3.03.5.1 List Notes Method Sample 1: from an existing application<br /> |
'''Description''' - To retrieve all note(s) associated with an existing application using the [[Determining_the_opportunityid|Opportunity ID]]<br /> | '''Description''' - To retrieve all note(s) associated with an existing application using the [[Determining_the_opportunityid|Opportunity ID]]<br /> | ||
'''Object Type''' - Submission Manager - Grant<br /> | '''Object Type''' - Submission Manager - Grant<br /> | ||
Line 254: | Line 268: | ||
====List Multiple Addresses==== | ====List Multiple Addresses==== | ||
=====List all Multiple Addresses of an existing Organization===== | =====List all Multiple Addresses of an existing Organization===== | ||
− | '''Function Name''' - 3.03. | + | '''Function Name''' - 3.03.6.1 List Multiple Addresses Method Sample 1: Multiple Addresses of an existing Organization<br /> |
'''Description''' - To retrieve all of the multiple addresses of an existing organization using the [[Determining_the_companyid|Company ID]]<br /> | '''Description''' - To retrieve all of the multiple addresses of an existing organization using the [[Determining_the_companyid|Company ID]]<br /> | ||
'''Object Type''' - Company<br /> | '''Object Type''' - Company<br /> | ||
Line 270: | Line 284: | ||
====List Associations==== | ====List Associations==== | ||
=====List Contact associations from an existing application===== | =====List Contact associations from an existing application===== | ||
− | '''Function Name''' - 3.03. | + | '''Function Name''' - 3.03.7.1 List Associations Method Sample 1: Contact associations from an existing application<br /> |
'''Description''' - To retrieve the list of contacts associated with an existing application using the [[Determining_the_opportunityid|Opportunity ID]]<br /> | '''Description''' - To retrieve the list of contacts associated with an existing application using the [[Determining_the_opportunityid|Opportunity ID]]<br /> | ||
'''Object Type''' - Submission Manager - Grant<br /> | '''Object Type''' - Submission Manager - Grant<br /> | ||
Line 287: | Line 301: | ||
=====List Organization associations from an application===== | =====List Organization associations from an application===== | ||
− | '''Function Name''' - 3.03. | + | '''Function Name''' - 3.03.7.2 List Associations Method Sample 2: Organization associations from an existing application<br /> |
'''Description''' - To retrieve the list of organizations associated with an existing application using the [[Determining_the_opportunityid|Opportunity ID]]<br /> | '''Description''' - To retrieve the list of organizations associated with an existing application using the [[Determining_the_opportunityid|Opportunity ID]]<br /> | ||
'''Object Type''' - Submission Manager - Grant<br /> | '''Object Type''' - Submission Manager - Grant<br /> | ||
Line 302: | Line 316: | ||
[[File:APIFunctionSample5k.PNG|800px]] | [[File:APIFunctionSample5k.PNG|800px]] | ||
+ | |||
+ | ====List System Variables==== | ||
+ | '''Function Name''' - 3.03.8.1 System Variables Sample 1: List<br /> | ||
+ | '''Description''' - Retrieves all the [[System_Variables|system variables]]<br /> | ||
+ | '''Object Type''' - System Variables<br /> | ||
+ | '''Action Type ''' - List<br /> | ||
+ | '''Field List''' - sf_ID;;sf_Name;;sf_Value;; | ||
+ | |||
+ | No parameters are needed to retrieve all the global [[System_Variables|system variables]].<br /> | ||
+ | |||
+ | [[File:APIFunctionSystemVariables1.PNG|800px]] | ||
===Metadata=== | ===Metadata=== | ||
Line 325: | Line 350: | ||
'''Field List''' - companies.*<br /> | '''Field List''' - companies.*<br /> | ||
No parameters are needed to retrieve metadata.<br /> | No parameters are needed to retrieve metadata.<br /> | ||
− | Available in November 2018 Upgrade | + | Available in November 2018 Upgrade |
====Get Metadata from Contacts==== | ====Get Metadata from Contacts==== | ||
<!--63342 - SmartConnect API - metadata option to include Orgs/Contacts--> | <!--63342 - SmartConnect API - metadata option to include Orgs/Contacts--> | ||
Line 334: | Line 359: | ||
'''Field List''' - contacts.*<br /> | '''Field List''' - contacts.*<br /> | ||
No parameters are needed to retrieve metadata.<br /> | No parameters are needed to retrieve metadata.<br /> | ||
− | Available in November 2018 Upgrade | + | Available in November 2018 Upgrade |
===Update=== | ===Update=== | ||
This function will create new records or update existing records based on the selected '''Object Type'''. | This function will create new records or update existing records based on the selected '''Object Type'''. | ||
Line 466: | Line 491: | ||
[[File:APIFunctionSample6h.PNG|800px]] | [[File:APIFunctionSample6h.PNG|800px]] | ||
+ | |||
+ | ====Update System Variables==== | ||
+ | '''Function Name''' - 3.05.4 System Variables Sample 1: Update<br /> | ||
+ | '''Description''' - Updates the value or the name of an existing [[System_Variables|system variables]]<br /> | ||
+ | '''Object Type''' - System Variables<br /> | ||
+ | '''Action Type ''' - Update<br /> | ||
+ | '''Field List''' - sf_ID;;sf_Name;;sf_Value;; | ||
+ | |||
+ | --Begin custom parameter --<br /> | ||
+ | jsonrset : [{"recordid":"9313","sf_Value":"2"}]<br /> | ||
+ | --End custom parameter-- | ||
+ | |||
+ | [[File:APIFunctionSystemVariables3.PNG|800px]] | ||
===Download File=== | ===Download File=== | ||
Line 504: | Line 542: | ||
[[File:APIFunctionSample8.PNG|800px]] | [[File:APIFunctionSample8.PNG|800px]] | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
===Variables Replace=== | ===Variables Replace=== | ||
Line 620: | Line 617: | ||
[[File:APIFunctionVariablesReplace5.PNG|800px]] | [[File:APIFunctionVariablesReplace5.PNG|800px]] | ||
− | + | ||
− | |||
− | |||
====List Transaction Records==== | ====List Transaction Records==== | ||
====Get Transaction Record==== | ====Get Transaction Record==== |
Revision as of 15:19, 12 September 2018
Please note that this page is currently under construction. There is more information to come. |
SmartConnect functions are specific to individual copies of SmartSimple so you can only use the functions that are have been previously established in that copy. The article describes how you add functions to an instance.
Contents
- 1 Creating a New Function
- 2 Function Settings
- 3 Configurations and Responses
- 3.1 Get
- 3.2 Report
- 3.2.1 Report Query
- 3.2.1.1 A report query on the number of assessors grouped by specialty
- 3.2.1.2 A report query on a list of Specialty with more than 5 Assessors per specialty
- 3.2.1.3 A report query on a list of Grants grouped by Organization
- 3.2.1.4 A report query on a list of Grants grouped by Focus Area
- 3.2.1.5 A report query on a list of Payments grouped by Grant Type
- 3.2.1 Report Query
- 3.3 List
- 3.4 Metadata
- 3.5 Update
- 3.6 Download File
- 3.7 Search File
- 3.8 Variables Replace
- 4 See Also
Creating a New Function
You need to have Global User Administrator permissions in order to add JSON functions.
- Log into the copy of SmartSimple where you wish to add the function.
- Navigate to Global Settings.
- Click on the Integrations tab.
- Click on the SmartConnect API link. Existing functions will be listed here for you to update.
- Click on the + button to create a new function.
Function Settings
Each function has the following settings:
- Function Name – you will use this name to call the function from your own code.
- Description – used to provide documentation as to the function’s purpose.
- 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.
Configurations and Responses
Visit the interactive demonstration page to test the sample functions.
Get
This function will retrieve all fields from the Field List of a single record based on the recordid of an Object Type.
Retrieve a Single Organization Record
Function Name - 3.01.1 Get Method Sample 1: Retrieve a Single Organization Record
Description - This function will retrieve a single record from the organization using the recordid: Company ID. The function is set up to retrieve the fields listed under Field List.
Object Type - Company
Action Type - Get
Field List - sf_Company ID;;sf_Name;;sf_Address;;sf_City;;sf_Country;;sf_Zip / Postal Code;;cf_EIN Number;;sf_Mission Statement
Retrieve a Single Contact Record
Function Name - 3.01.2 Get Method Sample 2: Retrieve a Single Contact Record
Description - This function will retrieve a single record from the user table using the User ID. The function is set up to retrieve the fields listed under Field List.
Object Type - User
Action Type - Get
Field List - sf_User ID;;sf_Last Name;;sf_First Name;;sf_Prefix;;sf_Suffix;;sf_Title;;sf_Phone;;sf_Email
Retrieve a Single Grant Application Record
Function Name - 3.01.3 Get Method Sample 3: Retrieve a Single Grant Application Record
Description - This function will retrieve a single record from the Universal Tracking Application Level 1 using the Opportunity ID.
Object Type - Submission Manager - Grant
Action Type - Get
Field List - cf_Project Name;;cf_Submission Number;;sf_Application Type;;sf_Status;;sf_Customer;;sf_Owner;;cf_Focus Area;;cf_Amount Requested;;cf_Program Area;;cf_Location;;cf_Proposed Start Date;;cf_Proposed End Date
Retrieve a Single Grant Application Payment Record
Function Name - 3.01.4 Get Method Sample 4: Retrieve a Single Grant Application Payment Record
Description - This function will retrieve a single record from the Universal Tracking Application Level 2 using the Event ID.
Object Type - Submission Manager - Activity
Action Type - Get
Field List - sf_Status;;sf_Activity Type;;cf_Payment ID;;cf_Payment Amount;;cf_Payment Date;;Payment Notes
Get System Variables
Function Name - 3.01.5 System Variables Sample 1: Get
Description - Get information on the system variables by searching the System Variable ID
Object Type - System Variables
Action Type - Get
Field List - sf_ID;;sf_Name;;sf_Value;;
--Begin custom parameter --
recordid: 3601
--End custom parameter--
Report
This function will retrieve the results of the query from an existing report by using the reportid.
Report Query
Function Name - 3.02.1 Get Report Sample 1: Report Query
Description - To retrieve data from a report.
Object Type - Report
Action Type - Query
Field List -
Mandatory field:
reportid - is the Report ID of the report in the instance.
Optional field
criteriavalue - when the report has text criteria, values for the criteria(s) should be indicated in this field. If report contains multiple criteria, values should be delimited by double semi-colon eg. "VALUE_1;;VALUE_2".
A report query on the number of assessors grouped by specialty
Description - A sample that will display the number of Assessors based on their specialty
--Begin custom parameter --
reportid : 36864
criteriavalue:
--End custom parameter--
A report query on a list of Specialty with more than 5 Assessors per specialty
Description - Shows a list of Specialty with more than 5 Assessors per specialty
--Begin custom parameter --
reportid : 48281
criteriavalue: 5
--End custom parameter--
A report query on a list of Grants grouped by Organization
Description - A sample that shows a list of applications filtered by "Approved Proposal" status grouped by organizations
--Begin custom parameter --
reportid : 36812
criteriavalue:
--End custom parameter--
A report query on a list of Grants grouped by Focus Area
Description - A sample that displays a list of applications grouped by focus area
--Begin custom parameter --
reportid : 36814
criteriavalue:
--End custom parameter--
A report query on a list of Payments grouped by Grant Type
Description - A sample that displays the payment amount for each grant grouped by organization
--Begin custom parameter --
reportid : 36806
criteriavalue:
--End custom parameter--
List
This function will retrieve a list of records from the selected Object Type. Records will include all fields from the Field List and can be filtered using the parameter criteria and can also be sorted out using the parameter sortby. If the custom field has a predefined options, use getstorevalue to show either the display value (getstorevalue: 0) or to show the stored value (getstorevalue: 1).
List
Retrieve a list of contacts
Function Name - 3.03.1 List Method Sample 1: Retrieve a list of Contacts
Description - This function will retrieve a list of contacts based on criteria specified.
Object Type - User
Action Type - List
Field List - sf_User ID;;sf_First Name;;sf_Address;;sf_Address 2;;sf_City;;sf_Country;;sf_State / Province;;sf_Zip / Postal Code;;
Sample 1A
Description - To retrieve a list of contacts where the first name begins with "J" and sorted by first name in ascending order
--Begin custom parameter --
criteria : [{"andor":"or","field":"sf_First Name","operator":"like","value":"J%"}]
sortby : [{"field":"sf_First Name","direction":"asc"}]
getstorevalue :
--End custom parameter--
Sample 1B
Description - To retrieve a list of contacts where the first name begins with "S" and the address contains "Peter" and sorted by first name in ascending order
--Begin custom parameter --
criteria : [{"andor":"or","field":"sf_First Name","operator":"like","value":"S%"},
{"andor":"and","field":"sf_Address","operator":"like","value":"%Peter%"}]
sortby : [{"field":"sf_First Name","direction":"asc"}]
getstorevalue :
--End custom parameter--
Retrieve a list of organizations
Function Name - 3.03.2 List Method Sample 2: Retrieve a list of Organizations
Description - To retrieve a list of organizations.
Object Type - Company
Action Type - List
Field List - sf_Company ID;;sf_Name;;sf_Address;;sf_Address 2;;sf_City;;sf_Country;;sf_State / Province;;sf_Zip / Postal Code;;cf_Mission Statement
Sample 2A
Description - To retrieve a list of organizations with organization name that starts with "Br"
--Begin custom parameter --
criteria : [{"andor":"and","field":"sf_Name","operator":"like","value":"Br%"}]
sortby :
getstorevalue :
--End custom parameter--
Sample 2B
Description - To retrieve a list of organizations with organization name that starts with "Br" and address that contains "Ave" with the list in ascending order based on the organization name.
--Begin custom parameter --
criteria : [{"andor":"and","field":"sf_Name","operator":"like","value":"Br%"},{"andor":"and","field":"sf_Address","operator":"like","value":"%Ave%"}]
sortby : [{"field":"sf_Name","direction":"asc"}]
getstorevalue :
--End custom parameter--
Retrieve a list of claims
Function Name - 3.03.3 List Method Sample 3: CMS360° - Retrieve a list of claims
Description - To retrieve a list of claims by professors sorted by organization name in descending order.
Object Type - Cast Management 360° - Case
Action Type - List
Field List - sf_Application Template Type;;sf_Customer;;cf_Claim;;cf_Nature of Injury / Comments on Claim;;sf_Activity List
--Begin custom parameter --
criteria : [{"andor":"and","field":"cf_Nature of Injury / Comments on Claim","operator":"like","value":"%professor%"}]
sortby : [{"field":"sf_Customer","direction":"desc"}]
getstorevalue :
--End custom parameter--
List File
List files of an existing organization
Function Name - 3.03.4.1 List Files Method Sample 1: from an existing organization
Description - To retrieve the list of file(s) from the organization using the Company ID
Object Type - Company
Action Type - List Files
Field List -
Parameters used are:
objectid = Company ID
fieldid = Custom Field ID of an organization that is either single file type or multiple file type.
--Begin custom parameter --
objectid : 1688407
fieldid : 1523157
getstorevalue :
--End custom parameter--
List files from an existing application
Function Name - 3.03.4.2 List Files Method Sample 2: from an existing application
Description - To retrieve the list of file(s) of an existing application using the Opportunity ID
Object Type - Submission Manager - Grant
Action Type - List Files
Field List -
Parameters used are:
objectid = Opportunity ID
fieldid = Custom Field ID of UTA L1 that is either single file type or multiple file type.
--Begin custom parameter --
objectid : 1688407
fieldid : 1523157
getstorevalue :
--End custom parameter--
List Notes
List notes from an existing application
Function Name - 3.03.5.1 List Notes Method Sample 1: from an existing application
Description - To retrieve all note(s) associated with an existing application using the Opportunity ID
Object Type - Submission Manager - Grant
Action Type - List notes
Field List - sf_Type Name;;sf_Content;;sf_Created By;;sf_Created By ID;;sf_Created Date;;sf_Note ID;;sf_Object ID;;sf_Type ID;;sf_Note Content
Parameters used are:
objectid = Opportunity ID
--Begin custom parameter --
objectid : 8276124
--End custom parameter--
List Multiple Addresses
List all Multiple Addresses of an existing Organization
Function Name - 3.03.6.1 List Multiple Addresses Method Sample 1: Multiple Addresses of an existing Organization
Description - To retrieve all of the multiple addresses of an existing organization using the Company ID
Object Type - Company
Action Type - List Multiple Addresses
Field List - sf_Address;;sf_Address 2;;sf_City;;sf_State / Province;;sf_Country;;sf_Zip / Postal Code;;sf_Primary Address;;sf_Type;;sf_Type ID;;sf_Updated By;;sf_Last Modified;;sf_Object ID;;sf_Address ID
Parameters used are:
objectid = Company ID
--Begin custom parameter --
objectid : 1688407
--End custom parameter--
List Associations
List Contact associations from an existing application
Function Name - 3.03.7.1 List Associations Method Sample 1: Contact associations from an existing application
Description - To retrieve the list of contacts associated with an existing application using the Opportunity ID
Object Type - Submission Manager - Grant
Action Type - List Associations
Field List - contacts.*
Parameters used are:
recordid = Opportunity ID
type = either '"contacts"' or '"organizations"'
--Begin custom parameter --
recordid: 8276165
type: contacts
--End custom parameter--
List Organization associations from an application
Function Name - 3.03.7.2 List Associations Method Sample 2: Organization associations from an existing application
Description - To retrieve the list of organizations associated with an existing application using the Opportunity ID
Object Type - Submission Manager - Grant
Action Type - List Associations
Field List - organizations.*
Parameters used are:
recordid = Opportunity ID
type = either '"contacts"' or '"organizations"'
--Begin custom parameter --
recordid: 8276165
type: organizations
--End custom parameter--
List System Variables
Function Name - 3.03.8.1 System Variables Sample 1: List
Description - Retrieves all the system variables
Object Type - System Variables
Action Type - List
Field List - sf_ID;;sf_Name;;sf_Value;;
No parameters are needed to retrieve all the global system variables.
Metadata
This function will retrieve the metadata of the selected Object Type.
Get Metadata of a Universal Tracking Application
Function Name - 3.04.1 Get Metadata Sample 1: CMS360°: Application Metadata
Description - To retrieve metadata of a.
Object Type - Case Management 360° - Case
Action Type - Get Meta
Field List - levelone.*;;leveltwo.*;;levelthree.*
No parameters are needed to retrieve metadata.
Get Metadata of Organizations
Function Name - 3.04.2 Get Metadata Sample 2: Organizations Metadata
Description - To retrieve metadata from Organizations.
Object Type - Company
Action Type - Get Meta
Field List - companies.*
No parameters are needed to retrieve metadata.
Available in November 2018 Upgrade
Get Metadata from Contacts
Function Name - 3.04.3 Get Metadata Sample 3: Users Metadata
Description - To retrieve metadata from Users.
Object Type - User
Action Type - Get Meta
Field List - contacts.*
No parameters are needed to retrieve metadata.
Available in November 2018 Upgrade
Update
This function will create new records or update existing records based on the selected Object Type.
Update
Create/Update organization record
Function Name - 3.05.1.1 Create/update organization record
Description - Create new records or update existing organization records
Object Type - Company
Action Type - Update
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
Sample 1A
Description - Create new organization record
Mandatory fields to add a new record:
recordid - to create new record, recordid should be '0'
sf_Parent Company ID - is the company holder or the parent company for the organization to be added.
sf_Is External - either "1" for external and "0" for internal organization
sf_Category ID List - Category of the company to be added.
--Begin custom parameter --
jsonrset : [{"recordid":"0","sf_Parent Company ID":"826082","sf_Is External":"1","sf_Name":"Test 1 Company","sf_Country":"10","sf_Address":"111 Peter Street","sf_City":"Toronto","sf_State / Province":"ON","cf_EIN Number":"101010101","sf_Category ID List":",3884,"}]
--End custom parameter--
Sample 1B
Description - Update existing organization record
Mandatory fields to update existing record:
recordid - is the Company ID an of existing organization to update.
--Begin custom parameter --
jsonrset : [{"recordid":"1688403","sf_Name":"Change Company thru API"}]
--End custom parameter--
Create/Update User record
Function Name - 3.05.1.2 Create/update user record
Description - Create new records or update existing user
Object Type - User
Action Type - Update
Field List - sf_User ID;;sf_Last Name;;sf_First Name;;sf_Prefix;;sf_Suffix;;sf_Title;;sf_Phone;;sf_Email;;sf_Company ID;;sf_Title;;sf_Is External;;sf_Role ID List
Sample 1C
Description - To create two new user record
Mandatory fields to add new records:
recordid - to create new record, recordid should be '0'
sf_Parent Company ID - is the company holder or the parent company for the organization to be added.
sf_Is External - either "1" for external and "0" for internal organization
sf_Role ID List - of a user
--Begin custom parameter --
jsonrset : [{"recordid":"0","sf_Company ID":"1688403","sf_Is External":"1","sf_First Name":"John","sf_Last Name":"Doe","sf_Role ID List":",14078,"},{"recordid":"0","sf_Company ID":"1688403","sf_Is External":"1","sf_First Name":"Mary","sf_Last Name":"Doe","sf_Role ID List":",14078,"}]
--End custom parameter--
Sample 1D
Description - To update last name of existing user records
Mandatory fields to update records:
recordid - is the User ID of existing user.
--Begin custom parameter --
jsonrset : [{"recordid":"87983424","sf_Last Name":"Change Last Name thru API"},{"recordid":"88159403","sf_Last Name":"Smith"}]
--End custom parameter--
Update Multiple Addresses
Update/create multiple address record of an Organization
Function Name - 3.05.2.1 Update Multiple Addresses Method Sample 1: update addresses of an existing Organization
Description - Create new records or update existing multiple addresses of an existing organization
Object Type - Company
Action Type - Update Multiple Addresses
Field List - sf_Address;;sf_Address 2;;sf_City;;sf_State / Province;;sf_Country;;sf_Zip / Postal Code;;sf_Primary Address;;sf_Type;;sf_Type ID;;sf_Updated By;;sf_Last Modified;;sf_Object ID
Sample 2A
Description - To create new multiple address for an existing company
Mandatory fields to add new records:
recordid - to create new record, recordid should be '0'
sf_Object ID - is the Company ID where the address will be attached to.
sf_Type ID - multiple address type
--Begin custom parameter --
jsonrset : [{"recordid":"0","sf_Object ID":"1688407","sf_Type ID":"74117","sf_Address":"2018 Yonge Street","sf_Country":"10","sf_Address 2":"Suite 401111","sf_City":"Toronto","sf_State / Province":"ON"}]
--End custom parameter--
Sample 2B
Description - To update address of existing multiple address record
Mandatory fields to update records:
recordid - is the unique identifier from the Association table.
--Begin custom parameter --
jsonrset : [{"recordid":"632573","sf_Address":"New Street Address","sf_City":"New City"}]
--End custom parameter--
Update Associations
Create/Update contact associations of a Level 1
Function Name - 3.05.3.1 Update Associations Method Sample 1: update contact associations of an existing Level 1
Description - Create new records or update existing contact associated with an existing Level 1 record
Object Type - Submission Manager - Grant
Action Type - Update Associations
Field List - contacts.*
Sample 3A
Description - To create new user associated with an existing Submission Manager Level 1
Mandatory fields to add new records:
recordid - is the Company ID where the user will be associated to.
isupdate - "1" for yes to update and "0" for to add new record
rolename - association role of the user
--Begin custom parameter --
jsonrset : [{"recordid":"8276165","contacts":[{"contactid":"3108577","rolename":"Meeting Participant","isupdate":"0"}]}]
--End custom parameter--
Sample 3B
Description - To update association information of an existing Submission Manager Level 1 record
Mandatory fields to update records:
recordid - is the Company ID where the user will be associated to.
isupdate - "1" for yes and "0" for no
--Begin custom parameter --
jsonrset : [{"recordid":"8276165","contacts":[{"contactid":"3108429","rolename":"Signee Internal","isupdate":"1"}]}]
--End custom parameter--
Update System Variables
Function Name - 3.05.4 System Variables Sample 1: Update
Description - Updates the value or the name of an existing system variables
Object Type - System Variables
Action Type - Update
Field List - sf_ID;;sf_Name;;sf_Value;;
--Begin custom parameter --
jsonrset : [{"recordid":"9313","sf_Value":"2"}]
--End custom parameter--
Download File
This function will download the file.
Download File(s) from a company profile
Function Name - 3.06.1 Download File Method Sample 1: Download file(s) from an existing company record
Description - Download the file based on the criteria indicated.
Object Type - Company
Action Type - Download File
Field List -
Mandatory fields to download a file:
filename - name of the file to be downloaded.
objectid - is the Company ID where the file is attached to.
fieldid - Custom Field ID of the Organization record that is either a single file type or multiple file type.
--Begin custom parameter --
filename: Test.txt
objectid: 1688407
fieldid: 1523157
--End custom parameter--
Note: In the API website, the content of the file will be shown in the Response section as seen below.
Click here to download the file
Search File
This function will retrieve a list of files by searching for a keyword.
Search Files Method Sample 1: Search Case Documents
Function Name - 3.07.1 Search Files Method Sample 1: Search Case Documents
Description - Search the multiple file field for keyword
Object Type - Case Management 360° - Case
Action Type - Search Files
Field List - cf_Case Documents;;sf_Application Template Type;;sf_Customer
--Begin custom parameter --
keywords: HIPAA
--End custom parameter--
Variables Replace
This function will pass the parameters: 1. objectid and 2. content (block of text) which will be run thru the variable processor and return the results as JSON.
Variables Replace - Company
Function Name - 3.09.1 System Variables Replace - Company
Description - This function will send the objectid=Company ID and the desired content with system variables. It returns a json format of the content with all the system variables replaced by the variable processor.
Object Type - Company
Action Type - Variables Replace
Field List -
--Begin custom parameter --
objectid: 825646
content: Company name is @name@, located at @address@, @city@, @country@. Primary Contact is @primarycontact@.
--End custom parameter--
Variables Replace - User
Function Name - 3.09.2 System Variables Replace - User
Description - This function will send the objectid=User ID and the desired content with system variables. It returns a json format of the content with all the system variables replaced by the variable processor.
Object Type - User
Action Type - Variables Replace
Field List -
--Begin custom parameter --
objectid: 88159402
content: Hello @firstname@ (@userid@), from company @company@, located in @company.address@.
--End custom parameter--
Variables Replace - UTA L1
Function Name - 3.09.3 System Variables Replace - UTA L1
Description - This function will send the objectid=Opportunity ID and the desired content with system variables. It returns a json format of the content with all the system variables replaced by the variable processor.
Object Type - Submission Manager - Grant
Action Type - Variables Replace
Field List -
--Begin custom parameter --
objectid: 8276165
content: This application is called "@name@", under the status of "@status@". The owner on this record is "@owner.fullname@", belonging to "@owner.company.name@". The company is "@client.name@". Parent Company is "@company.parent.name@.
--End custom parameter--
Variables Replace - UTA L2
Function Name - 3.09.4 System Variables Replace - UTA L2
Description - This function will send the objectid=Event ID and the desired content with system variables. It returns a json format of the content with all the system variables replaced by the variable processor.
Object Type - Submission Manager - Grant
Action Type - Variables Replace
Field List -
--Begin custom parameter --
objectid: 18431901
content: This is a level two id record with eventid of"@eventid@" with L2 Type of "@type@" and status of "@status@". The parent record id is "@parent.opportunityid@". The parent Company's address is "@parent.company.address@".
--End custom parameter--
Variables Replace - UTA L3
Function Name - 3.09.5 System Variables Replace - UTA L3
Description - This function will send the objectid=Event ID and the desired content with system variables. It returns a json format of the content with all the system variables replaced by the variable processor.
Object Type - Submission Manager - Disbursement
Action Type - Variables Replace
Field List -
--Begin custom parameter --
objectid: 18432872
content: This is L3 record id "@eventid@", of status "@status@". The parent L2 Type is "@parent.type@". The L1 company is "@parent.parent.company.name@".
--End custom parameter--
List Transaction Records
Get Transaction Record
Update Transaction Records
See Also
SmartConnect - RESTful API
JSON API (SmartConnect) Standard Field Names
API Sample Code