...
Snap type:
...
Write
...
Description:
...
In this article
Table of Contents | ||||
---|---|---|---|---|
|
Overview
Salesforce Create is a Write-type Snap that enables you to create object records using REST API or Bulk API 1.0. The Snap in Bulk API mode submits a batch job and writes the batch job information to the output view
...
, which should be passed to the Salesforce Poller Snap to check the result of the batch job. The Snap in REST API mode creates
...
records and returns results synchronously without the need of the Salesforce Poller Snap.
Note | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Prerequisites
...
None.
...
Support for Ultra Pipelines
Works in Ultra Pipelines.
...
...
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.
...
Limitations and Known Issues
None.
Snap Views
Type | Format | Number of Views | Examples of Upstream and Downstream Snaps | Description |
---|---|---|---|---|
Input | Document | Min: 1 Max: 1 |
| This Snap receives documents in the view and each document contains one Salesforce record. |
Output |
...
Document | Min: 0 Max: 1 |
| A document that contains Map data with these elements: Job ID, Batch ID, URL, and an array of records if it is in Bulk API mode. If it is executed in REST API mode, each document contains Map data for the ID of the created record and input data. |
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. |
---|
...
If the Snap is in the Bulk API, |
...
...
Settings
...
Label
...
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
...
it will generate an error document in case of a batch job submission failure. |
Snap Settings
Field | Field Type | Field Dependency | Description | |||||||
---|---|---|---|---|---|---|---|---|---|---|
Label | String | None | Specify a unique name for the Snap. Default Value: Salesforce Create | |||||||
Service version | String/Expression/Suggestion | None |
| |||||||
Batch size | String/Expression | None | In Bulk API, this property value is allowed to be from 1 through 10,000. Each input document forms one Salesforce record to be inserted. The Snap stores 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 during |
...
the data load. Decreasing the batch size increases the number of API calls against Salesforce. |
...
Object type
...
In REST API, the Snap can insert only one record per each request regardless of the value of the Batch size property. Default Value: 200 | ||||
Object Type* | String/Expression | None | Specify the name of the Salesforce object |
...
Example: Account
Default value: Account
Salesforce API
...
or select one from the suggested list.
Default Value: Account | ||||
Salesforce API | Dropdown list | None | 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). |
...
|
...
Bulk API |
...
Example: |
...
REST API |
Null |
...
Setting with Bulk API |
...
Checkbox | None | Select this checkbox to set the nullable fields to null in the Salesforce object if there are null values in the input document |
...
. This field works only if you select Bulk API mode in the Salesforce |
...
API field. |
...
Default |
...
Related object
...
Value: Deselected | ||||
Related Object | String/Expression | None | 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 suggests only. |
Example: Account
Default |
...
Value: [None] | |
Related |
...
External ID | String/Expression | None | 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 suggests only. Default Value: [None] |
...
Apply active assignment rules | Checkbox | Appears when you select REST API from the Salesforce API dropdown and when the Object Type is Account, Case, or Lead. | Select this checkbox to apply the active assignment rules for the selected object type (Account, Case, or Lead). If you deselect this checkbox, active assignment rules are not applied for the selected object type (Account, Case, or Lead). Default Value: Selected | |
Bulk API Serial mode |
...
Checkbox | None | Select this checkbox to enable the Bulk API to run in Serial mode. |
...
Deselect this checkbox to allow the Bulk API |
...
to run in |
...
Batch mode. Default |
...
Value: Not selected ( |
...
Batch mode) | |
Standardize |
...
Error Output | Checkbox | None | Select this checkbox to enable the Snap to produce the error output with Reason, Original, Stack trace and Resolution. If |
...
you deselect this checkbox, the output view |
...
displays the input document along with the error message. Default |
...
Value: Not selected | |
Pass Through |
...
Checkbox |
Pass through
...
None | Select this checkbox to pass the input document the output view under the key 'original'. |
...
If you deselect this checkbox, 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
...
Examples
Sample Salesforce Pipeline: This pipeline uses several Salesforce Snaps to perform create, updated, delete, & lookup actions on Salesforce object records.
...
| ||||||||||
Snap Execution | Dropdown list | None |
Default Value: Execute Only |
Example
Creating New Records in Salesforce
The following example shows how to create a new record in a Salesforce object
...
.
...
In the above pipeline execution:
...
- Object record details are provided to Salesforce Create Snap using a CSV Generator Snap:
- The Salesforce Create Snap creates a new record in the Account object:
Successful execution of the Snap gives the following preview:
...
title | Snap History |
---|
4.7.0
- Updated the Snap with 'Standardize error output' field.
4.5.1
Downloads
Multiexcerpt include macro | ||||
---|---|---|---|---|
|
Attachments | ||||||
---|---|---|---|---|---|---|
|
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|