Difference between revisions of "Creating SmartConnect Functions"

From SmartWiki
Jump to: navigation, search
(SmartConnect Function Samples)
(SmartConnect Function Samples)
Line 35: Line 35:
 
[[Image:GetCompany.PNG|thumb|right|851x230px|<strong>Get Company</strong>]]
 
[[Image:GetCompany.PNG|thumb|right|851x230px|<strong>Get Company</strong>]]
 
<span style="color: #247859;"> </span><br />
 
<span style="color: #247859;"> </span><br />
<span style="color: #247859;">      Get Method Sample 1: Retrieve a Single Organization Record</span><br />
+
<span style="color: #247859;">      3.1.1 Get Method Sample 1: Retrieve a Single Organization Record</span><br />
<span style="color: #247859;">      Get Method Sample 2: Retrieve a Single Contact Record</span><br />
+
<span style="color: #247859;">      3.1.2 Get Method Sample 2: Retrieve a Single Contact Record</span><br />
<span style="color: #247859;">      Get Method Sample 3: Retrieve a Single Grant Application Record</span><br />
+
<span style="color: #247859;">      3.1.3 Get Method Sample 3: Retrieve a Single Grant Application Record</span><br />
<span style="color: #247859;">      Get Method Sample 4: Retrieve a Single Grant Application Payment Record</span><br />
+
<span style="color: #247859;">      3.1.4 Get Method Sample 4: Retrieve a Single Grant Application Payment Record</span><br />
<span style="color: #247859;">      Get Method Sample 5: List Files</span>
+
<span style="color: #247859;">      3.1.5 Get Method Sample 5: List Files</span>
  
 
|-
 
|-
Line 47: Line 47:
 
[[Image:ListSample.PNG|thumb|right|851x230px|<strong>List Level One</strong>]]
 
[[Image:ListSample.PNG|thumb|right|851x230px|<strong>List Level One</strong>]]
 
<span style="color: #247859;"> </span><br />
 
<span style="color: #247859;"> </span><br />
<span style="color: #247859;">      List Method Sample 1: Retrieve a list of contacts</span><br />
+
<span style="color: #247859;">      3.2.1 List Method Sample 1: Retrieve a list of contacts</span><br />
<span style="color: #247859;">      List Method Sample 2: Retrieve a list of organizations</span><br />
+
<span style="color: #247859;">      3.2.2 List Method Sample 2: Retrieve a list of organizations</span><br />
<span style="color: #247859;">      List Method Sample 3: CMS360° - Retrieve a list of claims</span><br />
+
<span style="color: #247859;">      3.2.3 List Method Sample 3: CMS360° - Retrieve a list of claims</span><br />
<span style="color: #247859;">      List Method Sample 4: CMS360°- Retrieve a list of Services</span><br />
+
<span style="color: #247859;">      3.2.4 List Method Sample 4: CMS360°- Retrieve a list of Services</span><br />
<span style="color: #247859;">      List Method Sample 5: CMS360°- Retrieve Assessors list</span>
+
<span style="color: #247859;">      3.2.5 List Method Sample 5: CMS360°- Retrieve Assessors list</span>
  
 
|-
 
|-
Line 59: Line 59:
 
[[Image:UpdateCompany.PNG|thumb|right|851x230px|<strong>Update Company</strong>]]
 
[[Image:UpdateCompany.PNG|thumb|right|851x230px|<strong>Update Company</strong>]]
 
<br />
 
<br />
<span style="color: #247859;">      Update Method Sample 1: Create organizations</span><br />
+
<span style="color: #247859;">      3.3.1 Update Method Sample 1: Create organizations</span><br />
<span style="color: #247859;">      Update Method Sample 2: Create/Update User</span>
+
<span style="color: #247859;">      3.3.2 Update Method Sample 2: Create/Update User</span>
  
 
|-
 
|-
Line 68: Line 68:
 
[[Image:DownloadFiles.PNG|thumb|right|851x230px|<strong>Download Files from Level One</strong>]]
 
