The Engines.Salesforce object gives developers access to a built-in Salesforce API.
While both this object and the Engines.SalesforceReports object provide you with methods to access data from Salesforce.com, note the following differences when considering which engine to use for your Salesforce Klip:
- Engines.Salesforce
-
- Klipfolio Dashboard must have the Salesforce extension included in the application
- Uses the Force.com API offered by Salesforce to access the data
- Can be (but does not need to be) used in conjunction with the Engines.SalesforceLogin object to set up the login UI
- Can send queries to the Salesforce.com database that are supported by the Force.com API
- Useful when you want to include advanced functionality in your Salesforce Klip, such as the ability to change the status of a record
- Engines.SalesforceReports
-
- Does not require the Salesforce extension in Klipfolio Dashboard; therefore, Klips using this object can be added to any Klipfolio Dashboard build after version 5.2.1
- Accesses the CSV reports under the Reports tab in Salesforce.com and does not use the API offered by Salesforce.com
- The Login UI, if required, must be written using the available Klipfolio Dashboard APIs
- Cannot send queries to the Salesforce.com database; therefore, reports must already be available under the Reports tab
- Useful when you simply want to retrieve and display data from any of the available CSV reports under the user's accounts
Since:
5.2.1
Also see:
Force.com Web Services API Developer's Guide for requirements, limitations and restrictions of the Salesforce API, and for
parameter values used in Klipfolio Dashboard's Salesforce Engine.
| Properties Summary | |
String |
lastError
|
String |
lastErrorCode
|
String |
lastErrorDetail
|
String |
lastErrorURL
|
| Function Summary | |
boolean
|
deleteItem( <String> id )
|
array
|
getActiveUsers( <String> field )
|
String
|
getBaseAddress()
|
String
|
getErrorDetails()
|
String
|
getItemURL( <String> itemID )
|
array
|
getList( <String> field, <String> type )
|
String
|
getUserID( <String> username )
|
boolean
|
isLoggedIn()
|
boolean
|
login( <String> username, <String> password )
|
boolean
|
logout()
|
String
|
query( <array> fields, <String> database[, <String> filterName, <array> filterValues][, <String> user][, <String> daterange] )
|
String
|
querySQL( <String> query )
|
function
|
setAccountType( <String> accountType )
|
boolean
|
updateField( <String> type, <String> id, <String> field, <String> value )
|
| Properties Detail |
lastError
String lastError
Since:
5.2.1
lastErrorCode
String lastErrorCode
Since:
5.2.1
lastErrorDetail
String lastErrorDetail
Since:
5.2.1
lastErrorURL
String lastErrorURL
Since:
5.2.1
| Function Detail |
deleteItem
boolean deleteItem( <String> id )
Since:
5.2.1
-
Parameters:
id - ID of the item to delete
-
Returns:
-
true on success; otherwise false
getActiveUsers
array getActiveUsers( <String> field )
Since:
5.2.1
-
Parameters:
field - the name of the field for which to get the list of active users
-
Returns:
-
array of all field values
getBaseAddress
String getBaseAddress()
Since:
5.2.1
-
Returns:
-
the base URL
getErrorDetails
String getErrorDetails()
Since:
5.2.1
-
Returns:
-
detailed error information
getItemURL
String getItemURL( <String> itemID )
Since:
5.2.1
-
Parameters:
itemID - the ID of the item for which to get the URL
-
Returns:
-
the URL for the specified item
getList
array getList( <String> field, <String> type )
Example:
The following example would return all labels for Lead Status, including "Open", "Closed", "Not Contacted", "Active", "Parked", etc.
Engines.Salesforce.getList( "MasterLabel", "LeadStatus" );
Since:
5.2.1
-
Parameters:
field - the name of the field from which to get the list of values
type - the data type to be queried
-
Returns:
-
the list of values obtained from the field
getUserID
String getUserID( <String> username )
Since:
5.2.1
-
Parameters:
username - user's username (e.g. user@organization.com) or full name (e.g. Lee Smith) for which to get the user ID
-
Returns:
-
the 15-character user ID
isLoggedIn
boolean isLoggedIn()
Since:
5.2.1
-
Returns:
-
true if logged in; otherwise false
login
boolean login( <String> username, <String> password )
Since:
5.2.1
-
Parameters:
username - Login username
password - Login password associated with the specified username
-
Returns:
-
true on success; otherwise false
logout
boolean logout()
Since:
5.2.1
-
Returns:
-
true if logged out; otherwise false
query
String query( <array> fields, <String> database[, <String> filterName, <array> filterValues][, <String> user][, <String> daterange] )
Optional filters can be applied to return only those records in the database where the filterName field matches one of the values in filterValues array.
If the query should return records only for a given user, supply the username of the user as the 5th parameter.
Note that the fields and filterValues must be arrays.
Example:
The following example would return the Id and Name fields from the "Lead" database
that have "Open - Not Contacted" and "Closed" lead statuses.
Engines.Salesforce.query (["Id", "Name"], "Lead", "Status", ["Open - Not Contacted", "Closed"])
Since:
5.2.1
-
Parameters:
fields - an array of field names
database - the name of the database
filterName - the name of the filter [optional]
filterValues - an array of values for which to filter [optional]
user - the login username of the user for which to filter [optional]
daterange - the date range for which to filter [optional]
-
Returns:
-
the query result
querySQL
String querySQL( <String> query )
Since:
5.2.1
-
Parameters:
query - the SQL query string to pass to the Salesforce API
-
Returns:
-
the XML query result from Salesforce.com for a given SQL query
setAccountType
function setAccountType( <String> accountType )
Since:
5.2.1
-
Parameters:
accountType - the account type to set to. "Enterprise" or "Partner", or 0 and 1, respectively.
updateField
boolean updateField( <String> type, <String> id, <String> field, <String> value )
Since:
5.2.1
-
Parameters:
type - the name of the type of object/database to change the field to (e.g. "Lead", "Case", "Opportunity")
id - the 15 character ID of the item to update
field - the name of the field to update
value - the name of the value to update the field to
-
Returns:
-
true on success; otherwise false
|
Klipfolio Dashboard API | ||||||||
| PREV OBJECT NEXT OBJECT | FRAMES NO FRAMES | ||||||||
| SUMMARY: PROPERTY | FUNCTION | DETAIL: PROPERTY | FUNCTION | ||||||||
© 2011 Klipfolio Inc. All Rights Reserved.