Salesforce

The Salesforce Connector provides an API to work with Salesforce objects.

This connector is available in the following products and regions:

Service Class Regions
Logic Apps Standard All Logic Apps regions
Flow Premium All Flow regions
PowerApps Premium All PowerApps regions

To use this integration, you will need access to a Salesforce account with API access enabled. To make a connection, select Sign In. You will be prompted to provide your Salesforce login, follow the remainder of the screens to create a connection.

You're now ready to start using this integration.

Known Issues and Limitations

  1. There is a limit on the number of fields a query to Salesforce can contain. The limit varies depending on the type of the columns, the number of computed columns, etc. When you receive an error "Query is either selecting too many fields or the filter conditions are too complicated" it means that your query exceeds the limit. To avoid this, use "Select Query" advanced option and specify fields that you really need.
  2. Salesforce session settings can block this integration. Please ensure that setting "Lock sessions to the IP address from which they originated" is disabled.
  3. Salesforce API access should be enabled. To verify access settings, go to profile settings for the current user and search for "API Enabled" checkbox.
  4. Note that Salesforce trial accounts do not have API access.
  5. Custom fields of type "Picklist (Multi-Select)" are not supported by "Create record" and "Update record" operations.

PowerApps delegable functions and operations for Salesforce

These PowerApps operations, for a given data type, may be delegated to Salesforce for processing (rather than processing locally within PowerApps).

Top-level functions

  Delegable
Average No
Filter Yes
LookUp Yes
Max No
Min No
Search Yes
Sort Yes
SortByColumns Yes
Sum No

Filter and LookUp predicates

  Salesforce
Not Yes
IsBlank No
TrimEnds No
Len No
+, - No
<, <=, =, <>, >, >= Yes
And (&&), Or (||), Not (!) Yes
in Yes
StartsWith No

Creating a connection

To connect your account, you will need the following information:

Name Type Description
Login URI (Environment) string

The Salesforce Login URI. For Production, leave blank or use https://login.salesforce.com

Salesforce API Version string

The Salesforce API Version. For default, leave blank or use v34.0

Throttling Limits

Name Calls Renewal Period
API calls per connection90060 seconds

Actions

Close or abort a job

Closes or aborts a job. Use UploadComplete to close a job, or Aborted to abort a job. If you close a job, Salesforce queues the job and uploaded data for processing, and you can’t add any additional job data. If you abort a job, the job does not get queued or processed.

Create a job

Creates a job, which represents a bulk operation (and associated data) that is sent to Salesforce for asynchronous processing. Provide job data via an Upload Job Data request.

Create a job (V2)

Creates a job, which represents a bulk operation (and associated data) that is sent to Salesforce for asynchronous processing. Provide job data via an Upload Job Data request.

Create record

This operation creates a record and allows null values.

Create record [DEPRECATED]

This operation creates a record.

Delete a job

Deletes a job. To be deleted, a job must have a state of UploadComplete, JobComplete, Aborted, or Failed.

Delete record

This operation deletes a record.

Get a Record by External ID

This operation retrieves a record using an external ID.

Get all jobs

Get a list of all jobs

Get job info

Retrieves detailed information about a job.

Get job results

Retrieves a list of records based on the result type for a completed job.

Get object types

This operation lists the available Salesforce object types.

Get record

This operation gets a record.

Get record [DEPRECATED]

This operation gets a record. This action has been deprecated. Please use GetItem_V2 instead.

Get records

This operation gets records of a certain Salesforce object type like 'Leads'.

Insert or Update (Upsert) a Record by External ID

This operation inserts or updates (upserts) a record using an external ID.

Update record

This operation updates a record and allows null values.

Update record [DEPRECATED]

This operation updates a record.

Upload job data

Uploads data for a job using CSV data.

Close or abort a job

Closes or aborts a job. Use UploadComplete to close a job, or Aborted to abort a job. If you close a job, Salesforce queues the job and uploaded data for processing, and you can’t add any additional job data. If you abort a job, the job does not get queued or processed.

Parameters

Name Key Required Type Description
Job ID
jobId True string

Job ID

state
state True string

state

Returns

Body
JobInfo

Create a job

Creates a job, which represents a bulk operation (and associated data) that is sent to Salesforce for asynchronous processing. Provide job data via an Upload Job Data request.

Parameters

Name Key Required Type Description
Column Delimiter
columnDelimiter string

Column Delimiter

External ID Field Name
externalIdFieldName string

External ID Field Name

Line Ending
lineEnding string

Line Ending

Object
object True string

Object

Operation
operation True string

Operation

Returns

Body
JobInfo

Create a job (V2)

Creates a job, which represents a bulk operation (and associated data) that is sent to Salesforce for asynchronous processing. Provide job data via an Upload Job Data request.

