Salesforce

Version: 2.0.0

Salesforce.com, Inc. is an American cloud computing company headquartered in San Francisco, California. Though its revenue comes from a customer relationship management (CRM) product, Salesforce also sells commercial applications of social networking through acquisition and internal development.

Connect Salesforce with LogicHub

  1. Navigate to Automations > Integrations.
  2. Search for Salesforce.
  3. Click Details, then the + icon. Enter the required information in the following fields.
    • Label: Enter a connection name.
    • Reference Values: Define variables here to templatize integration connections and actions. For example, you can use https://www.{{hostname}}.com where, hostname is a variable defined in this input. For more information on how to add data, see 'Add Data' Input Type for Integrations.
    • Verify SSL: Select option to verify connecting server's SSL certificate (Default is Verify SSL Certificate).
    • Remote Agent: Run this integration using the LogicHub Remote Agent.
    • Username: Username for Salesforce.com.
    • Password: Password for Salesforce.com.
    • Security Token: Security Token for Salesforce.com.
  4. After you've entered all the details, click Connect.

Actions for Salesforce

Retrieve Setup Audit Trail

Retrieve Setup Audit Trail that tracks the recent setup changes that you and other admins have made to your org. Behind the scenes, it runs the following SOQL query.

SELECT Action,CreatedBy.Name, CreatedBy.Profile.Name, CreatedById, CreatedDate, DelegateUser, Display, Id, Section FROM SetupAuditTrail WHERE CreatedDate >= <batch_start> and CreatedDate <= <batch_end> ORDER BY CreatedDate DESC NULLS LAST

Input Field

Choose a connection that you have previously created to complete the connection.

Output

A JSON object containing multiple rows of result:

  • has_error: True/False
  • error: message/null
  • other keys of action results

Execute Static Query

Execute the static query.

Input Field

Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.

Input NameDescriptionRequired
Static QueryStatic Salesforce Query to execute.Required

Output

A JSON object containing multiple rows of result:

  • has_error: True/False
  • error: message/null
  • other keys of action results

Execute Templated Query

Execute the templated query.

Input Field

Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.

Input NameDescriptionRequired
Templated QueryJinja-Templated Salesforce Query to execute.Required

Output

A JSON object containing multiple rows of result:

  • has_error: True/False
  • error: message/null
  • other keys of action results

Get Report

Gets report for the provided report id in json, csv-json or excel format.

Input Field

Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.

Input NameDescriptionRequired
Report IdEnter ID of the report.Required
Report FormatSelect Report Format. (Default is CSV JSON).Optional

Output

A JSON object containing multiple rows of result:

  • has_error: True/False
  • error: message/null
  • other keys of action results
1586

Insert/Update/Upsert/Delete Records

Inserts/Updates/Upserts/Deletes records in the parent table to the specified Salesforce object (Using Bulk Insert).

Input Field

Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.

Input NameDescriptionRequired
OperationSelect operation to be performed Insert/Update/Upsert/Delete.Required
ObjectSelect Salesforce object to which the csv records are to be added.Required
Assignment Rule IdSelect an assignment rule to run for a Case or a Lead. The assignment rule can be active or inactive. Select None if you already have a Record Owner field or you want the integration user to be the owner. Select None if it is not applicable for your salesforce object.Required
External ID Field NameEnter the name of the external ID field in the object being updated. Only needed for upsert operations. Field values must also exist in CSV job data.Optional

Output

A JSON object containing multiple rows of result:

  • has_error: True/False
  • error: message/null
  • message: Message containing information whether the job completed successfully or not
1572

Get Event Logs

Gets Event Logs from EventLogFile. Some considerations from Salesforce.

Considerations

  • Hourly event log file integration with the Event Monitoring Analytics app is unavailable.

  • Depending on event delivery and final processing time, an event is expected to take three to six hours from the time of the event to be available in the log file. However, it can take longer.

  • When delays in processing occur and event logs for a particular hour arrive later, a new log file is created for the event/date/hour and lists only the new events. Use the creation date and an incremental sequence number to identify a new log file. Always use the most recently processed event log file for a particular date. However, if event log files have already been pulled into a third-party application, they could require deduplication in that application.

  • If both hourly and daily logs are enabled, daily logs always have a sequence number of 0 because there is only one file per daily interval. CreatedDate indicates when the file was generated. If CreatedDate is after the last event log file download, there are new events to be processed.

  • Your event log files may show a gap in data during site switches, instance refreshes, or unplanned system outages. However, during site switches and instance refreshes, Salesforce makes a commercially reasonable effort to avoid such data loss by using an automated process to replicate event logs.

  • In the unlikely case in which no log files are generated for 24 hours, contact Salesforce Support.

Input Field

Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.

Input NameDescriptionRequired
Start TimeEnter the start time in epoch milliseconds (Default is Batch start time). Example: 1602240667000Optional
End TimeEnter end time in epoch milliseconds (Default is Batch end time). Example: 1602240667000Optional
IntervalSelect option Hourly/Daily to query the interval. (Default is Hourly). Some considerations regarding Hourly events https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/event_log_file_hourly_overview.htm#hourly_considerations.Optional
LimitLimits the number of records returned for each event type. (Default is Unlimited, that is, Fetch all records).Optional
Result FormatSelect Result Format JSON/CSV (Default is JSON)
- JSON (CSV rows parsed as JSON)
- CSV (Raw content of CSV Files as string)
Optional

Output

A JSON object containing logs from each event type:

  • has_error: True/False
  • error: message/null
  • csv data as key-value pairs
    Limit input field in the action will limit the number of rows read from each csv file.
1584

Release Notes

  • v2.0.0 - Updated architecture to support IO via filesystem

© Devo Technology Inc. All Rights Reserved.