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
Information about the most recent error in the Salesforce Engine. |
String |
lastErrorCode
The latest error code that was returned by Salesforce. |
String |
lastErrorDetail
Detailed information about the latest error that is returned by Salesforce. |
String |
lastErrorURL
The URL for the latest error. |
| Function Summary | |
boolean
|
deleteItem( <String> id )
Deletes the specified item. |
array
|
getActiveUsers( <String> field )
Gets an array of all values for one field from the User database where the user is active. |
String
|
getBaseAddress()
Gets the base URL for Salesforce.com. |
String
|
getErrorDetails()
Gets detailed information about the latest error and displays lastError, lastErrorCode and lastErrorDetail with labels in the Debug Window. |
String
|
getItemURL( <String> itemID )
Gets the URL for an item of the specified ID. |
array
|
getList( <String> field, <String> type )
Gets a list of values from the specified field for the specified type of data. |
String
|
getUserID( <String> username )
Gets a 15-character user ID from the specified username or full name. |
boolean
|
isLoggedIn()
Checks whether the user is currently logged in. |
boolean
|
login( <String> username, <String> password )
Logs into the Salesforce Force.com API using the specified user name and password. |
boolean
|
logout()
Logs out of the Salesforce Force.com API. |
String
|
query( <array> fields, <String> database[, <String> filterName, <array> filterValues][, <String> user][, <String> daterange] )
Returns the XML query result from the Salesforce Force.com API that includes all of the specified fields in the database. |
String
|
querySQL( <String> query )
Sends an SQL query to the Salesforce Force.com API. |
function
|
setAccountType( <String> accountType )
Sets the account to the specified type which can be "Enterprise" or "Partner", or 0 and 1, respectively. |
boolean
|
updateField( <String> type, <String> id, <String> field, <String> value )
Updates the value of the specified field with the new value. |
| Properties Detail |
lastError
String lastError
-
Information about the most recent error in the Salesforce Engine.
Since:
5.2.1
lastErrorCode
String lastErrorCode
-
The latest error code that was returned by Salesforce.
Since:
5.2.1
lastErrorDetail
String lastErrorDetail
-
Detailed information about the latest error that is returned by Salesforce.
Since:
5.2.1
lastErrorURL
String lastErrorURL
-
The URL for the latest error.
Since:
5.2.1
| Function Detail |
deleteItem
boolean deleteItem( <String> id )
- Deletes the specified item.
Since:
5.2.1
-
Parameters:
id - ID of the item to delete
-
Returns:
-
true on success; otherwise false
getActiveUsers
array getActiveUsers( <String> field )
- Gets an array of all values for one field from the
User database
where the user is active. This function is useful when you want to get a list of user names or user IDs.
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()
- Gets the base URL for Salesforce.com.
Since:
5.2.1
-
Returns:
-
the base URL
getErrorDetails
String getErrorDetails()
- Gets detailed information about the latest error and displays lastError, lastErrorCode and lastErrorDetail with labels in the Debug Window.
Since:
5.2.1
-
Returns:
-
detailed error information
getItemURL
String getItemURL( <String> itemID )
- Gets the URL for an item of the specified ID.
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 )
- Gets a list of values from the specified field for the specified type of data.
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 )
- Gets a 15-character user ID from the specified username or full name.
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()
- Checks whether the user is currently logged in.
Since:
5.2.1
-
Returns:
-
true if logged in; otherwise false
login
boolean login( <String> username, <String> password )
- Logs into the Salesforce Force.com API using the specified user name and 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()
- Logs out of the Salesforce Force.com API.
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] )
- Returns the XML query result from the Salesforce Force.com API that
includes all of the specified fields in the database.
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 )
- Sends an SQL query to the Salesforce Force.com API.
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 )
- Sets the account to the specified type which can be "Enterprise" or "Partner", or 0 and 1, respectively.
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 )
- Updates the value of the specified field with the new 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.