Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
On this Page

In this article

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

Snap type:

Write

Description:

This Snap provides the functionality to create object records in Salesforce in asynchronous mode

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

Salesforce

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 creates

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


Salesforce Create SettingsImage Added

Prerequisites

:

None.

Support

and limitations:

for Ultra Pipelines 

Works in Ultra 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:InputThis Snap has exactly one input view and receives documents in the view. Each

  

Limitations and Known Issues

None.

Snap Views

TypeFormatNumber of Views Examples of Upstream and Downstream SnapsDescription
InputDocument
Min: 1
Max: 1
  • CSV Generator
  • JSON Generator
This Snap receives documents in the view and each document contains one Salesforce record.
Output
This Snap has at most one output view and produces documents in the view. Each document contains Map data that includes
Document
Min: 0
Max: 1
  • Mapper
  • Salesforce Poller
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. 
ErrorThis 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
it will generate an error document in case of a batch job submission failure.

Snap Settings

Object type

Required. This property enables you to define
FieldField TypeField DependencyDescription

Label


StringNone

Specify a unique name for the Snap.

Default ValueSalesforce Create
ExampleSalesforce Create

Service version 

String/Expression/SuggestionNone

Multiexcerpt include macro
nameME_Service_Version
pageSalesforce Batch Create

Batch size

String/ExpressionNone

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
Example: 200, 10000

Default value: 200

Note

Validation always uses the REST API.

Object Type*

String/ExpressionNone

Specify the name of the Salesforce object

, such as Account.Example: Account
Default value

or select one from the suggested list.

Note

This Snap does not support Net Zero Cloud Salesforce objects.

Default ValueAccount 
Example: Account

Salesforce API


Dropdown listNone
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


Default Value:

REST

Bulk API

Default value

Example:

Bulk

REST API

Null
setting
Setting with Bulk API
If selected, in Bulk API mode,
CheckboxNone

Select this checkbox to set the nullable fields to null in the Salesforce object if there are null values in the input document

can set nullable fields null

. This field works only if you select Bulk API mode in the Salesforce

object

API field.

 

Default

value:  FalseRelated object

Value: Deselected
Example: Selected

Related Object



String/ExpressionNone

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

schema suggests only

Example:  Account

Default

value

Value: [None]
Example:  Account

Related

external ID

External ID


String/ExpressionNone

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]
Example:  AccountNumber__c

Default value: [None]
Apply active assignment rulesCheckboxAppears 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 (AccountCase, or Lead).

If you deselect this checkbox, active assignment rules are not applied for the selected object type (AccountCase, or Lead).

Default Value: Selected

Bulk API Serial mode

If selected,


CheckboxNone

Select this checkbox to enable the Bulk API

will

to run in Serial mode.

If not selected,

Deselect this checkbox to allow the Bulk API

will

to run in

Parallel

Batch mode.

This is only relevant to BULK API. 

Default

value

Value: Not selected (

Parallel

Batch mode) 

Standardize

error outputIf checked, the Snap will

Error Output


CheckboxNone

Select this checkbox to enable the Snap to produce the error output with Reason, Original, Stack trace and Resolution.

If

unchecked

you deselect this checkbox, the output view

will simply show

displays the input document along with the error message.

Default

value

Value: Not selected

Pass

throughIf selected,

Through


CheckboxNone

Select this checkbox to pass the input document

will be passed through to

the output view under the key 'original'.

If

Pass through is not selected

you deselect this checkbox, the input document will not be passed and there is no "original" key in the output document.

Default

value

Value:  Selected

Multiexcerpt include macroname

Excerpt


Info

For Bulk APIs, if you select this checkbox 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

page
Dropdown list
SOAP Execute
None

Multiexcerpt include macro
nameExecution_Detail_Write
pageSOAP Execute

 

Examples

This pipeline uses several Salesforce Snaps to perform create, updated, delete, & lookup actions on Salesforce object records.  

The following is another example that

Default Value: Execute Only
Example: Validate & Execute


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:

  1. Object record details are provided to Salesforce Create Snap using a CSV Generator Snap: 

  2. The Salesforce Create Snap creates a new 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