Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

On this Page

Table of Contents
maxLevel2
excludeOlder Versions|Additional Resources|Related Links|Related Information

Snap type:

Write


Description:

This Snap provides the functionality to delete objects in Salesforce in asynchronous mode. 

The Snap in Bulk API mode submits batch jobs and sends the batch job information to the output view for the Salesforce Poller Snap. The Snap in REST API mode deletes Salesforce objects and returns results synchronously without the need of the Salesforce Poller Snap.


Prerequisites:

[None]

Support and limitations:Works in Ultra Task Pipelines.
Account: 

This Snap uses account references created on the Accounts page of SnapLogic Manager to handle access to this endpoint. See Configuring Salesforce Accounts for information on setting up this type of account.

Views:


Input

This Snap has exactly one input view and receives documents in the view. Each document contains an ID of the object to be deleted.

Output

This Snap has at most one output view and produces documents in the view. Each document contains Map data that includes the Job ID, Batch ID, URL, and an array of records in Bulk API mode. If it is executed in REST API mode, each document contains Map data for the ID of the deleted record and a key-value pair of "created":"false".

Error

This Snap has one optional error view and might produce documents in the view if the input data causes an error in the REST API. Each document contains key/value pairs from the input view and an error message from Salesforce.com. The error message is in the value of the error key. If the Snap is in the Bulk API, a similar set of data is available in the error view of the Salesforce Poller Snap connected to this Snap directly or indirectly.


Settings

Label


Required. The name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your pipeline.

Service version 

Required. The version number associated with the Salesforce service that you want to connect to."v34.0" for REST API or "34.0" for Bulk API
Example: 34.0
Default value: 34.0 


Batch size

Required.  In Bulk API, this property value is allowed to be from 1 through 10,000. Each input document can contain an ID value to delete one Salesforce record. The Snap stores input records in memory until the number of records reaches the batch size and sends the request to SFDC in single batch.   Increasing the batch size increases the amount of memory used. Decreasing the batch size increases the number of API calls against Salesforce.

In REST API, the Snap can delete only one record per each request regardless of the value of the Batch size property.

Example: 200, 10000

Default value: 200

Note

Validation always uses the REST API.


Object type

Required. This property enables you to define the name of the Salesforce object, such as Account.


Example:  Account
Default value:  Account


Salesforce API


Required. This property sets the Salesforce API mode to Bulk API or REST API. The Snap in REST API mode creates one record at a time and returns the results at the output. REST API can be simpler and faster if the number of records to be created is small (a few).

Example: REST API
Default value: Bulk API


Bulk API Serial mode


If selected, Bulk API will run in Serial mode. If not selected, Bulk API will run in Parallel mode. This is only relevant to BULK API. 

Default value: Not selected (Parallel mode)

Standardize error output

If checked, the Snap will produce the error output with Reason, Original, Stack trace and Resolution.
If unchecked the output view will simply show the input document along with the error message.

Default value:  Not selected


Pass through


If selected, the input document will be passed through to the output view under the key 'original'.

If Pass through is not selected, the input document will not be passed and there is no "original" key in the output document.

Default value:  Selected

Excerpt


Info

For Bulk APIs, if you select this check box and if the Batch size is equal to 1, the input document is passed to the output view under the key original. If the Batch size is greater than 1, the list of input documents is displayed under Records and the input document is not included under the original key.



Multiexcerpt include macro
nameSnap Execution
pageSOAP Execute

Multiexcerpt include macro
nameExecution_Detail_Write
pageSOAP Execute

Insert excerpt
Salesforce Batch Create
Salesforce Batch Create
nopaneltrue
 

Note
 If you want to get the resulting status for each record to be deleted in Bulk API mode, you must connect a Salesforce Poller Snap after the Salesforce Delete Snap.

Example


The following Pipeline example shows how to delete a record in a Salesforce object: 

 

In the above pipeline execution:

Object record ID is provided to Salesforce Delete Snap using a Mapper Snap renamed to "Pass through Data Snap": 

The Salesforce Delete Snap deletes the specified record in the Account object:  

Successful execution of the Snap gives the following preview:

Downloads

Attachments
uploadfalse
oldfalse
patterns*.slp, *.zip

Insert excerpt
Salesforce Snap Pack
Salesforce Snap Pack
nopaneltrue