Snap type: | Write
| |||||||
---|---|---|---|---|---|---|---|---|
Description: | This Snap provides the functionality to upsert (meaning, a simple update or insert procedure of) object records in Salesforce in Bulk API or REST API mode. The Snap in Salesforce Bulk API mode submits batch jobs and sends the batch job information to the output view for the Salesforce Poller Snap. More specifically, the Salesforce Upsert Snap should not be thought of as the combination of the Salesforce Update and Salesforce Create Snaps.
The Salesforce Upsert Snap operates exclusively on the external ID field, not on the Salesforce-generated record ID. If a record for a given external ID exists, the record is updated with the input record data. If no record exists for a given external ID, a new record is created with the input record data. The external ID is used as the unique record identifier from an external system and can be useful when you want to synchronize an external system to Salesforce.com.
To create a new external ID field for an Account object:
You must select the External ID checkbox. The Snap in REST API mode upserts Salesforce objects and returns results synchronously without the need for the Salesforce Poller Snap. | |||||||
Prerequisites: | None
| |||||||
Support and limitations: |
| |||||||
Account: | This Snap uses account references created on the Accounts page of SnapLogic Manager to handle access to this endpoint. See Salesforce Account for information on setting up this type of account. | |||||||
Views: |
| |||||||
Settings | ||||||||
Label
| 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 Default value: 34.0
| |||||||
Batch size | Required. Refers to large record sets that require Reads in batches. Each batch Read requires an API call against Salesforce to retrieve the set of records. Increasing the batch size increases the amount of memory used during retrieval. Decreasing the batch size increases the number of API calls against Salesforce. Set to a value of 2000 or less for REST API execution. Set to a value greater than 2000 but less than or equal to 10000 for Bulk API. | |||||||
Object type | Required. This property enables you to define the name of the Salesforce object, such as 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).
| |||||||
External ID field
| Required. Represents the unique externalized key of the object. The external ID determines the locator of the object on the Salesforce object instead of using the ID field on the object. This field is suggestible. You should select the check box, External ID: Set this field as the unique record identifier from an external system, when you create an external ID field in the Salesforce.com web page. Example: employee_number__c Default value: [None] | |||||||
Null setting with Bulk API
| If selected, in Bulk API mode, null values in the input document can set nullable fields null in the Salesforce object. Default value: False | |||||||
Related object
| Enter or select a related parent object. This property does not affect the Snap operation on records in Salesforce. It is provided for the property suggest and the input schema suggest only. Example: Account Default value: [None] | |||||||
Related external ID | Enter or select an external ID of the selected related parent object. This property does not affect the Snap operation on records in Salesforce. It is provided for the property suggest and the input schema suggest only. Example: AccountNumber__c Default value: [None] | |||||||
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. 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
| |||||||
Execute during preview | This property enables you to execute the Snap during the Save operation so that the output view can produce the preview data. Default value: Not selected
|
If you want to get the resulting status for each record to be upserted in Bulk API mode, you must connect a Salesforce Poller Snap after the Salesforce Upsert Snap.
Examples
Sample Salesforce Pipeline: This pipeline uses several Salesforce Snaps to perform create, updated, delete, & lookup actions on Salesforce object records.
The following is another example that shows how to upsert a new record in a Salesforce object:
In the above pipeline execution:
A Mapper Snap maps the Object record details (that need to be upserted using External ID) to the input view of Salesforce Upsert Snap:
A Salesforce Upsert Snap updates the record (using its External ID) in the Account object:
Successful execution of the Snap gives the following preview:
4.7.0
- Updated the Snap with Standardize error output field.
December 20, 2014
- External ID is now suggestible.