@Connector(name="sfdc", schemaVersion="8.0", friendlyName="Salesforce", minMuleVersion="3.5") @RequiresEnterpriseLicense(allowEval=true) @MetaDataScope(value=SObjectMetadataCategory.class) public class SalesforceConnector extends Object
Integrating with Salesforce consists of web service calls utilizing XML request/response setup over an HTTPS connection. The technical details of this connection such as request headers, error handling, HTTPS connection, etc. are all abstracted from the user to make implementation quick and easy.
Modifier and Type | Field and Description |
---|---|
static String |
SALESFORCE_SOAP_PROCESSOR_OBJECT_STORE |
Constructor and Description |
---|
SalesforceConnector() |
Modifier and Type | Method and Description |
---|---|
com.sforce.async.JobInfo |
abortJob(String jobId)
Aborts an open Job given its ID.
|
com.sforce.async.BatchInfo |
batchInfo(com.sforce.async.BatchInfo batchInfo,
com.sforce.async.ContentType contentType)
Access latest { BatchInfo} of a submitted { BatchInfo}.
|
com.sforce.async.BatchInfoList |
batchInfoList(String jobId,
com.sforce.async.ContentType contentType)
Get information about all batches in a job.
|
com.sforce.async.BatchResult |
batchResult(com.sforce.async.BatchInfo batchInfo)
Access BatchResult of a submitted BatchInfo.
|
InputStream |
batchResultStream(com.sforce.async.BatchInfo batchInfo,
Map<String,String> headers)
Access BatchResult of a submitted BatchInfo.
|
com.sforce.soap.partner.PartnerConnection |
buildPartnerConnection(Map<SalesforceHeader,Object> headers) |
com.sforce.soap.partner.ChangeOwnPasswordResult |
changeOwnPassword(String oldPassword,
String newPassword)
Changes the password of the user linked to the connector's configuration.
|
com.sforce.async.JobInfo |
closeJob(String jobId)
Closes an open Job given its ID.
|
com.sforce.soap.partner.LeadConvertResult |
convertLead(String leadId,
String contactId,
String accountId,
String opportunityId,
Boolean overWriteLeadSource,
Boolean doNotCreateOpportunity,
String opportunityName,
String convertedStatus,
Boolean sendEmailToOwner,
Map<SalesforceHeader,Object> headers)
Converts a Lead into an Account, Contact, or (optionally) an Opportunity.
|
List<com.sforce.soap.partner.SaveResult> |
create(String type,
List<Map<String,Object>> objects,
Map<SalesforceHeader,Object> headers)
Adds one or more new records to your organization's data.
|
com.sforce.async.BatchInfo |
createBatch(com.sforce.async.JobInfo jobInfo,
List<Map<String,Object>> objects)
Creates a Batch using the given objects within the specified Job.
|
com.sforce.async.BatchInfo |
createBatchForQuery(com.sforce.async.JobInfo jobInfo,
String query)
Creates a Batch using the given query.
|
com.sforce.async.BatchInfo |
createBatchStream(com.sforce.async.JobInfo jobInfo,
InputStream stream)
Creates a Batch using the given stream within the specified Job.
|
com.sforce.async.BatchInfo |
createBulk(String type,
List<Map<String,Object>> objects)
Adds one or more new records to your organization's data.
|
com.sforce.async.JobInfo |
createJob(com.sforce.async.OperationEnum operation,
String type,
String externalIdFieldName,
com.sforce.async.ContentType contentType,
com.sforce.async.ConcurrencyMode concurrencyMode,
Map<String,String> headers)
Creates a Job in order to perform one or more batches through Bulk API Operations.
|
List<com.sforce.soap.metadata.SaveResult> |
createMetadata(String type,
List<Map<String,Object>> objects)
Create metadata: Adds one or more new metadata components to your organization
|
com.sforce.soap.partner.SaveResult |
createSingle(String type,
Map<String,Object> object,
Map<SalesforceHeader,Object> headers)
Adds one new record to your organization's data.
|
List<com.sforce.soap.partner.DeleteResult> |
delete(List<String> ids,
Map<SalesforceHeader,Object> headers)
Deletes one or more records from your organization's data.
|
List<com.sforce.soap.metadata.DeleteResult> |
deleteMetadata(String type,
List<String> fullNames)
Deletes one or more metadata components from your organization, given the object(s) API Name(s)
|
void |
deployMetadata(InputStream stream,
boolean ignoreWarnings,
boolean purgeOnDelete,
boolean rollbackOnError)
Deploy.
|
com.sforce.soap.partner.DescribeGlobalResult |
describeGlobal(Map<SalesforceHeader,Object> headers)
Retrieves a list of available objects for your organization's data.
|
com.sforce.soap.metadata.DescribeMetadataResult |
describeMetadata()
Describe metadata: This call retrieves the metadata which describes your organization.
|
com.sforce.soap.partner.DescribeSObjectResult |
describeSobject(String type,
Map<SalesforceHeader,Object> headers)
Describes metadata (field list and object properties) for the specified object.
|
List<com.sforce.soap.partner.EmptyRecycleBinResult> |
emptyRecycleBin(List<String> ids,
Map<SalesforceHeader,Object> headers)
The recycle bin lets you view and restore recently deleted records for 30 days before they are permanently deleted.
|
List<com.sforce.soap.partner.FindDuplicatesResult> |
findDuplicates(String type,
List<Map<String,Object>> criterion,
Map<SalesforceHeader,Object> headers)
Performs rule-based searches for duplicate records.
|
List<com.sforce.soap.partner.FindDuplicatesResult> |
findDuplicatesByIds(String type,
List<String> ids,
Map<SalesforceHeader,Object> headers)
Performs id-based searches for duplicate records.
|
AbstractConfig |
getConfig() |
com.sforce.soap.partner.GetDeletedResult |
getDeleted(String type,
int duration,
Map<SalesforceHeader,Object> headers)
Retrieves the list of individual records that have been deleted since a time in the past specified in minutes before now.
|
com.sforce.soap.partner.GetDeletedResult |
getDeletedRange(String type,
Calendar startTime,
Calendar endTime,
Map<SalesforceHeader,Object> headers)
Retrieves the list of individual records that have been deleted within the given time frame for the specified object.
|
org.mule.api.MuleContext |
getMuleContext() |
Calendar |
getServerTimestamp()
Retrieves the current system timestamp (Coordinated Universal Time (UTC) time zone) from the API.
|
String |
getServerUrl()
Retrieves the Partner Server Url of the Salesforce instance.
|
String |
getSessionId(boolean validateSession)
Retrieves the Session Id of the current session.
|
com.sforce.soap.partner.GetUpdatedResult |
getUpdated(String type,
int duration,
Map<SalesforceHeader,Object> headers)
Retrieves the list of individual records that have been updated within a time range, specified in minutes, counting from the current time to some point in the past.
|
List<Map<String,Object>> |
getUpdatedObjects(String type,
int initialTimeWindow,
List<String> fields,
Map<SalesforceHeader,Object> headers)
Retrieves the list of records that have been updated between the last time this method was called and now.
|
com.sforce.soap.partner.GetUpdatedResult |
getUpdatedRange(String type,
Calendar startTime,
Calendar endTime,
Map<SalesforceHeader,Object> headers)
Retrieves the list of individual records that have been created/updated within the given time frame for the specified object.
|
com.sforce.soap.partner.GetUserInfoResult |
getUserInfo()
Retrieves personal information for the user associated with the current session.
|
com.sforce.async.BatchInfo |
hardDeleteBulk(String type,
List<Map<String,Object>> objects)
Deletes one or more records from your organization's data.
|
void |
initialize()
Takes all the steps needed in order to initialize this class.
|
Map<String,Object> |
invokeApexRestMethod(String restMethodName,
Object input,
ApexRequestHeaders requestHeaders,
Map<String,String> queryParameters)
Invokes any operation from an Apex class that is exposed as REST web service
|
XMLStreamReader |
invokeApexSoapMethod(String soapMethodName,
XMLStreamReader input,
org.mule.api.MuleEvent event)
Invokes any operation from an Apex class that is exposed as SOAP web service
|
com.sforce.async.JobInfo |
jobInfo(String jobId,
com.sforce.async.ContentType contentType)
Access latest JobInfo of a submitted JobInfo.
|
List<com.sforce.soap.metadata.FileProperties> |
listMetadata(String type)
Retrieves property information about metadata components in your organization
|
com.sforce.soap.partner.MergeResult |
merge(String type,
Map<String,Object> object,
List<String> ids,
Map<SalesforceHeader,Object> headers)
Merge up to three records into one.
|
List<Map<String,Object>> |
nonPaginatedQuery(String query,
Map<SalesforceHeader,Object> headers)
Executes a query against the specified object and returns data that matches the specified criteria.
|
List<com.sforce.soap.partner.SaveResult> |
publishPlatformEventMessage(String platformEventName,
Map<String,Object> platformEventMessage,
Map<SalesforceHeader,Object> headers)
Adds one new platform event to your organization's data.
|
List<com.sforce.soap.partner.SaveResult> |
publishStreamingChannel(String channelName,
String ownerId,
String description)
Creates a streaming channel on which generic, custom messages can be pushed.
|
List<com.sforce.soap.partner.SaveResult> |
publishTopic(String topicName,
String query,
String description)
Creates a topic representing a query, which is used to notify listeners when changes are made to records in an organization.
|
List<PushEventResult> |
pushGenericEvent(List<GenericStreamingEvent> events,
String channelId)
Pushes generic streaming custom events to the specified streaming channel.
|
org.mule.streaming.ProviderAwarePagingDelegate<Map<String,Object>,SalesforceConnector> |
query(String query,
org.mule.streaming.PagingConfiguration pagingConfiguration,
Map<SalesforceHeader,Object> headers)
Executes a query against the specified object and returns data that matches the specified criteria.
|
org.mule.streaming.ProviderAwarePagingDelegate<Map<String,Object>,SalesforceConnector> |
queryAll(String query,
org.mule.streaming.PagingConfiguration pagingConfiguration,
Map<SalesforceHeader,Object> headers)
Retrieves data from specified objects, whether or not they have been deleted.
|
InputStream |
queryResultStream(com.sforce.async.BatchInfo batchInfo,
Map<String,String> headers)
Returns an InputStream with the query results of a submitted BatchInfo
|
Map<String,Object> |
querySingle(String query,
Map<SalesforceHeader,Object> headers)
Executes a query against the specified object and returns the first record that matches the specified criteria.
|
List<Map<String,Object>> |
readMetadata(String type,
List<String> fullNames)
Returns one or more metadata components from your organization, given the object(s) API Name(s)
|
com.sforce.soap.metadata.SaveResult |
renameMetadata(String type,
String oldFullName,
String newFullName)
Renames a Metadata component in your organization, given its old API Name and the new name
|
org.mule.api.callback.StopSourceCallback |
replayStreamingChannel(String streamingChannel,
ReplayOption replayOption,
String replayId,
boolean autoReplay,
Long bufferSizeInBytes,
org.mule.api.callback.SourceCallback callback)
Salesforce stores events for 24 hours and allows you to retrieve stored and new events.
|
org.mule.api.callback.StopSourceCallback |
replayTopic(String topic,
ReplayOption replayOption,
String replayId,
boolean autoReplay,
org.mule.api.callback.SourceCallback callback)
Salesforce stores events for 24 hours and allows you to retrieve stored and new events.
|
com.sforce.soap.partner.ResetPasswordResult |
resetPassword()
Resets the password of the user linked to the connector's configuration.
|
void |
resetUpdatedObjectsTimestamp(String type)
Resets the timestamp of the last updated object.
|
List<Map<String,Object>> |
retrieve(String type,
List<String> ids,
List<String> fields,
Map<SalesforceHeader,Object> headers)
Retrieves one or more records based on the specified IDs.
|
InputStream |
retrieveMetadata(List<String> packageNames,
List<String> specificFiles,
InputStream unpackaged)
Retrieve.
|
List<Map<String,Object>> |
search(String query,
Map<SalesforceHeader,Object> headers)
Search for objects using Salesforce Object Search Language.
|
void |
setConfig(AbstractConfig config) |
void |
setMuleContext(org.mule.api.MuleContext muleContext) |
void |
setPassword(String userId,
String newPassword,
Map<SalesforceHeader,Object> headers)
Change the password of a User or SelfServiceUser to a value that you specify.
|
org.mule.api.callback.StopSourceCallback |
subscribeStreamingChannel(String streamingChannel,
org.mule.api.callback.SourceCallback callback)
Subscribe to a streaming channel.
|
org.mule.api.callback.StopSourceCallback |
subscribeTopic(String topic,
org.mule.api.callback.SourceCallback callback)
Subscribe to a topic.
|
String |
toNativeQuery(org.mule.common.query.DsqlQuery query) |
com.sforce.soap.partner.sobject.SObject |
toSObject(String type,
Map<String,Object> map) |
byte[] |
transform(XMLStreamReader input) |
static org.mule.api.transformer.Transformer |
transformerResolver(org.mule.api.transformer.DataType source,
org.mule.api.transformer.DataType resultDataType,
org.mule.api.MuleContext muleContext)
Provides transformers for different types of sources that user should not see within transformers section.
|
List<com.sforce.soap.partner.SaveResult> |
update(String type,
List<Map<String,Object>> objects,
Map<SalesforceHeader,Object> headers)
Updates one or more existing records in your organization's data.
|
com.sforce.async.BatchInfo |
updateBulk(String type,
List<Map<String,Object>> objects)
Updates one or more existing records in your organization's data.
|
List<com.sforce.soap.metadata.SaveResult> |
updateMetadata(String type,
List<Map<String,Object>> objects)
Updates one or more metadata components in your organization.
|
com.sforce.soap.partner.SaveResult |
updateSingle(String type,
Map<String,Object> object,
Map<SalesforceHeader,Object> headers)
Updates one record in your organization's data.
|
List<com.sforce.soap.partner.UpsertResult> |
upsert(String externalIdFieldName,
String type,
List<Map<String,Object>> objects,
Map<SalesforceHeader,Object> headers)
Upserts a homogeneous list of objects: creates new records and updates
existing records, using a custom field to determine the presence of existing records.
|
com.sforce.async.BatchInfo |
upsertBulk(String type,
String externalIdFieldName,
List<Map<String,Object>> objects)
Upserts a homogeneous list of objects: creates new records and updates
existing records, using a custom field to determine the presence of existing records.
|
List<com.sforce.soap.metadata.UpsertResult> |
upsertMetadata(String type,
List<Map<String,Object>> objects)
Creates or updates one or more metadata components in your organization
|
public static final String SALESFORCE_SOAP_PROCESSOR_OBJECT_STORE
@NotNull public AbstractConfig getConfig()
public void setConfig(@NotNull AbstractConfig config)
@Start public void initialize()
@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Core Calls", description="A set of calls that compromise the core of the API.") public List<com.sforce.soap.partner.SaveResult> create(@MetaDataKeyParam @Placement(group="Information") @FriendlyName(value="sObject Type") String type, @Placement(group="sObject Field Mappings") @FriendlyName(value="sObjects") @Default(value="#[payload]") List<Map<String,Object>> objects, @Placement(group="Salesforce SOAP Headers") @FriendlyName(value="Headers") @Optional Map<SalesforceHeader,Object> headers) throws com.sforce.ws.ConnectionException, SalesforceException
IMPORTANT: When you map your objects to the input of this message processor keep in mind that they need to match the expected type of the object at Salesforce.
Take the CloseDate of an Opportunity as an example, if you set that field to a string of value "2011-12-13" it will be sent to Salesforce as a string and operation will be rejected on the basis that CloseDate is not of the expected type.
The proper way to actually map it is to generate a Java Date object, you can do so using Groovy expression evaluator as #[groovy:Date.parse("yyyy-MM-dd", "2011-12-13")].
objects
- An array of one or more sObject objects.type
- Type of object to createheaders
- Salesforce Headers More InfoSaveResult
if async is falsecom.sforce.ws.ConnectionException
- when there is an errorSalesforceException
- when there is an error before or after call to Salesforce create()@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Bulk API", description="The Bulk API provides programmatic access to allow you to quickly load your organization\'s data into Salesforce.") public com.sforce.async.JobInfo createJob(com.sforce.async.OperationEnum operation, @MetaDataKeyParam String type, @Optional String externalIdFieldName, @Optional com.sforce.async.ContentType contentType, @Optional com.sforce.async.ConcurrencyMode concurrencyMode, @Optional Map<String,String> headers) throws com.sforce.async.AsyncApiException, SalesforceException
operation
- The com.sforce.async.OperationEnum that will be executed by the job.type
- The type of Salesforce object that the job will process.externalIdFieldName
- Contains the name of the field on this object with the external ID field attribute for custom objects or the idLookup field property for standard objects (only
required for Upsert Operations).contentType
- The Content Type for this Job results. When specifying a content type different from XML for a query type use queryResultStream(BatchInfo) method to
retrieve results.concurrencyMode
- The concurrency mode of the job, either Parallel or Serial.headers
- These headers are sent as HTTP headers with the request to Bulk APIcom.sforce.async.AsyncApiException
- When there is an errorSalesforceException
- when there is an error before or after call to Salesforce createJob()@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Bulk API", description="The Bulk API provides programmatic access to allow you to quickly load your organization\'s data into Salesforce.") public com.sforce.async.JobInfo closeJob(String jobId) throws com.sforce.async.AsyncApiException, SalesforceException
jobId
- The Job ID identifying the Job to be closed.com.sforce.async.AsyncApiException
- When there is an errorSalesforceException
- when there is an error before or after call to Salesforce closeJob()@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Bulk API", description="The Bulk API provides programmatic access to allow you to quickly load your organization\'s data into Salesforce.") public com.sforce.async.JobInfo abortJob(String jobId) throws com.sforce.async.AsyncApiException, SalesforceException
jobId
- The Job ID identifying the Job to be aborted.com.sforce.async.AsyncApiException
- When there is an errorSalesforceException
- when there is an error before or after call to Salesforce abortJob()@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Bulk API", description="The Bulk API provides programmatic access to allow you to quickly load your organization\'s data into Salesforce.") public com.sforce.async.JobInfo jobInfo(String jobId, @Optional com.sforce.async.ContentType contentType) throws com.sforce.async.AsyncApiException, SalesforceException
jobId
- the Job ID of the Job being monitoredcontentType
- specifies the content type of the messagecom.sforce.async.AsyncApiException
- When there is an errorSalesforceException
- when there is an error before or after call to Salesforce getJobInfo()@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Bulk API", description="The Bulk API provides programmatic access to allow you to quickly load your organization\'s data into Salesforce.") public com.sforce.async.BatchInfo createBatch(com.sforce.async.JobInfo jobInfo, @Default(value="#[payload]") List<Map<String,Object>> objects) throws Exception
This call uses the Bulk API. The operation will be done in asynchronous fashion.
jobInfo
- The com.sforce.async.JobInfo in which the batch will be created. The Job can be of XML, JSON or CSV type.objects
- A list of one or more sObject objects. This parameter defaults to payload content.Exception
- when there is an error createBatch()@Processor @OAuthProtected @Category(name="Bulk API", description="The Bulk API provides programmatic access to allow you to quickly load your organization\'s data into Salesforce.") public com.sforce.async.BatchInfo createBatchStream(@Default(value="#[payload]") com.sforce.async.JobInfo jobInfo, InputStream stream) throws com.sforce.async.AsyncApiException, SalesforceException
This call uses the Bulk API. The operation will be done in asynchronous fashion.
jobInfo
- The com.sforce.async.JobInfo in which the batch will be created. This parameter defaults to payload content.stream
- A stream containing the data. The stream can have a CSV,XML, ZIP_CSV or ZIP_XML format.com.sforce.async.AsyncApiException
- when there is an errorSalesforceException
- when there is an error before or after call to Salesforce createBatch()@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Bulk API", description="The Bulk API provides programmatic access to allow you to quickly load your organization\'s data into Salesforce.") public com.sforce.async.BatchInfo createBatchForQuery(@Default(value="#[payload]") com.sforce.async.JobInfo jobInfo, String query) throws com.sforce.async.AsyncApiException, SalesforceException
This call uses the Bulk API. The operation will be done in asynchronous fashion.
jobInfo
- The com.sforce.async.JobInfo in which the batch will be created.query
- The query to be executed.com.sforce.async.AsyncApiException
- When there is an errorSalesforceException
- when there is an error before or after call to Salesforce createBatch()@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Bulk API", description="The Bulk API provides programmatic access to allow you to quickly load your organization\'s data into Salesforce.") public com.sforce.async.BatchInfo createBulk(@MetaDataKeyParam @Placement(group="Information") @FriendlyName(value="sObject Type") String type, @Placement(group="sObject Field Mappings") @FriendlyName(value="sObjects") @Default(value="#[payload]") List<Map<String,Object>> objects) throws Exception
This call uses the Bulk API. The creation will be done in asynchronous fashion.
objects
- An array of one or more sObject objects.type
- Type of object to createException
- When there is an error createBatch()@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Core Calls", description="A set of calls that compromise the core of the API.") @Nullable public com.sforce.soap.partner.SaveResult createSingle(@MetaDataKeyParam @Placement(group="Information") @FriendlyName(value="sObject Type") String type, @Placement(group="sObject Field Mappings") @FriendlyName(value="sObject") @Default(value="#[payload]") Map<String,Object> object, @Placement(group="Salesforce SOAP Headers") @FriendlyName(value="Headers") @Optional Map<SalesforceHeader,Object> headers) throws com.sforce.ws.ConnectionException, SalesforceException
object
- SObject to createtype
- Type of object to createheaders
- Salesforce Headers More Infocom.sforce.ws.ConnectionException
- { com.sforce.ws.ConnectionException} when there is an errorSalesforceException
- when there is an error before or after call to Salesforce create()@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Core Calls", description="A set of calls that compromise the core of the API.") public List<com.sforce.soap.partner.SaveResult> update(@MetaDataKeyParam @Placement(group="Information") @FriendlyName(value="sObject Type") String type, @Placement(group="Salesforce sObjects list") @FriendlyName(value="sObjects") @Default(value="#[payload]") List<Map<String,Object>> objects, @Placement(group="Salesforce SOAP Headers") @FriendlyName(value="Headers") @Optional Map<SalesforceHeader,Object> headers) throws com.sforce.ws.ConnectionException, SalesforceException
objects
- An array of one or more sObject objects.type
- Type of object to updateheaders
- Salesforce Headers More Infocom.sforce.ws.ConnectionException
- When there is an errorSalesforceException
- when there is an error before or after call to Salesforce update()@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Core Calls", description="A set of calls that compromise the core of the API.") public com.sforce.soap.partner.SaveResult updateSingle(@MetaDataKeyParam @Placement(group="Information") @FriendlyName(value="sObject Type") String type, @Placement(group="Salesforce Object") @FriendlyName(value="sObject") @Default(value="#[payload]") Map<String,Object> object, @Placement(group="Salesforce SOAP Headers") @FriendlyName(value="Headers") @Optional Map<SalesforceHeader,Object> headers) throws com.sforce.ws.ConnectionException, SalesforceException
object
- The object to be updated.type
- Type of object to updateheaders
- Salesforce Headers More Infocom.sforce.ws.ConnectionException
- When there is an errorSalesforceException
- when there is an error before or after call to Salesforce update()@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Bulk API", description="The Bulk API provides programmatic access to allow you to quickly load your organization\'s data into Salesforce.") public com.sforce.async.BatchInfo updateBulk(@MetaDataKeyParam @Placement(group="Information") @FriendlyName(value="sObject Type") String type, @Placement(group="Salesforce sObjects list") @FriendlyName(value="sObjects") @Default(value="#[payload]") List<Map<String,Object>> objects) throws Exception
This call uses the Bulk API. The creation will be done in asynchronous fashion.
objects
- An array of one or more sObject objects.type
- Type of object to updateException
- when there is an error createBatch()@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Core Calls", description="A set of calls that compromise the core of the API.") public com.sforce.soap.partner.MergeResult merge(@MetaDataKeyParam @Placement(group="Information") @FriendlyName(value="sObject Type") String type, @Placement(group="sObject Field Mappings") @FriendlyName(value="Master Record") @Default(value="#[payload]") Map<String,Object> object, @FriendlyName(value="Records To Merge Ids") @Optional List<String> ids, @Placement(group="Salesforce SOAP Headers") @FriendlyName(value="Headers") @Optional Map<SalesforceHeader,Object> headers) throws com.sforce.ws.ConnectionException, SalesforceException
type
- Type of object to mergeobject
- The Master object used for the mergeids
- A list of ids of the objects to be mergedheaders
- Salesforce Headers More Infocom.sforce.ws.ConnectionException
- When there is an errorSalesforceException
- - in case the merge is not done successfully@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Core Calls", description="A set of calls that compromise the core of the API.") public List<com.sforce.soap.partner.UpsertResult> upsert(@Placement(group="Information") String externalIdFieldName, @MetaDataKeyParam @Placement(group="Information") @FriendlyName(value="sObject Type") String type, @Placement(group="Salesforce sObjects list") @FriendlyName(value="sObjects") @Default(value="#[payload]") List<Map<String,Object>> objects, @Placement(group="Salesforce SOAP Headers") @FriendlyName(value="Headers") @Optional Map<SalesforceHeader,Object> headers) throws com.sforce.ws.ConnectionException, SalesforceException
externalIdFieldName
- Contains the name of the field on this object with the external ID field attribute for custom objects or the idLookup field property for standard objects.type
- The type of the given objects. The list of objects to upsert must be homogeneous.objects
- The objects to upsert.headers
- Salesforce Headers More Infocom.sforce.ws.ConnectionException
- When there is an error if a connection error occursSalesforceException
- when there is an error before or after call to Salesforce upsert()@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Bulk API", description="The Bulk API provides programmatic access to allow you to quickly load your organization\'s data into Salesforce.") public com.sforce.async.BatchInfo upsertBulk(@MetaDataKeyParam @Placement(group="Information",order=1) @FriendlyName(value="sObject Type") String type, @Placement(group="Information",order=2) String externalIdFieldName, @Placement(group="Salesforce sObjects list") @FriendlyName(value="sObjects") @Default(value="#[payload]") List<Map<String,Object>> objects) throws Exception
This call uses the Bulk API. The creation will be done in asynchronous fashion.
externalIdFieldName
- Contains the name of the field on this object with the external ID field attribute for custom objects or the idLookup field property for standard objects.type
- The type of the given objects. The list of objects to upsert must be homogeneous.objects
- The objects to upsertException
- when there is an error createBatch()@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Bulk API", description="The Bulk API provides programmatic access to allow you to quickly load your organization\'s data into Salesforce.") public com.sforce.async.BatchInfo batchInfo(@Default(value="#[payload]") com.sforce.async.BatchInfo batchInfo, @Optional com.sforce.async.ContentType contentType) throws com.sforce.async.AsyncApiException, SalesforceException
batchInfo
- The com.sforce.async.BatchInfo being monitoredcontentType
- - content type used at job creation. If not provided default value used is ContentType.XML.com.sforce.async.AsyncApiException
- When there is an errorSalesforceException
- when there is an error before or after call to Salesforce getBatchInfo()@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Bulk API", description="The Bulk API provides programmatic access to allow you to quickly load your organization\'s data into Salesforce.") public com.sforce.async.BatchResult batchResult(@Default(value="#[payload]") com.sforce.async.BatchInfo batchInfo) throws com.sforce.async.AsyncApiException, SalesforceException
batchInfo
- The com.sforce.async.BatchInfo being monitoredcom.sforce.async.AsyncApiException
- When there is an errorSalesforceException
- when there is an error before or after call to Salesforce getBatchResult() BatchInfo status@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Bulk API", description="The Bulk API provides programmatic access to allow you to quickly load your organization\'s data into Salesforce.") public InputStream batchResultStream(@Default(value="#[payload]") com.sforce.async.BatchInfo batchInfo, @Optional Map<String,String> headers) throws com.sforce.async.AsyncApiException, SalesforceException
batchInfo
- The com.sforce.async.BatchInfo being monitoredheaders
- Optional parameter specifying the headers for the operationcom.sforce.async.AsyncApiException
- When there is an errorSalesforceException
- when there is an error before or after call to Salesforce getBatchResult() BatchInfo status@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Bulk API", description="The Bulk API provides programmatic access to allow you to quickly load your organization\'s data into Salesforce.") public InputStream queryResultStream(@Default(value="#[payload]") com.sforce.async.BatchInfo batchInfo, @Optional Map<String,String> headers) throws com.sforce.async.AsyncApiException, SalesforceException
Internally the InputStreams contained in the sequence will be requested on-demand (lazy-loading). They should be used only with query jobs.
batchInfo
- The com.sforce.async.BatchInfo being monitoredheaders
- Optional parameter specifying the headers for the operationcom.sforce.async.AsyncApiException
- When there is an errorSalesforceException
- when there is an error before or after call to Salesforce getBatchResult() BatchInfo status@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Describe Calls", description="A set of calls to describe record structure in Salesforce.") public com.sforce.soap.partner.DescribeGlobalResult describeGlobal(@Placement(group="Salesforce SOAP Headers") @FriendlyName(value="Headers") @Optional Map<SalesforceHeader,Object> headers) throws com.sforce.ws.ConnectionException
headers
- Salesforce Headers More Infocom.sforce.ws.ConnectionException
- When there is an error describeGlobal()@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Core Calls", description="A set of calls that compromise the core of the API.") public List<Map<String,Object>> retrieve(@MetaDataKeyParam @Placement(group="Information",order=1) @FriendlyName(value="sObject Type") String type, @Placement(group="Ids to Retrieve") @Default(value="#[payload]") List<String> ids, @Placement(group="Fields to Retrieve") List<String> fields, @Placement(group="Salesforce SOAP Headers") @FriendlyName(value="Headers") @Optional Map<SalesforceHeader,Object> headers) throws com.sforce.ws.ConnectionException, SalesforceException
type
- Object type. The specified value must be a valid object for your organization.ids
- The ids of the objects to retrievefields
- The fields to return for the matching objectsheaders
- Salesforce Headers More Infocom.sforce.ws.ConnectionException
- com.sforce.ws.ConnectionException when there is an error related to connectionSalesforceException
- When there is an error@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Core Calls", description="A set of calls that compromise the core of the API.") @Paged(defaultFetchSize=2000) public org.mule.streaming.ProviderAwarePagingDelegate<Map<String,Object>,SalesforceConnector> query(@Query @Placement(group="Query") String query, @Summary(value="Default value is 2000.") org.mule.streaming.PagingConfiguration pagingConfiguration, @Placement(group="Salesforce SOAP Headers") @FriendlyName(value="Headers") @Optional Map<SalesforceHeader,Object> headers) throws SalesforceException
query
- Query string that specifies the object to query, the fields to return, and any conditions for including a specific object in the query. For more information, see
Salesforce Object Query Language (SOQL).pagingConfiguration
- the paging configurationheaders
- Salesforce Headers More InfoSalesforceException
@QueryTranslator public String toNativeQuery(org.mule.common.query.DsqlQuery query)
@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Core Calls", description="A set of calls that compromise the core of the API.") public List<Map<String,Object>> nonPaginatedQuery(@Query @Placement(group="Query") String query, @Placement(group="Salesforce SOAP Headers") @FriendlyName(value="Headers") @Optional Map<SalesforceHeader,Object> headers) throws com.sforce.ws.ConnectionException, SalesforceException
query
- Query string that specifies the object to query, the fields to return, and any conditions for including a specific object in the query. For more information, see
Salesforce Object Query Language (SOQL).headers
- Salesforce Headers More Infocom.sforce.ws.ConnectionException
- com.sforce.ws.ConnectionException when there is an error related to connectionSalesforceException
- org.mule.modules.salesforce.exception.SalesforceException when there is an error query()@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Core Calls", description="A set of calls that compromise the core of the API.") @Paged(defaultFetchSize=2000) public org.mule.streaming.ProviderAwarePagingDelegate<Map<String,Object>,SalesforceConnector> queryAll(@Query @Placement(group="Query") @Summary(value="Default value is 2000.") String query, org.mule.streaming.PagingConfiguration pagingConfiguration, @Placement(group="Salesforce SOAP Headers") @FriendlyName(value="Headers") @Optional Map<SalesforceHeader,Object> headers) throws SalesforceException
query
- Query string that specifies the object to query, the fields to return, and any conditions for including a specific object in the query. For more information, see
Salesforce Object Query Language (SOQL).pagingConfiguration
- the paging configurationheaders
- Salesforce Headers More InfoSalesforceException
@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Core Calls", description="A set of calls that compromise the core of the API.") public List<Map<String,Object>> search(@Placement(group="Query") String query, @Placement(group="Salesforce SOAP Headers") @FriendlyName(value="Headers") @Optional Map<SalesforceHeader,Object> headers) throws com.sforce.ws.ConnectionException, SalesforceException
query
- Query string that specifies the object to query, the fields to return, and any conditions for including a specific object in the query. For more information, see
Salesforce Object Search Language (SOSL).headers
- Salesforce Headers More Infocom.sforce.ws.ConnectionException
- com.sforce.ws.ConnectionException when there is an error related to connectionSalesforceException
- org.mule.modules.salesforce.exception.SalesforceException when there is an error search()@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Core Calls", description="A set of calls that compromise the core of the API.") public Map<String,Object> querySingle(@Query @Placement(group="Query") String query, @Placement(group="Salesforce SOAP Headers") @FriendlyName(value="Headers") @Optional Map<SalesforceHeader,Object> headers) throws com.sforce.ws.ConnectionException, SalesforceException
query
- Query string that specifies the object to query, the fields to return, and any conditions for including a specific object in the query. For more information, see
Salesforce Object Query Language (SOQL).headers
- Salesforce Headers More Infocom.sforce.ws.ConnectionException
- com.sforce.ws.ConnectionException when there is an error related to connectionSalesforceException
- org.mule.modules.salesforce.exception.SalesforceException when there is an error query()@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Core Calls", description="A set of calls that compromise the core of the API.") public com.sforce.soap.partner.LeadConvertResult convertLead(String leadId, @Optional String contactId, @Optional String accountId, @Optional String opportunityId, @Default(value="false") Boolean overWriteLeadSource, @Default(value="false") Boolean doNotCreateOpportunity, @Optional String opportunityName, String convertedStatus, @Default(value="false") Boolean sendEmailToOwner, @Placement(group="Salesforce SOAP Headers") @FriendlyName(value="Headers") @Optional Map<SalesforceHeader,Object> headers) throws com.sforce.ws.ConnectionException
leadId
- ID of the Lead to convert. Required. For information on IDs, see ID Field Type.contactId
- ID of the Contact into which the lead will be merged (this contact must be associated with the specified accountId, and an accountId must be specified). Required
only when updating an existing contact.IMPORTANT if you are converting a lead into a person account, do not specify the contactId or an error will result. Specify
only the accountId of the person account. If no contactID is specified, then the API creates a new contact that is implicitly associated with the Account. To
create a new contact, the client application must be logged in with sufficient access rights. To merge a lead into an existing contact, the client application
must be logged in with read/write access to the specified contact. The contact name and other existing data are not overwritten (unless overwriteLeadSource is set
to true, in which case only the LeadSource field is overwritten). For information on IDs, see ID Field Type.accountId
- ID of the Account into which the lead will be merged. Required only when updating an existing account, including person accounts. If no accountID is specified,
then the API creates a new account. To create a new account, the client application must be logged in with sufficient access rights. To merge a lead into an
existing account, the client application must be logged in with read/write access to the specified account. The account name and other existing data are not
overwritten. For information on IDs, see ID Field Type.opportunityId
- The ID of an existing opportunity to relate to a lead during lead conversion.overWriteLeadSource
- Specifies whether to overwrite the LeadSource field on the target Contact object with the contents of the LeadSource field in the source Lead object (true), or
not (false, the default). To set this field to true, the client application must specify a contactId for the target contact.doNotCreateOpportunity
- Specifies whether to create an Opportunity during lead conversion (false, the default) or not (true). Set this flag to true only if you do not want to create an
opportunity from the lead. An opportunity is created by default.opportunityName
- Name of the opportunity to create. If no name is specified, then this value defaults to the company name of the lead. The maximum length of this field is 80
characters. If doNotCreateOpportunity argument is true, then no Opportunity is created and this field must be left blank; otherwise, an error is returned.convertedStatus
- Valid LeadStatus value for a converted lead. Required. To obtain the list of possible values, the client application queries the LeadStatus object, as in: Select
Id, MasterLabel from LeadStatus where IsConverted=truesendEmailToOwner
- Specifies whether to send a notification email to the owner specified in the ownerId (true) or not (false, the default).headers
- Salesforce Headers More Infocom.sforce.ws.ConnectionException
- com.sforce.ws.ConnectionException when there is an error convertLead()@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Core Calls", description="A set of calls that compromise the core of the API.") public List<com.sforce.soap.partner.EmptyRecycleBinResult> emptyRecycleBin(@Placement(group="Ids to Delete") @Default(value="#[payload]") List<String> ids, @Placement(group="Salesforce SOAP Headers") @FriendlyName(value="Headers") @Optional Map<SalesforceHeader,Object> headers) throws com.sforce.ws.ConnectionException
ids
- Array of one or more IDs associated with the records to delete from the recycle bin. Maximum number of records is 200.headers
- Salesforce Headers More Infocom.sforce.ws.ConnectionException
- com.sforce.ws.ConnectionException when there is an error emptyRecycleBin()@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Core Calls", description="A set of calls that compromise the core of the API.") public Calendar getServerTimestamp() throws com.sforce.ws.ConnectionException
com.sforce.ws.ConnectionException
- com.sforce.ws.ConnectionException when there is an error getServerTimestamp()@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Core Calls", description="A set of calls that compromise the core of the API.") public List<com.sforce.soap.partner.DeleteResult> delete(@Placement(group="Ids to Delete") @Default(value="#[payload]") List<String> ids, @Placement(group="Salesforce SOAP Headers") @FriendlyName(value="Headers") @Optional Map<SalesforceHeader,Object> headers) throws SalesforceException
ids
- Array of one or more IDs associated with the objects to delete.headers
- Salesforce Headers More InfoSalesforceException
- com.sforce.ws.ConnectionException when there is an error delete()@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Bulk API", description="The Bulk API provides programmatic access to allow you to quickly load your organization\'s data into Salesforce.") public com.sforce.async.BatchInfo hardDeleteBulk(@MetaDataKeyParam @Placement(group="Information") @FriendlyName(value="sObject Type") String type, @Placement(group="Salesforce sObjects list") @FriendlyName(value="sObjects") @Default(value="#[payload]") List<Map<String,Object>> objects) throws Exception
This call uses the Bulk API. The creation will be done in asynchronous fashion.
objects
- An array of one or more sObject objects.type
- Type of object to updateException
- com.sforce.ws.ConnectionException when there is an error createBatch()@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Core Calls", description="A set of calls that compromise the core of the API.") public com.sforce.soap.partner.GetUpdatedResult getUpdatedRange(@MetaDataKeyParam @Placement(group="Information") @FriendlyName(value="sObject Type") String type, @Placement(group="Information") @FriendlyName(value="Start Time Reference") Calendar startTime, @Placement(group="Information") @FriendlyName(value="End Time Reference") @Optional Calendar endTime, @Placement(group="Salesforce SOAP Headers") @FriendlyName(value="Headers") @Optional Map<SalesforceHeader,Object> headers) throws com.sforce.ws.ConnectionException
type
- Object type. The specified value must be a valid object for your organization.startTime
- Starting date/time (Coordinated Universal Time (UTC) not local timezone) of the time frame for which to retrieve the data. The API ignores the value for seconds
in the specified dateTime value (for example, 12:30:15 is interpreted as 12:30:00 UTC).endTime
- Ending date/time (Coordinated Universal Time (UTC) not local timezone) of the time frame for which to retrieve the data. The API ignores the value for seconds in
the specified dateTime value (for example, 12:35:15 is interpreted as 12:35:00 UTC). If it is not provided, the current server time will be used.headers
- Salesforce Headers More Infocom.sforce.ws.ConnectionException
- com.sforce.ws.ConnectionException when there is an error getUpdatedRange()@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Core Calls", description="A set of calls that compromise the core of the API.") public com.sforce.soap.partner.GetDeletedResult getDeletedRange(@MetaDataKeyParam @Placement(group="Information") @FriendlyName(value="sObject Type") String type, @Placement(group="Information") @FriendlyName(value="Start Time Reference") Calendar startTime, @Placement(group="Information") @FriendlyName(value="End Time Reference") @Optional Calendar endTime, @Placement(group="Salesforce SOAP Headers") @FriendlyName(value="Headers") @Optional Map<SalesforceHeader,Object> headers) throws com.sforce.ws.ConnectionException
type
- Object type. The specified value must be a valid object for your organization.startTime
- Starting date/time (Coordinated Universal Time (UTC) not local timezone) of the time frame to retrieve the data from. The API ignores the value for seconds in the
specified dateTime value (for example, 12:30:15 is interpreted as 12:30:00 UTC).endTime
- Ending date/time (Coordinated Universal Time (UTC) not local timezone) of the time frame to retrieve the data from. The API ignores the value for seconds in the
specified dateTime value (for example, 12:35:15 is interpreted as 12:35:00 UTC). If the time is not specified, the current server time will be used.headers
- Salesforce Headers More Infocom.sforce.ws.ConnectionException
- com.sforce.ws.ConnectionException when there is an error getDeletedRange()@Processor(name="describe-sobject", friendlyName="Describe sObject") @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Describe Calls", description="A set of calls to describe record structure in Salesforce.") public com.sforce.soap.partner.DescribeSObjectResult describeSobject(@MetaDataKeyParam @Placement(group="Information") @FriendlyName(value="sObject Type") String type, @Placement(group="Salesforce SOAP Headers") @FriendlyName(value="Headers") @Optional Map<SalesforceHeader,Object> headers) throws com.sforce.ws.ConnectionException
type
- Standard Object. The specified value must be a valid
object for your organization. For a complete list of objectsheaders
- Salesforce Headers More Infocom.sforce.ws.ConnectionException
- com.sforce.ws.ConnectionException when there is an error describeSObject()@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Core Calls", description="A set of calls that compromise the core of the API.") public com.sforce.soap.partner.GetDeletedResult getDeleted(@MetaDataKeyParam @Placement(group="Information") @FriendlyName(value="sObject Type") String type, @Placement(group="Information") int duration, @Placement(group="Salesforce SOAP Headers") @FriendlyName(value="Headers") @Optional Map<SalesforceHeader,Object> headers) throws com.sforce.ws.ConnectionException
type
- Object type. The specified value must be a valid object for your organization.duration
- The amount of time, counted from now to some point in the past, for which to return records.headers
- Salesforce Headers More Infocom.sforce.ws.ConnectionException
- com.sforce.ws.ConnectionException when there is an error getDeleted()@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Core Calls", description="A set of calls that compromise the core of the API.") public com.sforce.soap.partner.GetUpdatedResult getUpdated(@MetaDataKeyParam @Placement(group="Information") @FriendlyName(value="sObject Type") String type, @Placement(group="Information") int duration, @Placement(group="Salesforce SOAP Headers") @FriendlyName(value="Headers") @Optional Map<SalesforceHeader,Object> headers) throws com.sforce.ws.ConnectionException
type
- Object type. The specified value must be a valid object for your organization.duration
- The amount of time in minutes, counted from now to some point in the past, to specify the range you want updated records from.headers
- Salesforce Headers More Infocom.sforce.ws.ConnectionException
- com.sforce.ws.ConnectionException when there is an error getUpdated()@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Utility Calls", description="API calls that your client applications can invoke to obtain the system timestamp, user information, and change user passwords.") public List<Map<String,Object>> getUpdatedObjects(@MetaDataKeyParam @Placement(group="Information") @FriendlyName(value="sObject Type") String type, @Placement(group="Information") int initialTimeWindow, @Placement(group="Fields") @Default(value="#[payload]") List<String> fields, @Placement(group="Salesforce SOAP Headers") @FriendlyName(value="Headers") @Optional Map<SalesforceHeader,Object> headers) throws com.sforce.ws.ConnectionException, org.mule.api.store.ObjectStoreException, SalesforceException
type
- Object type. The specified value must be a valid object for your organization.initialTimeWindow
- Time window (in minutes) used to calculate the start time (in time range) the first time this operation is called. E.g: if initialTimeWindow equals 2, the start
time will be the current time (now) minus 2 minutes, then the range to retrieve the updated object will be (now - 2 minutes; now). After first call the start time
will be calculated from the object store getting the last time this operation was execfields
- The fields to retrieve for the updated objectsheaders
- Salesforce Headers More Infocom.sforce.ws.ConnectionException
- com.sforce.ws.ConnectionException when there is an error related to connectionSalesforceException
- org.mule.modules.salesforce.exception.SalesforceException when there is an errororg.mule.api.store.ObjectStoreException
- org.mule.api.store.ObjectStoreException when there is an error This operation extends getUpdated()@Processor @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Utility Calls", description="API calls that your client applications can invoke to obtain the system timestamp, user information, and change user passwords.") public void resetUpdatedObjectsTimestamp(@MetaDataKeyParam @Placement(group="Information") @FriendlyName(value="sObject Type") String type) throws org.mule.api.store.ObjectStoreException
type
- The object type for which the timestamp should be reset.org.mule.api.store.ObjectStoreException
- When there is an error@Processor @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Utility Calls", description="API calls that your client applications can invoke to obtain the system timestamp, user information, and change user passwords.") public void setPassword(@Placement(group="Information") @FriendlyName(value="User ID") String userId, @Placement(group="Information") @FriendlyName(value="Password") @Password String newPassword, @Placement(group="Salesforce SOAP Headers") @FriendlyName(value="Headers") @Optional Map<SalesforceHeader,Object> headers) throws com.sforce.ws.ConnectionException
userId
- The user to set the password for.newPassword
- The new password for the user.headers
- Salesforce Headers More Infocom.sforce.ws.ConnectionException
- When there is an error@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Streaming API", description="Create topics, to which applications can subscribe, receiving asynchronous notifications of changes to data in Salesforce, via the Bayeux protocol.") public List<com.sforce.soap.partner.SaveResult> publishTopic(@Placement(group="Information") String topicName, @Placement(group="Information") String query, @Placement(group="Information") @Optional String description) throws com.sforce.ws.ConnectionException
topicName
- Descriptive name of the push topic, such as MyNewCases or TeamUpdatedContacts. The maximum length is 25 characters. This value identifies the channel.description
- Description of what kinds of records are returned by the query. Limit: 400 charactersquery
- The SOQL query statement that determines which records' changes trigger events to be sent to the channel. Maximum length: 1200 characterscom.sforce.ws.ConnectionException
- When there is a connection error Push Topic@Processor @OAuthProtected @ReconnectOn(exceptions=SalesforceSessionExpiredException.class) @Category(name="Streaming API", description="Create topics, to which applications can subscribe, receiving asynchronous notifications of changes to data in Salesforce, via the Bayeux protocol.") public List<com.sforce.soap.partner.SaveResult> publishStreamingChannel(@Placement(group="Information") String channelName, @Placement(group="Information") @Optional String ownerId, @Placement(group="Information") @Optional String description) throws com.sforce.ws.ConnectionException
channelName
- Descriptive name of the StreamingChannel. Limit: 80 characters, must start with "/u/". This value identifies the channel and must be unique.ownerId
- Identifier fir the channel owner.description
- Description of what kinds of records are returned by the query. Limit: 255 characterscom.sforce.ws.ConnectionException
- When there is a connection error Streaming
Channel@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Utility Calls", description="API calls that your client applications can invoke to obtain the system timestamp, user information, and change user passwords.") public com.sforce.soap.partner.GetUserInfoResult getUserInfo() throws com.sforce.ws.ConnectionException
com.sforce.ws.ConnectionException
- When there is an error getUserInfo()@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Metadata Calls", description="A set of calls that compromise the metadata of the API.") @MetaDataScope(value=MetadataCategory.class) public List<com.sforce.soap.metadata.SaveResult> createMetadata(@MetaDataKeyParam String type, @FriendlyName(value="Metadata Objects") @Default(value="#[payload]") List<Map<String,Object>> objects) throws Exception
type
- The Metadata Type to be createdobjects
- a List of Map<String, Object> representing the metadatas to be createdException
- when there is an error@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Metadata Calls", description="A set of calls that compromise the metadata of the API.") @MetaDataScope(value=MetadataCategory.class) public List<com.sforce.soap.metadata.SaveResult> updateMetadata(@MetaDataKeyParam String type, @FriendlyName(value="Metadata Objects") @Default(value="#[payload]") List<Map<String,Object>> objects) throws Exception
type
- The metadata type of the components updatedobjects
- a List of Map<String, Object> representing the metadata to be updatedException
- when there is an error@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Metadata Calls", description="A set of calls that compromise the metadata of the API.") @MetaDataScope(value=MetadataCategory.class) public List<com.sforce.soap.metadata.UpsertResult> upsertMetadata(@MetaDataKeyParam String type, @FriendlyName(value="Metadata Objects") @Default(value="#[payload]") List<Map<String,Object>> objects) throws Exception
type
- The metadata type of the components to create/updateobjects
- A List of Map<String, Object> representing the metadatas to be upsertedException
- when there is an error@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Metadata Calls", description="A set of calls that compromise the metadata of the API.") @MetaDataScope(value=MetadataCategory.class) public List<com.sforce.soap.metadata.DeleteResult> deleteMetadata(@MetaDataKeyParam String type, @FriendlyName(value="Full Names") @Default(value="#[payload]") List<String> fullNames) throws Exception
type
- The metadata type of the components to deletefullNames
- Full names of the components to deleteException
- when there is an error@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Metadata Calls", description="A set of calls that compromise the metadata of the API.") @MetaDataScope(value=MetadataCategory.class) public com.sforce.soap.metadata.SaveResult renameMetadata(@MetaDataKeyParam String type, @FriendlyName(value="Old Full Name") @Default(value="#[payload]") String oldFullName, @FriendlyName(value="New Full Name") String newFullName) throws Exception
type
- The metadata type of the components to renameoldFullName
- The current component full namenewFullName
- The new component full nameException
- when there is an error@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Metadata Calls", description="A set of calls that compromise the metadata of the API.") @MetaDataScope(value=MetadataCategory.class) public List<Map<String,Object>> readMetadata(@MetaDataKeyParam String type, @FriendlyName(value="Full Names") @Default(value="#[payload]") List<String> fullNames) throws Exception
type
- The metadata type of the components to readfullNames
- List of full names of the components to readException
- when there is an error@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Metadata Calls", description="A set of calls that compromise the metadata of the API.") @MetaDataScope(value=MetadataCategory.class) public List<com.sforce.soap.metadata.FileProperties> listMetadata(@MetaDataKeyParam String type) throws com.sforce.ws.ConnectionException
type
- The metadata type used as criteria when querying for informationcom.sforce.ws.ConnectionException
- When there is an error@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Metadata Calls", description="A set of calls that compromise the metadata of the API.") @MetaDataScope(value=MetadataCategory.class) public com.sforce.soap.metadata.DescribeMetadataResult describeMetadata() throws com.sforce.ws.ConnectionException
com.sforce.ws.ConnectionException
- When there is an error@Processor @OAuthProtected @Category(name="Metadata Calls", description="A set of calls that compromise the metadata of the API.") @MetaDataScope(value=MetadataCategory.class) public void deployMetadata(@FriendlyName(value="File stream") @Default(value="#[payload]") InputStream stream, @FriendlyName(value="Ignore Warnings") @Default(value="false") boolean ignoreWarnings, @FriendlyName(value="Purge On Delete") @Default(value="false") boolean purgeOnDelete, @FriendlyName(value="Rollback On Error") @Default(value="true") boolean rollbackOnError) throws Exception
stream
- A stream containing the data. This parameter defaults to payload content.ignoreWarnings
- Indicates whether a warning should allow a deployment to complete successfully (true) or not (false).purgeOnDelete
- If true, the deleted components in the destructiveChanges.xml manifest file aren't stored in the Recycle Bin. This option only works in Developer Edition or
sandbox organizations; it doesn't work in production organizations.rollbackOnError
- Indicates whether any failure causes a complete rollback (true) or not (false).Exception
- when there is an error@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Metadata Calls", description="A set of calls that compromise the metadata of the API.") @MetaDataScope(value=MetadataCategory.class) public InputStream retrieveMetadata(@Optional List<String> packageNames, @Optional List<String> specificFiles, @Optional InputStream unpackaged) throws Exception
packageNames
- A list of package names to be retrieved. If you are retrieving only unpackaged components, do not specify a name. You can retrieve packaged and unpackaged
components in the same retrieval operation.specificFiles
- A list of file names to be retrieved. If a value is specified for this property, packageNames must be set to null.unpackaged
- A stream containing a list of components to retrieve that are not in a package.Exception
- when there is an error@Source(primaryNodeOnly=true, threadingModel=NONE) @Category(name="Streaming API", description="Create topics, to which applications can subscribe, receiving asynchronous notifications of changes to data in Salesforce, via the Bayeux protocol.") public org.mule.api.callback.StopSourceCallback subscribeTopic(@NotNull String topic, org.mule.api.callback.SourceCallback callback) throws Exception
topic
- The name of the topic to subscribe tocallback
- The callback to call when a message is receivedException
- when there is an error Streaming API@Source(primaryNodeOnly=true, threadingModel=NONE) @Category(name="Streaming API", description="Create streaming channels, to which applications can subscribe, receiving asynchronous notifications related to custom events pushed to streaming channels, via the Bayeux protocol.") public org.mule.api.callback.StopSourceCallback subscribeStreamingChannel(@NotNull String streamingChannel, org.mule.api.callback.SourceCallback callback) throws Exception
streamingChannel
- The name of the streaming channel to subscribe tocallback
- The callback to call when a message is receivedException
- when there is an error Streaming API@Source(primaryNodeOnly=true, threadingModel=NONE) @Category(name="Streaming API", description="Create topics, to which applications can subscribe, receiving asynchronous notifications of changes to data in Salesforce, via the Bayeux protocol.") public org.mule.api.callback.StopSourceCallback replayTopic(@Placement(order=1) @NotNull String topic, @Placement(order=2) @NotNull ReplayOption replayOption, @Placement(order=3) @NotNull String replayId, @Placement(order=4) @NotNull @FriendlyName(value="Resume from the Last Replay Id") @Default(value="false") boolean autoReplay, org.mule.api.callback.SourceCallback callback) throws Exception
topic
- The name of the topic to subscribe to.replayOption
- Enum with the following values:
ONLY_NEW: -1 Subscriber receives new events that are broadcast after the client subscribes.
ALL: -2 Subscriber receives all events, including past events that are within the 24-hour
retention window and new events sent after subscription.
FROM_REPLAY_ID: Subscriber will receive only events with replay id value
greater than specified replayId.replayId
- Subscriber receives all events after the event specified by its replayId value.
The value is ignored if replay option is set on ALL or ONLY_NEW.autoReplay
- If true, when source is started it will start to consume data from when it was left last time.callback
- The callback to call when a message is received.Exception
- when there is an error Streaming API@Source(primaryNodeOnly=true, threadingModel=NONE) @Category(name="Streaming API", description="You can retrieve and replay past events with Durable Generic Streaming. Salesforce stores events for 24 hours and allows you to retrieve stored and new events.") public org.mule.api.callback.StopSourceCallback replayStreamingChannel(@Placement(order=1) @NotNull String streamingChannel, @Placement(order=2) @NotNull ReplayOption replayOption, @Placement(order=3) @Default(value="-2") String replayId, @Placement(order=4) @NotNull @FriendlyName(value="Resume from the Last Replay Id") @Default(value="false") boolean autoReplay, @Placement(order=5) @Optional Long bufferSizeInBytes, org.mule.api.callback.SourceCallback callback) throws Exception
streamingChannel
- The name of the streaming channel to subscribe toreplayOption
- Enum with the following values: ONLY_NEW: -1 Subscriber receives new events that are broadcast after the client subscribes. ALL: -2 Subscriber receives all
events, including past events that are within the 24-hour retention window and new events sent after subscription. FROM_REPLAY_ID: Subscriber will receive only
events with replay id value greater than specified replayIdreplayId
- Subscriber receives all events after the event specified by its replayId value. The value is ignored if replay option is set on ALL or ONLY_NEW.autoReplay
- - if true, when source is started it will start to consume data from when it was left last timecallback
- The callback to call when a message is receivedbufferSizeInBytes
- specifies the buffer sizeException
- when there is an error Streaming API@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Core Calls", description="A set of calls that compromise the core of the API.") public String getSessionId(@FriendlyName(value="Validate Session Id") @Default(value="false") boolean validateSession) throws SalesforceException
validateSession
- The session will be validated; if the session is invalid, reconnection will be triggered (if the strategy is enabled), and the new session id will be returnedSalesforceException
- in case of any exception@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Core Calls", description="A set of calls that compromise the core of the API.") public String getServerUrl() throws SalesforceException
SalesforceException
- - in case something goes wrong@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Metadata Calls", description="A set of calls that compromise the core of the API.") @MetaDataScope(value=ApexSoapMetadataCategory.class) @Nullable @Mime(value="application/xml") public XMLStreamReader invokeApexSoapMethod(@MetaDataKeyParam(labels={"Apex Class","Method Name"},affects=BOTH) @FriendlyName(value="Apex Class Method Name") String soapMethodName, @Default(value="#[payload]") XMLStreamReader input, org.mule.api.MuleEvent event) throws SalesforceException, org.mule.modules.wsdl.runtime.SoapCallException
soapMethodName
- the Apex class method name that will be invoked using SOAPinput
- XML containing information about the method to be invoked and its parameters. The XML must adhere to the WSDL standards.event
- Mule EventSalesforceException
- - thrown if any exception other than SOAP arisesorg.mule.modules.wsdl.runtime.SoapCallException
- - thrown if any SOAP exception arisespublic byte[] transform(XMLStreamReader input) throws SalesforceException
SalesforceException
@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Metadata Calls", description="A set of calls that compromise the core of the API.") @MetaDataScope(value=ApexRestMetadataCategory.class) public Map<String,Object> invokeApexRestMethod(@MetaDataKeyParam(labels={"Apex Class","Method Name"},affects=BOTH) @FriendlyName(value="Apex Class Method Name") String restMethodName, @FriendlyName(value="Request Body") @Default(value="#[payload]") Object input, @FriendlyName(value="Request Headers Reference") @Optional ApexRequestHeaders requestHeaders, @Optional Map<String,String> queryParameters) throws Exception
restMethodName
- The Apex class method name that will be invoked using RESTinput
- A Map containing the URLParameters if necessary and the request body information (if the http method allows input)requestHeaders
- The reference to an ApexRequestHeaders object containing request headers and cookiesqueryParameters
- The query parameters that will be added to the request URLException
- - Thrown if any exception arises@Processor @OAuthProtected @ReconnectOn(exceptions=SalesforceSessionExpiredException.class) @Category(name="Streaming API", description="Push custom Generic Streaming events through Salesforce REST API, to a specific streaming channel, for a specific group of users.") public List<PushEventResult> pushGenericEvent(@FriendlyName(value="Events") @Default(value="#[payload]") List<GenericStreamingEvent> events, @FriendlyName(value="Channel ID") String channelId) throws Exception
events
- The event listchannelId
- The streaming channel nameException
- when there is an error Streaming API@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Core Calls", description="A set of calls that compromise the core of the API.") public com.sforce.soap.partner.ResetPasswordResult resetPassword() throws SalesforceException
SalesforceException
- - in case that the password could not be reset@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Core Calls", description="A set of calls that compromise the core of the API.") public com.sforce.soap.partner.ChangeOwnPasswordResult changeOwnPassword(String oldPassword, String newPassword) throws SalesforceException
oldPassword
- Old password of the accountnewPassword
- New password of the accountSalesforceException
- - in case that the password could not be changedpublic com.sforce.soap.partner.sobject.SObject toSObject(String type, Map<String,Object> map)
public com.sforce.soap.partner.PartnerConnection buildPartnerConnection(Map<SalesforceHeader,Object> headers)
@TransformerResolver public static org.mule.api.transformer.Transformer transformerResolver(@NotNull org.mule.api.transformer.DataType source, @NotNull org.mule.api.transformer.DataType resultDataType, @NotNull org.mule.api.MuleContext muleContext) throws org.mule.api.MuleException
source
- - source to provide transformer forresultDataType
- - result to provide transformer formuleContext
- - mule contextorg.mule.api.MuleException
- in case that something goes wrongpublic org.mule.api.MuleContext getMuleContext()
public void setMuleContext(org.mule.api.MuleContext muleContext)
@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Core Calls", description="A set of calls that compromise the core of the API.") public List<com.sforce.soap.partner.FindDuplicatesResult> findDuplicatesByIds(@MetaDataKeyParam String type, @Default(value="#[payload]") List<String> ids, @Optional Map<SalesforceHeader,Object> headers) throws SalesforceException, com.sforce.ws.ConnectionException
type
- - type of sobjects to find duplicates forids
- - list of object ids used when searching for duplicatesheaders
- Salesforce Headers More InfoSalesforceException
- - in case that findDuplicate can not be runcom.sforce.ws.ConnectionException
- - in case that a problem with connection to server occurs@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Core Calls", description="A set of calls that compromise the core of the API.") public List<com.sforce.soap.partner.FindDuplicatesResult> findDuplicates(@MetaDataKeyParam String type, @Default(value="#[payload]") List<Map<String,Object>> criterion, @Optional Map<SalesforceHeader,Object> headers) throws SalesforceException, com.sforce.ws.ConnectionException
type
- - type of sobjects to find duplicates forcriterion
- - list of SObject used as a criterion when searching for duplicatesheaders
- Salesforce Headers More InfoSalesforceException
- - in case that findDuplicate can not be runcom.sforce.ws.ConnectionException
- - in case that a problem with connection to server occurs@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Bulk API", description="The Bulk API provides programmatic access to allow you to quickly load your organization\'s data into Salesforce.") public com.sforce.async.BatchInfoList batchInfoList(String jobId, @Optional com.sforce.async.ContentType contentType) throws SalesforceException, com.sforce.async.AsyncApiException
jobId
- - id of the job that you want to reatrieve batch information forcontentType
- - content type used at job creation. If not provided default value used is ContentType.XML.SalesforceException
- - in case that batchInfoList can not be runcom.sforce.async.AsyncApiException
- - in case that a problem with connection to server occurs@Processor @OAuthProtected @ReconnectOn(exceptions={SalesforceSessionExpiredException.class,SalesforceSocketConnectionException.class}) @Category(name="Core Calls", description="A set of calls that compromise the core of the API.") @MetaDataScope(value=PlatformEventMetadataCategory.class) public List<com.sforce.soap.partner.SaveResult> publishPlatformEventMessage(@MetaDataKeyParam @Placement(group="Information") @FriendlyName(value="Platform Event name") String platformEventName, @Placement(group="Platform event Field Mappings") @FriendlyName(value="Platform Event Message") @Default(value="#[payload]") Map<String,Object> platformEventMessage, @Placement(group="Salesforce SOAP Headers") @FriendlyName(value="Headers") @Optional Map<SalesforceHeader,Object> headers) throws com.sforce.ws.ConnectionException, SalesforceException
platformEventMessage
- PlatformEventMessage to createplatformEventName
- name of platform event to createheaders
- Salesforce Headers More Infocom.sforce.ws.ConnectionException
- { com.sforce.ws.ConnectionException} when there is an errorSalesforceException
- when there is an error before or after call to Salesforce create()Copyright © 2010–2020. All rights reserved.