Parameters

Name Key Required Type Description
Object
object True string

The object type for the data being processed.

Operation
operation True string

The processing operation for the job.

Column Delimiter
columnDelimiter string

The column delimiter used for CSV job data.

External ID Field Name
externalIdFieldName string

The external ID field in the object being updated. Only needed for upsert operations. Field values must also exist in CSV job data.

Line Ending
lineEnding string

The line ending used for CSV job data, marking the end of a data row.

Content Type
contentType string

The content type for the job.

Returns

Output for 'CreateJobV2' operation

Create record

This operation creates a record and allows null values.

Parameters

Name Key Required Type Description
Salesforce Object Type
table True string

table name

Record
item True dynamic

Record

Returns

The outputs of this operation are dynamic.

Create record [DEPRECATED]

This operation creates a record.

Parameters

Name Key Required Type Description
Salesforce Object Type
table True string

The Salesforce object type like 'Leads'.

Record
item True dynamic

The record to create.

Returns

The outputs of this operation are dynamic.

Delete a job

Deletes a job. To be deleted, a job must have a state of UploadComplete, JobComplete, Aborted, or Failed.

Parameters

Name Key Required Type Description
Job ID
jobId True string

Job ID

Delete record

This operation deletes a record.

Parameters

Name Key Required Type Description
Salesforce Object Type
table True string

The Salesforce object type like 'Leads'.

Record Id
id True string

The unique identifier of record to delete.

Get a Record by External ID

This operation retrieves a record using an external ID.

Parameters

Name Key Required Type Description
Salesforce Object Type
table True string

The Salesforce object type like 'Leads'.

External ID Field
externalIdField True string

Field marked as external ID field on Salesforce object.

External ID
externalId True string

External ID of the record to retrieve.

Returns

The outputs of this operation are dynamic.

Get all jobs

Get a list of all jobs

Parameters

Name Key Required Type Description
Concurrency Mode
concurrenyMode string

Concurrency Mode

Is PK Chunking Enabled
isPkChunkingEnabled boolean

Is PK Chunking Enabled

Job Type
jobType string

Job Type

Query Locator
queryLocator string

Query Locator

Returns

Get job info

Retrieves detailed information about a job.

Parameters

Name Key Required Type Description
Job ID
jobId True string

Job ID

Returns

Get job results

Retrieves a list of records based on the result type for a completed job.

Parameters

Name Key Required Type Description
Job ID
jobId True string

Job ID

Result Type
resultType True string

Result Type

Get object types

This operation lists the available Salesforce object types.

Returns

Represents a list of tables.

Body
TablesList

Get record

This operation gets a record.

Parameters

Name Key Required Type Description
Salesforce Object Type
table True string

table name

Record Id
id True string

item key

Select Query
$select string

Specific fields to retrieve from entries (default = all).

Returns

The outputs of this operation are dynamic.

Get record [DEPRECATED]

This operation gets a record. This action has been deprecated. Please use GetItem_V2 instead.

Parameters

Name Key Required Type Description
Salesforce Object Type
table True string

The Salesforce object type like 'Leads'.

Record Id
id True string

The unique identifier of record to get.

Returns

The outputs of this operation are dynamic.

Get records

This operation gets records of a certain Salesforce object type like 'Leads'.

Parameters

Name Key Required Type Description
Salesforce Object Type
table True string

The Salesforce object type like 'Leads'.

Filter Query
$filter string

An ODATA filter query to restrict the entries returned (e.g. stringColumn eq 'string' OR numberColumn lt 123).

Order By
$orderby string

An ODATA orderBy query for specifying the order of entries.

Top Count
$top integer

Total number of entries to retrieve (default = all).

Skip Count
$skip integer

The number of entries to skip (default = 0).

Select Query
$select string

Specific fields to retrieve from entries (default = all).

Returns

The outputs of this operation are dynamic.

Insert or Update (Upsert) a Record by External ID

This operation inserts or updates (upserts) a record using an external ID.

Parameters

Name Key Required Type Description
Salesforce Object Type
table True string

The Salesforce object type like 'Leads'.

External ID Field
externalIdField True string

Field marked as external ID field on Salesforce object.

External ID
externalId True string

External ID of the record to upsert.

Record
item True dynamic

The record with changed properties.

Returns

The outputs of this operation are dynamic.

Update record

This operation updates a record and allows null values.

Parameters

Name Key Required Type Description
Salesforce Object Type
table True string

table name

Record Id
id True string

item key

item to be updated
item True dynamic

item to be updated

Select Query
$select string

Specific fields to retrieve from entries (default = all).

Returns

The outputs of this operation are dynamic.

Update record [DEPRECATED]

This operation updates a record.

Parameters

Name Key Required Type Description
Salesforce Object Type
table True string