[[Image:DownloadFiles.PNG|thumb|right|851x230px|<strong>Download Files from Level One</strong>]]
 
<br />
 
<br />
<span style="color: #247859;">      Download File Method Sample 1: Download file(s) from a company profile</span>
+
<span style="color: #247859;">      3.4.1 Download File Method Sample 1: Download file(s) from a company profile</span>
  
 
|-
 
|-
Line 76: Line 76:
 
[[Image:ListFiles.PNG|thumb|right|851x230px|<strong>List Files from Level One</strong>]]
 
[[Image:ListFiles.PNG|thumb|right|851x230px|<strong>List Files from Level One</strong>]]
 
<br />
 
<br />
<span style="color: #247859;">      List Files Method Sample 1:  from an organization</span><br />
+
<span style="color: #247859;">      3.5.1 List Files Method Sample 1:  from an organization</span><br />
<span style="color: #247859;">      List Files Method Sample 2: from an application</span>
+
<span style="color: #247859;">      3.5.2 List Files Method Sample 2: from an application</span>
  
 
|-
 
|-
Line 85: Line 85:
 
[[Image:SearchFiles.PNG|thumb|right|851x230px|<strong>Search Files from Level One</strong>]]
 
[[Image:SearchFiles.PNG|thumb|right|851x230px|<strong>Search Files from Level One</strong>]]
 
<br />
 
<br />
<span style="color: #247859;">      Search Files Method Sample 1: Search Case Documents </span>
+
<span style="color: #247859;">      3.6.1 Search Files Method Sample 1: Search Case Documents </span>
  
 
|-
 
|-
Line 93: Line 93:
 
[[Image:ListNotes.PNG|thumb|right|851x230px|<strong>List Notes from a Company</strong>]]
 
[[Image:ListNotes.PNG|thumb|right|851x230px|<strong>List Notes from a Company</strong>]]
 
<br />
 
<br />
<span style="color: #247859;">      List Notes Method Sample 1:  from an application</span>
+
<span style="color: #247859;">      3.7.1 List Notes Method Sample 1:  from an application</span>
  
 
|-
 
|-
Line 101: Line 101:
 
[[Image:ListMultipleAddresses.PNG|thumb|right|851x230px|<strong>Get all multiple addresses of a Company</strong>]]
 
[[Image:ListMultipleAddresses.PNG|thumb|right|851x230px|<strong>Get all multiple addresses of a Company</strong>]]
 
<br />
 
<br />
<span style="color: #247859;">      List Multiple Addresses Method Sample 1: Multiple Addresses of an Organization</span>
+
<span style="color: #247859;">      3.8.1 List Multiple Addresses Method Sample 1: Multiple Addresses of an Organization</span>
  
 
|-
 
|-
Line 109: Line 109:
 
[[Image:UpdateMultipleAddresses.PNG|thumb|right|851x230px|<strong>Update multiple addresses of a Company</strong>]]
 
[[Image:UpdateMultipleAddresses.PNG|thumb|right|851x230px|<strong>Update multiple addresses of a Company</strong>]]
 
<br />
 
<br />
<span style="color: #247859;">      Update Multiple Addresses Method Sample 1: update addresses of an Organization</span>
+
<span style="color: #247859;">      3.9.1 Update Multiple Addresses Method Sample 1: update addresses of an Organization</span>
  
 
|-
 
|-
Line 117: Line 117:
 
[[Image:List_Associations.png|thumb|right|851x230px|<strong>List Contact Association of a Level 1</strong>]]
 
[[Image:List_Associations.png|thumb|right|851x230px|<strong>List Contact Association of a Level 1</strong>]]
 
<br />
 
<br />
<span style="color: #247859;">      List Associations Method Sample 1: Contact associations from an application</span><br />
+
<span style="color: #247859;">      3.10.1 List Associations Method Sample 1: Contact associations from an application</span><br />
<span style="color: #247859;">      List Associations Method Sample 2: Organization associations from an application</span>
+
<span style="color: #247859;">      3.10.2 List Associations Method Sample 2: Organization associations from an application</span>
  
 
|-
 
