In this article
Table of Contents | ||||
---|---|---|---|---|
|
Overview
Salesforce Create is a Write-type Snap that provides the functionality enables you to create object records in Salesforce in asynchronous 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. The Snap in REST API mode creates Salesforce objects and returns results synchronously without the need of the Salesforce Poller Snap.
Prerequisites
None.
Support for Ultra Pipelines
Works in Ultra Pipelines.
Limitations and Known Issues
None.
Snap Views
View Type | View 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 | Document | 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. |
---|
Snap Settings
Field | Field Type | Description | |||||||
---|---|---|---|---|---|---|---|---|---|
Label | String | Specify 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. Default Value: Salesforce Create | |||||||
Service version | Dropdown list |
| |||||||
Batch size | String/Expression | 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. 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 | Specify the name of the Salesforce object, such as Account. Default Value: Account | |||||||
Salesforce API | Dropdown list | 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). | |||||||
Related Object | String/Expression | 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. Default Value: [None] | |||||||
Related External ID | String/Expression | 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] | |||||||
Bulk API Serial mode | Checkbox | Select this checkbox to enable the Bulk API to run in Serial mode. Deselect this checkbox to allow the Bulk API to run 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 you deselect this checkbox, the output view displays the input document along with the error message. Default Value: Not selected | |||||||
Pass Through | Checkbox | 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
| |||||||
Snap Execution | Dropdown list |
|
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|
Example
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:
Downloads
Attachments | ||||||
---|---|---|---|---|---|---|
|
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|