Creating SmartConnect Functions

From SmartWiki
Revision as of 12:48, 28 March 2018 by Lalaine Songalia (talk | contribs) (SmartConnect Function Samples)

Jump to: navigation, search

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

Examples from the interactive demonstration page 
      A Simple Example 1: Retrieve a Single Organization Record
      A Simple Example 2: Retrieve a Single Contact Record
      A Simple Example 3: Retrieve a Single Grant Application Record
      A Simple Example 4: Retrieve a Single Grant Application Payment Record
      Files: List Files

'List'

List Level One

Examples from the interactive demonstration page 
      A Simple Example 5: Retrieve a list of contacts
      A Simple Example 6: Retrieve a list of organizations
      CMS360°: Retrieve a list of claims
      CMS360°: Retrieve a list of Services

'Update'

Update Company

Examples from the interactive demonstration page 
      Global: Create organizations
      Global: Create/Update User

'Download File'

Download Files from Level One

Examples from the interactive demonstration page 
      Global: Download file(s) from a company profile

'List File'

List Files from Level One

Examples from the interactive demonstration page 
      Sample of List Files - from an organization
      Sample of List Files - from an application

'Search File'

Search Files from Level One

Examples from the interactive demonstration page 
      CMS360°: Search Case Documents

'List Notes'

List Notes from a Company

Examples from the interactive demonstration page 
      List Notes from an application

'List Multiple Addresses'

Get all multiple addresses of a Company

Examples from the interactive demonstration page 
      List Multiple Addresses of an Organization

'Update Multiple Addresses'

Update multiple addresses of a Company

Examples from the interactive demonstration page 

       Update Multiple Addresses of an Organization

'List Associations'

'Update Associations'

See Also

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


API Sample Code