Versions Compared

Key

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

In this article

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

Overview

Salesforce Delete is a Write-type Snap that enables you to delete objects in Salesforce in asynchronous modeto delete records using REST API or Bulk API 1.0. The Snap in Bulk API mode submits a batch jobs job and sends writes the batch job information to the output view for , which should be passed to the Salesforce Poller Snap to check the result of the batch job. The Snap in REST API mode deletes Salesforce objects records and returns results synchronously without the need of the Salesforce Poller Snap.

Note

Multiexcerpt include macro
macro_uuid400ce58f-0da5-4a11-ae68-7d54283f17be
nameSalesforce objects limitation
templateDataeJyLjgUAARUAuQ==
pageSalesforce Batch Create
addpanelfalse



Prerequisites

None.

Support for Ultra Pipelines 

Works in Ultra Pipelines.  

Limitations

This Snap performs batch processing, that is, a batch of input documents are processed for each HTTP request sent to Salesforce. Values of all the expression-enabled fields must remain constant during the Snap execution or validation. Hence, all expression fields
  • All expression fields can support Pipeline parameters only when they are expression-enabled. The input data parameters are not supported for expression fields, for example, $serviceVersion.

Known Issues

None.

Snap Views

View
Type
View
FormatNumber of ViewsExamples of Upstream and Downstream SnapsDescription
InputDocument
  • Min: 1
  • Max: 1
  • Mapper


This Snap has exactly one input view and receives documents in the view. Each document contains an ID of the
object
record to be deleted.
OutputDocument
  • Min: 0
  • Max: 1
  • JSON Formatter
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

Document

Min: 1

N/A

  • Max: 1

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

    The error view contains error, reason, resolution and stack trace. For more information, see Handling Errors with an Error Pipeline.

    Snap Settings

    Field

    Field Type

    Description


    Label*


    StringSpecify 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*

    String/Expression/Suggestion

    Multiexcerpt include macro
    nameME_Service_Version
    pageSalesforce Batch Create
     

    Batch Size

    String/Expression

    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 a 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 request regardless of the value of the Batch size property. 

    Default value: 200
    Example: 200, 10000

    Note

    Validation always uses the REST API.

    Object Type

    String/Expression/Suggestion

    Specify the name of the Salesforce object

    , such as Account

    or select one from the suggested list.

    Note

    This Snap does not support Net Zero Cloud Salesforce objects.

    Default Value:  Account
    Example:  Account

    Salesforce API*


    Dropdown list

    Set the Salesforce API mode to Bulk API or REST API. The Snap in REST API mode creates deletes 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).

    Default value: Bulk API
    Example: REST API

    Bulk API Serial mode


    Checkbox

    Select this checkbox to enable the serial mode for Bulk API. Else, the Bulk API runs in parallel mode.

    Default Value: Not selected (Parallel mode)

    Standardize Error Output

    Checkbox

    Select this checkbox to enable the Snap to 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


    Checkbox

    Select this checkbox to pass the input document to the output view under the key original. This field applies to REST API and Bulk API, but only when the batch size is one.

    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.



    Snap Execution

    Dropdown list

    Multiexcerpt include macro
    nameExecution_Detail_Write
    pageSOAP Execute

    Insert excerptSalesforce Batch CreateSalesforce Batch Createnopaneltrue 


    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


    Deleting a Record in Salesforce

    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

    Multiexcerpt include macro
    namedownload_instructions
    pageOpenAPI

    Attachments
    uploadfalse
    oldfalse
    patterns*.slp, *.zip

    Insert excerpt
    Salesforce Snap Pack
    Salesforce Snap Pack
    nopaneltrue