The Anypoint(TM) Connector for Salesforce Composite provides you a way to integrate with Salesforce Composite API link:https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_composite.htm[Salesforce Composite API]. The connector exposes convenient methods for preparing sub-requests, execute them in one batch and parse the results. It provides DataSense on both preparation of sub-requests and parsing response of their execution.
Additional Info
Requires Mule Enterprise License |
Yes |
Requires Entitlement |
No |
Mule Version |
3.7.0 or higher |
Configs
Configuration
<sfdc-composite:config>
Connection Management
Salesforce Composite connector configuration that uses "OAuth 2.0 Username-Password" authentication for establishing connection with Salesforce system.
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
name |
The name of this configuration. With this name can be later referenced. |
x |
||
username |
Username used to initialize the session |
x |
||
password |
Password used to authenticate the user |
x |
||
consumerKey |
Your application's client identifier (consumer key in Remote Access Detail). |
x |
||
consumerSecret |
Your application's client secret (consumer secret in Remote Access Detail). |
x |
||
securityToken |
User's security token. It can be omitted if your IP has been whitelisted on Salesforce |
x |
||
tokenEndpoint |
URL pointing the server responsible of providing authentication token. According to Salesforce it should be https://login.salesforce.com/services/oauth2/token, or, if implementing for a community, https://acme.force.com/customers/services/oauth2/token (where acme.force.com/customers is your community URL). |
|
||
proxyHost |
|
|||
proxyPort |
|
|||
proxyUsername |
|
|||
proxyPassword |
|
Processors
Pre create
<sfdc-composite:pre-create>
DataSense enabled
The purpose of this method is to provide metadata for create based on object that is going to be created and generates a sub-request to be given for execution to org.mule.modules.salesforce.composite.SalesforceCompositeConnector#executeCompositeBatch(String, java.util.List).
XML Sample
<sfdc-composite:pre-create config-ref="Salesforce_Composite_Batch__Basic_Auth_type_config" type="#[map-payload:type]"
subRequestCorrelationId="#[map-payload:subRequestCorrelationId]"/>
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
type |
- type of object that is going to be created |
x |
||
sObject |
- object that is going to be created as a map that sticks to metadata for selected type |
#[payload] |
|
|
subRequestCorrelationId |
- this is the identifier provided by user for the sub-request. It will be used to by post operation to correlate the result |
x |
Post create
<sfdc-composite:post-create>
The purpose of this method is to provide metadata for the result of create. It takes as input one record from the result returned by org.mule.modules.salesforce.composite.SalesforceCompositeConnector#executeCompositeBatch(String, java.util.List) which belongs to create sub-request generated by org.mule.modules.salesforce.composite.SalesforceCompositeConnector#preCreate(String, java.util.Map).
XML Sample
<sfdc-composite:post-create config-ref="Salesforce_Composite_Batch__Basic_Auth_type_config" type="#[map-payload:type]"
subRequestCorrelationId="#[map-payload:subRequestCorrelationId]"/>
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
createResult |
- the result of create sub-request |
#[payload] |
|
|
subRequestCorrelationId |
- this is the identifier provided by user for the sub-request. It will be used to by post operation to correlate the result |
x |
Pre update
<sfdc-composite:pre-update>
DataSense enabled
The purpose of this method is to provide metadata for update based on object that is going to be updated and generates a sub-request to be given for execution to org.mule.modules.salesforce.composite.SalesforceCompositeConnector#executeCompositeBatch(java.util.List, MuleEvent).
XML Sample
<sfdc-composite:pre-update config-ref="Salesforce_Composite_Batch__Basic_Auth_type_config" type="#[map-payload:type]"
subRequestCorrelationId="#[map-payload:subRequestCorrelationId]"/>
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
type |
- type of object that is going to be updated |
x |
||
sObject |
- object that is going to be updated as a map that sticks to metadata for selected type |
#[payload] |
|
|
subRequestCorrelationId |
- this is the identifier provided by user for the sub-request. It will be used to by post operation to correlate the result |
x |
Returns
Return Java Type | Description |
---|---|
generated sub-request that is going to be executed by List, MuleEvent) |
Post update
<sfdc-composite:post-update>
The purpose of this method is to provide metadata for the result of update. It takes as input one record from the result returned by org.mule.modules.salesforce.composite.SalesforceCompositeConnector#executeCompositeBatch(String, java.util.List) which belongs to update sub-request generated by org.mule.modules.salesforce.composite.SalesforceCompositeConnector#preUpdate(String, java.util.Map).
XML Sample
<sfdc-composite:post-update config-ref="Salesforce_Composite_Batch__Basic_Auth_type_config"
subRequestCorrelationId="#[map-payload:subRequestCorrelationId]"/>
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
updateResult |
- the result of update sub-request |
#[payload] |
|
|
subRequestCorrelationId |
- this is the identifier provided by user for the sub-request. It will be used to by post operation to correlate the result |
x |
Pre delete
<sfdc-composite:pre-delete>
DataSense enabled
The purpose of this method is to provide metadata for delete based on object that is going to be deleted and generates a sub-request to be given for execution to org.mule.modules.salesforce.composite.SalesforceCompositeConnector#executeCompositeBatch(String, java.util.List).
XML Sample
<sfdc-composite:pre-delete config-ref="Salesforce_Composite_Batch__Basic_Auth_type_config" type="#[map-payload:type]"
subRequestCorrelationId="#[map-payload:subRequestCorrelationId]"/>
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
type |
- type of object that is going to be deleted |
x |
||
sObject |
- map with the id of the object that is going to be deleted mapped to "Id" key |
#[payload] |
|
|
subRequestCorrelationId |
- this is the identifier provided by user for the sub-request. It will be used to by post operation to correlate the result |
x |
Post delete
<sfdc-composite:post-delete>
The purpose of this method is to provide metadata for the result of delete. It takes as input one record from the result returned by org.mule.modules.salesforce.composite.SalesforceCompositeConnector#executeCompositeBatch(String, java.util.List) which belongs to delete sub-request generated by org.mule.modules.salesforce.composite.SalesforceCompositeConnector#preDelete(String, java.util.Map).
XML Sample
<sfdc-composite:post-delete config-ref="Salesforce_Composite_Batch__Basic_Auth_type_config"
subRequestCorrelationId="#[map-payload:subRequestCorrelationId]"/>
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
deleteResult |
- the result of delete sub-request |
#[payload] |
|
|
subRequestCorrelationId |
- this is the identifier provided by user for the sub-request. It will be used to by post operation to correlate the result |
x |
Pre get limits
<sfdc-composite:pre-get-limits>
The purpose of this method is to provide metadata for getLimits and generates a sub-request to be given for execution to org.mule.modules.salesforce.composite.SalesforceCompositeConnector#executeCompositeBatch(String, java.util.List).
XML Sample
<sfdc-composite:pre-get-limits config-ref="Salesforce_Composite_Batch__Basic_Auth_type_config"
subRequestCorrelationId="#[map-payload:subRequestCorrelationId]"/>
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
subRequestCorrelationId |
- this is the identifier provided by user for the sub-request. It will be used to by post operation to correlate the result |
x |
Post get limits
<sfdc-composite:post-get-limits>
The purpose of this method is to provide metadata for the result of create. It takes as input one record from the result returned by org.mule.modules.salesforce.composite.SalesforceCompositeConnector#executeCompositeBatch(String, java.util.List) which belongs to create sub-request generated by org.mule.modules.salesforce.composite.SalesforceCompositeConnector#preCreate(String, java.util.Map).
XML Sample
<sfdc-composite:post-get-limits config-ref="Salesforce_Composite_Batch__Basic_Auth_type_config"
subRequestCorrelationId="#[map-payload:subRequestCorrelationId]"/>
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
getLimitsResult |
- the result of create sub-request |
#[payload] |
|
|
subRequestCorrelationId |
- this is the identifier provided by user for the sub-request. It will be used to by post operation to correlate the result |
x |
Pre query
<sfdc-composite:pre-query>
The purpose of this method is to provide metadata for query based on object that is going to be queried and generates a sub-request to be given for execution to org.mule.modules.salesforce.composite.SalesforceCompositeConnector#executeCompositeBatch(String, java.util.List).
XML Sample
<sfdc-composite:pre-query config-ref="Salesforce_Composite_Batch__Basic_Auth_type_config" query="dsql:SELECT Id,Name,Type FROM Account"
subRequestCorrelationId="#[map-payload:subRequestCorrelationId]"/>
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
query |
- the query that is going to be ran in executeCompositeBatch |
x |
||
subRequestCorrelationId |
- this is the identifier provided by user for the sub-request. It will be used to by post operation to correlate the result |
x |
Pre query all
<sfdc-composite:pre-query-all>
The purpose of this method is to provide metadata for query based on object that is going to be queried and generates a sub-request to be given for execution to org.mule.modules.salesforce.composite.SalesforceCompositeConnector#executeCompositeBatch(String, java.util.List).
XML Sample
<sfdc-composite:pre-query-all config-ref="Salesforce_Composite_Batch__Basic_Auth_type_config" query="dsql:SELECT Id,Name,Type FROM Account"
subRequestCorrelationId="#[map-payload:subRequestCorrelationId]"/>
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
query |
- the query that is going to be ran in executeCompositeBatch |
x |
||
subRequestCorrelationId |
- this is the identifier provided by user for the sub-request. It will be used to by post operation to correlate the result |
x |
Post query
<sfdc-composite:post-query>
Paged Operation
The purpose of this method is to provide metadata for the result of query. It takes as input one record from the result returned by org.mule.modules.salesforce.composite.SalesforceCompositeConnector#executeCompositeBatch(String, java.util.List) which belongs to query sub-request generated by org.mule.modules.salesforce.composite.SalesforceCompositeConnector#preQuery(String, java.util.Map).
XML Sample
<sfdc-composite:post-query config-ref="Salesforce_Composite_Batch__Basic_Auth_type_config" query="dsql:SELECT Id,Name,Type FROM Account"
subRequestCorrelationId="#[map-payload:subRequestCorrelationId]"/>
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
query |
- the query ran in executeCompositeBatch - needed for datasense, to bring the output metadata |
x |
||
queryResult |
- the result of query sub-request |
#[payload] |
|
|
subRequestCorrelationId |
- this is the identifier provided by user for the sub-request. It will be used to by post operation to correlate the result |
x |
||
pagingConfiguration |
PagingConfiguration |
- Paging configuration |
x |
Returns
Return Java Type | Description |
---|---|
ProviderAwarePagingDelegate<Map<String,Object>,SalesforceCompositeConnector> |
transformed result in format that sticks to metadata for query method |
Post query all
<sfdc-composite:post-query-all>
Paged Operation
The purpose of this method is to provide metadata for the result of create. It takes as input one record from the result returned by org.mule.modules.salesforce.composite.SalesforceCompositeConnector#executeCompositeBatch(String, java.util.List) which belongs to create sub-request generated by org.mule.modules.salesforce.composite.SalesforceCompositeConnector#preCreate(String, java.util.Map).
XML Sample
<sfdc-composite:post-query-all config-ref="Salesforce_Composite_Batch__Basic_Auth_type_config" query="dsql:SELECT Id,Name,Type FROM Account"
subRequestCorrelationId="#[map-payload:subRequestCorrelationId]"/>
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
query |
- the query ran in executeCompositeBatch - needed for datasense, to bring the output metadata |
x |
||
queryResult |
- the result of create sub-request |
#[payload] |
|
|
subRequestCorrelationId |
- this is the identifier provided by user for the sub-request. It will be used to by post operation to correlate the result |
x |
||
pagingConfiguration |
PagingConfiguration |
- Paging configuration |
x |
Returns
Return Java Type | Description |
---|---|
ProviderAwarePagingDelegate<Map<String,Object>,SalesforceCompositeConnector> |
transformed result in format that sticks to metadata for create method |
Pre search
<sfdc-composite:pre-search>
The purpose of this method is to provide the user a way to input a SOSL String and generates a sub-request to be given for execution to org.mule.modules.salesforce.composite.SalesforceCompositeConnector#executeCompositeBatch(java.util.List).
XML Sample
<sfdc-composite:pre-search config-ref="Salesforce_Composite_Batch__Basic_Auth_type_config" doc:name="Salesforce Composite Batch" search="'FIND {Acme*} IN Name FIELDS RETURNING Contact(Id, Phone, FirstName, LastName), Account(Id, Phone, Name)'"
subRequestCorrelationId="#[map-payload:subRequestCorrelationId]"/>
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
search |
- the SOSL string that is going to be ran in executeCompositeBatch |
#[payload] |
|
|
subRequestCorrelationId |
- this is the identifier provided by user for the sub-request. It will be used to by post operation to correlate the result |
x |
Post search
<sfdc-composite:post-search>
The purpose of this method is to provide metadata for the result of search. It takes as input one record from the result returned by org.mule.modules.salesforce.composite.SalesforceCompositeConnector#executeCompositeBatch(String, java.util.List) which belongs to search sub-request generated by org.mule.modules.salesforce.composite.SalesforceCompositeConnector#preSearch(String, java.util.Map).
XML Sample
<sfdc-composite:post-search config-ref="Salesforce_Composite_Batch__Basic_Auth_type_config" doc:name="Salesforce Composite Batch"
subRequestCorrelationId="#[map-payload:subRequestCorrelationId]"/>
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
searchResult |
- the result of search sub-request |
#[payload] |
|
|
subRequestCorrelationId |
- this is the identifier provided by user for the sub-request. It will be used to by post operation to correlate the result |
x |
Execute composite batch
<sfdc-composite:execute-composite-batch>
Sends all the sub-requests in one batch for execution to server.
XML Sample
<sfdc-composite:execute-composite-batch config-ref="Salesforce_Composite_Batch__Basic_Auth_type_config"/>
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
subRequests |
- sub-requests to be sent to server |
#[payload] |
|
Create sobject tree
<sfdc-composite:create-sobject-tree>
DataSense enabled
Sends a list of SObject trees to Salesforce to be created.
XML Sample
<sfdc-composite:create-sobject-tree config-ref="Salesforce_Composite__Configuration" type="Account" doc:name="Salesforce Composite"/>
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
type |
- the sObject type of the root of the trees |
x |
||
sObjects |
- a list of maps containing representing the list of trees that need to be created |
#[payload] |
|
Pre retrieve
<sfdc-composite:pre-retrieve>
DataSense enabled
The purpose of this method is to provide metadata for retrieve based on object that is going to be retrieved and generates a sub-request to be given for execution to org.mule.modules.salesforce.composite.SalesforceCompositeConnector#executeCompositeBatch(String, java.util.List).
XML Sample
<sfdc-composite:pre-retrieve config-ref="Salesforce_Composite_Batch__Basic_Auth_type_config" type="#[map-payload:type]"
subRequestCorrelationId="#[map-payload:subRequestCorrelationId]"/>
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
retrieveData |
- object that is going to be retrieved as a map that sticks to metadata for selected type |
#[payload] |
|
|
subRequestCorrelationId |
- this is the identifier provided by user for the sub-request. It will be used to by post operation to correlate the result |
x |
Post retrieve
<sfdc-composite:post-retrieve>
DataSense enabled
The purpose of this method is to provide metadata for the result of retrieve. It takes as input one record from the result returned by org.mule.modules.salesforce.composite.SalesforceCompositeConnector#executeCompositeBatch(String, java.util.List) which belongs to retrieve sub-request generated by org.mule.modules.salesforce.composite.SalesforceCompositeConnector#preRetrieve(String, java.util.Map).
XML Sample
<sfdc-composite:post-retrieve config-ref="Salesforce_Composite_Batch__Basic_Auth_type_config"
subRequestCorrelationId="#[map-payload:subRequestCorrelationId]"/>
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
type |
- type of object that is going to be retrieved |
x |
||
retrieveData |
- the result of retrieve sub-request |
#[payload] |
|
|
subRequestCorrelationId |
- this is the identifier provided by user for the sub-request. It will be used to by post operation to correlate the result |
x |