|-
Line 126: Line 126:
 
[[Image:Update_Associations.png|thumb|right|851x230px|<strong>Update Contact Association of a Level 1</strong>]]
 
[[Image:Update_Associations.png|thumb|right|851x230px|<strong>Update Contact Association of a Level 1</strong>]]
 
<br />
 
<br />
<span style="color: #247859;">      Update Associations Method Sample 1: update contact associations of a Level 1</span><br />
+
<span style="color: #247859;">      3.11.1 Update Associations Method Sample 1: update contact associations of a Level 1</span><br />
 
<span style="color: #247859;">      </span>
 
<span style="color: #247859;">      </span>
  

Revision as of 16:51, 23 April 2018

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.

Creating a New Function

You need to have Global User Administrator permissions in order to add JSON functions.

1. Log into the copy of SmartSimple where you wish to add the function.
2. Navigate to Global Settings
3. Click on the Connectivity tab
4. Click on the SmartConnect API link

Any existing Functions are displayed

5. Click on the + button to create a new function.

Function Settings

Each function has the following settings:

  • 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.
  • Object 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 Types – this defines the action to be taken by the function. The following actions are available: GET, LIST, UPDATE, DOWNLOAD FILE, and LIST FILES. Details on these Action Types / Methods are available in the following section.
  • Field List – this restricts the fields that are to be retrieved from the underlying object.


SmartConnect Function Samples

Visit the interactive demonstration page to test the sample functions.

Function      Sample

'Get'

Get Company

 
      3.1.1 Get Method Sample 1: Retrieve a Single Organization Record
      3.1.2 Get Method Sample 2: Retrieve a Single Contact Record
      3.1.3 Get Method Sample 3: Retrieve a Single Grant Application Record
      3.1.4 Get Method Sample 4: Retrieve a Single Grant Application Payment Record
      3.1.5 Get Method Sample 5: List Files

'List'

List Level One

 
      3.2.1 List Method Sample 1: Retrieve a list of contacts
      3.2.2 List Method Sample 2: Retrieve a list of organizations
      3.2.3 List Method Sample 3: CMS360° - Retrieve a list of claims
      3.2.4 List Method Sample 4: CMS360°- Retrieve a list of Services
      3.2.5 List Method Sample 5: CMS360°- Retrieve Assessors list

'Update'

Update Company


      3.3.1 Update Method Sample 1: Create organizations
      3.3.2 Update Method Sample 2: Create/Update User

'Download File'

Download Files from Level One


      3.4.1 Download File Method Sample 1: Download file(s) from a company profile

'List File'

List Files from Level One


      3.5.1 List Files Method Sample 1:  from an organization
      3.5.2 List Files Method Sample 2: from an application

'Search File'

Search Files from Level One


      3.6.1 Search Files Method Sample 1: Search Case Documents 

'List Notes'

List Notes from a Company


      3.7.1 List Notes Method Sample 1:  from an application

'List Multiple Addresses'

Get all multiple addresses of a Company


      3.8.1 List Multiple Addresses Method Sample 1: Multiple Addresses of an Organization

'Update Multiple Addresses'

Update multiple addresses of a Company


      3.9.1 Update Multiple Addresses Method Sample 1: update addresses of an Organization

'List Associations'

List Contact Association of a Level 1


      3.10.1 List Associations Method Sample 1: Contact associations from an application
      3.10.2 List Associations Method Sample 2: Organization associations from an application

'Update Associations'

Update Contact Association of a Level 1


      3.11.1 Update Associations Method Sample 1: update contact associations of a Level 1
      

See Also

JSON API (SmartConnect)
JSON API (SmartConnect) Prerequisite
Using JSON functions
JSON API (SmartConnect) Standard Field Names


API Sample Code