Salesforce

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.

Integration with LogicHub

Connecting with Salesforce

To connect to Salesforce following details are required:

  • Label: 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.
  • Username: Username for Salesforce.com.
  • Password: Password for Salesforce.com.
  • Security Token: Security Token for Salesforce.com.

Actions with 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

Inputs to this Action:

  • Connection: Choose a connection that you have created.

Output of Action:
multiple rows of result json containing the following items:

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

Execute Static Query

Execute the static query.

Inputs to this Action:

  • Connection: Choose a connection that you have created.
  • Static Query: Static Salesforce Query to execute.

Output of Action:
multiple rows of result json containing the following items:

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

Execute Templated Query

Execute the templated query.

Inputs to this Action:

  • Connection: Choose a connection that you have created.
  • Templated Query: Jinja-Templated Salesforce Query to execute

Output of Action:
multiple rows of result json containing following items:

  • 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.

Inputs to this Action:

  • Connection: Choose a connection that you have created.
  • Report Id: Enter id of the report
  • Report Format (Optional): Select Report Format. (Default is CSV JSON)

Output of Action:
multiple rows of result json containing the following items:

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

Insert/Update/Upsert/Delete Records

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

Inputs to this Action:

  • Connection: Choose a connection that you have created.
  • Operation: Select operation to be performed Insert/Update/Upsert/Delete
  • Object: Select Salesforce object to which the csv records are to be added
  • Assignment Rule Id: Select 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.
  • External ID Field Name (Optional): Enter 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.

Output of Action:
multiple rows of result json containing the following items:

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

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.

Inputs to this Action:

  • Connection: Choose a connection that you have created.
  • Start Time (Optional): Enter the start time in epoch milliseconds (Default is Batch start time). Example: 1602240667000
  • End Time (Optional): Enter end time in epoch milliseconds (Default is Batch end time). Example: 1602240667000
  • Interval (Optional): Select 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.
  • Limit (Optional): Limits the number of records returned for each event type. (Default is Unlimited i.e. Fetch all records)
  • Result Format (Optional): Select Result Format JSON/CSV (Default is JSON)
    • JSON (CSV rows parsed as JSON)
    • CSV (Raw content of CSV Files as string)

Output of Action:
multiple rows of result json representing 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.

Did this page help you?