The Salesforce object type like 'Leads'.

Record Id
id True string

The unique identifier of record to update.

Record
item True dynamic

The record with changed properties.

Returns

The outputs of this operation are dynamic.

Upload job data

Uploads data for a job using CSV data.

Parameters

Name Key Required Type Description
Job ID
jobId True string

Job ID

CSV File Content
body True binary

CSV Data to upload

Triggers

When a record is created

This operation triggers when there are newly created records.

When a record is modified

This operation triggers when there are newly modified records.

When a record is created

This operation triggers when there are newly created records.

Parameters

Name Key Required Type Description
Salesforce Object Type
table True string

The Salesforce object type like 'Leads'.

Filter Query
$filter string

An ODATA filter query to restrict the entries returned (e.g. stringColumn eq 'string' OR numberColumn lt 123).

Order By
$orderby string

An ODATA orderBy query for specifying the order of entries.

Select Query
$select string

Specific fields to retrieve from entries (default = all).

Returns

The outputs of this operation are dynamic.

When a record is modified

This operation triggers when there are newly modified records.

Parameters

Name Key Required Type Description
Salesforce Object Type
table True string

The Salesforce object type like 'Leads'.

Filter Query
$filter string

An ODATA filter query to restrict the entries returned (e.g. stringColumn eq 'string' OR numberColumn lt 123).

Order By
$orderby string

An ODATA orderBy query for specifying the order of entries.

Select Query
$select string

Specific fields to retrieve from entries (default = all).

Returns

The outputs of this operation are dynamic.

Definitions

CreateJobResponse

Output for 'CreateJobV2' operation

Name Path Type Description
Object
object string

The object type for the data being processed.

Operation
operation string

The processing operation for the job.

Column Delimiter
columnDelimiter string

The column delimiter used for CSV job data.

External ID Field Name
externalIdFieldName string

The external ID field in the object being updated. Only needed for upsert operations. Field values must also exist in CSV job data.

Line Ending
lineEnding string

The line ending used for CSV job data, marking the end of a data row.

Content Type
contentType string

The content type for the job.

API Version
apiVersion float

The API version that the job was created in.

Concurrency Mode
concurrencyMode string

The concurrency mode for the job.

Content Url
contentUrl string

The URL to use for Upload Job Data requests for this job. Only valid if the job is in 'Open' state.

Created By Id
createdById string

The ID of the user who created the job.

Created Date
createdDate date-time

The date and time in the UTC time zone when the job was created.

Id
id string

Unique ID for this job.

Job Type
jobType string

The job’s type.

State
state string

The current state of processing for the job.

System Modstamp
systemModstamp date-time

Date and time in the UTC time zone when the job finished.

Table

Represents a table.

Name Path Type Description
Name
Name string

The name of the table. The name is used at runtime.

DisplayName
DisplayName string

The display name of the table.

DynamicProperties
DynamicProperties object

Additional table properties provided by the connector to the clients.

TablesList

Represents a list of tables.

Name Path Type Description
value
value array of Table

List of Tables

GetAllJobsResponse

Name Path Type Description
Done
done boolean

Done

records
records array of JobInfo
Next Recored URL
nextRecordUrl string

Next Record URL

JobInfo

Name Path Type Description
API Version
apiVersion float

API Version

Column Delimiter
columnDelimiter string

Column Delimiter

Concurrency Mode
concurrencyMode string

Concurrency Mode

Content Type
contentType string

Content Type

Content URL
contentUrl string

Content URL

Created By ID
createdById string

Created By ID

Created Date
createdDate date-time

Created Date

External ID Field Name
externalIdFieldName string

External ID Field Name

ID
id string

ID

Job Type
jobType string

Job Type

Line Ending
lineEnding string

Line Ending

Object
object string

Object

Operation
operation string

Operation

State
state string

State

System Mod Stamp
systemModstamp date-time

System Mod Stamp

CheckJobResponse

Name Path Type Description
APEX Processing Time
apexProcessingTime number

APEX Processing Time

API Active Processing Time
apiActiveProcessingTime number

API Active Processing Time

API Version
apiVersion string

API Version

Column Delimiter
columnDelimiter string

Column Delimiter

Concurrency Mode
concurrencyMode string

Concurrency Mode

Content Type
contentType string

Content Type

Content URL
contentUrl string

Content URL

Created By ID
createdById string

Created By ID

Created Date
createdDate date-time

Created Date

External Field Name
externalFieldName string

External Field Name

ID
id string

ID

Job Type
jobType string

Job Type

Line Ending
lineEnding string

Line Ending

Object
object string

Object

Operation
operation string

Operation

Retries
retries number

Retries

State
state string

State

systemModStamp
systemModStamp date-time
Total Processing Time
totalProcessingTime number

Total Processing Time