Salesforce Poller
- Aparna Tayi (Unlicensed)
- Lakshmi Manda
- Mohammed Iqbal
In this article
Overview
This Snap provides the functionality to poll the status of the batch job submitted to Salesforce by the preceding Salesforce Snaps (Create/Delete/Update/Upsert) in Bulk API mode. This Snap uses the Salesforce Bulk API to check the batch job status and retrieve the result for each record. The Snap sends the successful record writes to the output view and the failed record writes to the error view.
To use newer Salesforce objects, use the latest API versions where those objects are available.
Prerequisites
None.
Support for Ultra Pipelines
Works in Ultra Task Pipelines.
Limitations and Known Issues
None.
Snap Views
View Type | View Format | Number of Views | Examples of Upstream and Downstream Snaps | Description |
---|---|---|---|---|
Input | Document |
|
| This Snap has exactly one input view and receives documents in the view. Each document contains a Map data for the job ID (key: "jobId"), batch ID (key: "batchId") and URL (key: "url"), and records of field-value pairs. |
Output | Document |
|
| This Snap has exactly one output view and produces documents in the view. Each document contains Map data that includes an object ID and records of the field-value pairs for the successful record write. |
Error | Document |
| N/A | This Snap has one optional error view and produces documents in the view. Each document contains Map data that includes an object ID, records of the field-value pairs for the failed record write, and an error message. |
Snap Settings
Field | Field Type | Description | |
---|---|---|---|
Label* Default Value:Salesforce Poller | String | Specify a unique name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your pipeline. | |
Polling interval* Default Value:5 | String | Specify the polling interval in seconds for the Bulk API batch job execution. At each polling interval, the Snap checks the status of the Bulk API batch processing. Maximum value: 60 | |
Polling timeout* Default Value: 3000 | String | Specify the polling timeout in seconds for the Bulk API batch job execution. If the timeout occurs while waiting to complete the batch job execution, the Snap displays an exception. The polling timer starts at the beginning of the pipeline execution, and NOT when the first document passes into the Salesforce Poller snap. The Polling Timeout includes waiting for the first document to pass into the Salesforce Poller Snap. | |
Pass through Default Value:Selected | Checkbox | Select this checkbox to display input data fields as the top level flatmap data merged with the response from SFDC in the output document. If you deselect this checkbox, the output document will have the response from SFDC only. | |
Snap Execution Default Value: Execute only | Dropdown list | Select one of the following three modes in which the Snap executes:
|
Examples
Pipeline: Salesforce.com Data to a File: This pipeline reads data using a Salesforce read and writes it to a file.
The following pipeline shows how a Salesforce Create Snap creates an object record and the Salesforce Poller Snap is used to poll the status of the object creation action:
In the pipeline execution:
- A JSON Generator provides object record details to create an object record. A Salesforce Create Snap creates the object record:
- The Salesforce Poller Snap receives the record creation details and provides the status of the create action:
Successful execution of the Snap gives the following preview:
Salesforce Poller pipeline with generic error output view
In this pipeline, the Salesforce Poller Snap polls the status from a delete action. The status of the invalid records are routed to the error view.
To the upstream Mapper Snap, pass the value of ID which is retrieved from the target schema of the Salesforce Delete Snap.
The Salesforce Delete Snap deletes the record 001i000001g41S9AAI from the object type Account.
The output preview from the Salesforce Delete Snap is as displayed below:
The Salesforce Poller Snap checks the job status and retrieves the result.
The output error view is displayed below:
Note that the ID 001i000001g41S9AAI is already deleted and hence the status routed to the output error view is displayed as ''entity is deleted''.
Fixed an issue with the Salesforce SOQL Snap where the URL encoding was improperly applied to sandbox instance URLs. Now, the Snap ensures URL sandbox instance URLs are properly encoded. Breaking change from Salesforce Salesforce is retiring some of the hostnames for non-enhanced domains from August 2024: Redirections for legacy (non-enhanced) hostnames stop in production orgs and demo orgs. Production orgs get this release starting in January 2025. Redirections for legacy (non-enhanced) hostnames stopped in sandboxes, Developer Edition orgs, patch orgs, scratch orgs, and Trailhead Playgrounds. When deploying a new My Domain, including enhanced domains, Salesforce automatically redirects previous URLs. For detailed information, such as hostname formats for legacy (non-enhanced) domains, refer to the Prepare for the End of Redirections for Non-Enhanced Domains. To align with Salesforce’s redirection changes for non-enhanced domains, the classic URL format (https://snaplogic--devqa.my.salesforce.com/) is no longer supported for Sandbox environments. As a result, any existing Salesforce pipelines using classic URLs will stop functioning as before. Workaround To run your pipelines successfully, you must append sandbox to your classic URLs: https://snaplogic--devqa.sandbox.my.salesforce.com/ Learn more about the enhanced domains deployment by Salesforce. Fixed authentication issues with the Salesforce Subscriber Snap in the Ultra Pipeline to ensure the Snap reauthenticates and reconnects as expected. May 2024 main26341 Stable Updated and certified against the current SnapLogic Platform release. Fixed an issue with the Salesforce Mutual Authentication Account where the 8443 port was not used while authorizing the account. Now, the access token request uses the 8443 port for authorizing the Mutual Authentication Account. Breaking change Prior to 436patches25192, the Salesforce Mutual Authentication Account supported default Login URLs such as https://login.salesforce.com and https://test.salesforce.com. From 436patches25192, this account no longer supports the default Login URLs—your existing pipelines using the Mutual Authentication Account with the default Login URLs might break. To prevent this breaking change, you must provide a valid Salesforce Login URL as part of your account configuration. Enhanced the performance of the Salesforce Bulk Query Snap with a new Maximum threads field. This field enables you to download query results simultaneously in multiple threads. Enhanced the Salesforce Read Snap by adding expression enablement to the following checkboxes: Use PK chunking if supported Include Deleted Records Improved the Salesforce Bulk Upsert Snap error messages by limiting the length of the reason displayed with the error. The Salesforce SOQL Snap now honors the selection of the Match Data Type checkbox when the value entered for Batch Size is greater than 50,000. The Salesforce Read Snap now honors the selection of the Match Data Type checkbox if the Use PK chunking if supported checkbox is also selected. May 2023 Stable Upgraded with the latest SnapLogic Platform release. Fixed an issue with the Salesforce SOQL and Salesforce Read Snaps where the Match Data Type checkbox selection was not honored if the Salesforce API field was set to Bulk API. The Display null or empty values as null checkbox in the following Salesforce Snaps enable you to control the display of empty string and null data as null in the output preview. The Salesforce Account no longer validates an invalid URL but fails with an error: The Salesforce Create, Update, and Upsert Snaps now include an Apply active assignment rules checkbox so you can control whether to use assignment rules for the selected object 432patches20008 Added support to use PK chunking on any batch size with the bulk API request and to automatically disable PK chunking if it is known that it cannot be done The Salesforce Bulk Query Snap now includes the following checkboxes: Match Data Type: Select this checkbox to match the data types of the bulk query job results. Include Deleted Records: Select this checkbox to include deleted records in the query result. The Salesforce Delete Snap in REST API no longer fails with NPE if a new OAuth2 account is used. The Salesforce Read Snap now stops gracefully on a forced stop (without throwing cryptic errors). The Salesforce Update and Salesforce Upsert Snaps no longer fail with the message "Error occurred while executing request to Salesforce.com" when a redirection is needed. The Salesforce Bulk Create, Salesforce Bulk Delete, and Salesforce Bulk Update Snaps are now working as expected without displaying the error The Salesforce Read Snap now correctly parses the 2-byte UTF-8 characters in Windows OS in the PK chunking mode. Updates in Salesforce Subscriber Snap: CometD version upgrade from 5.0.9 to 7.0.6 (latest). The simplified logging provides useful diagnostic information without logging any sensitive data. The Snap asynchronously makes callbacks or listens to the CometD API to identify and respond to specific events. The Snap processes the most recent message so that it can send that replay ID if there is a need to resubscribe. If the server responds with an invalid replay ID, the Snap automatically sets the Replay ID value to -2 to get all available messages. You can select the Null Setting with Bulk API checkbox in the Salesforce Update, Salesforce Create, and Salesforce Upsert Snaps to format null values in the input document. 4.29 Patch Made the Null Setting with Bulk API checkbox in the Salesforce Update, Salesforce Create, and Salesforce Upsert Snaps visible, to format a null value. Latest Fixed an issue with Salesforce Snaps where the Service Version could not be retrieved from SFDC due to a blocked URL, failing the Snap execution. 427patches14079 Fixed an issue with the Salesforce Subscriber Snap where the Snap was unable to re-subscribe to a topic if it did not receive any message for 72 hours —stopped and displayed an error message. With this fix, the Snap automatically sets the Replay ID value to -2 when: the specified Replay ID is invalid or outside the retention window. the most recently received Replay ID for an event is outside the 72-hour retention window. Fixed the following issues with Salesforce Snaps: High memory use due to leaked resources. Hung Pipelines due to blocked threads. Added Salesforce Mutual Authentication Account to Salesforce Snap Pack that provides an additional layer of security while authentication. Both the client and server authenticate themselves using Client Certificate Authentication. This account is not supported for Salesforce Subscriber and Salesforce Publisher Snaps. Extended the support of Salesforce OAuth2 Account to all the Salesforce Snaps in addition to the Salesforce Bulk Snaps. Revised the name of Salesforce Attachment Download to Salesforce Download Snap. Enhanced this Snap with a new field File Type to support download of attachments from Salesforce by passing Content Data ID in addition to the Attachment ID. Updated the default Salesforce API Service Version to 52.0 for the following Snaps: Enhanced the following Snaps to support Pipeline parameters only for expression fields, while the input data parameters are not supported for expression fields. Enhanced the Salesforce Subscriber Snap with improved resilience to network failures and fixed an issue with duplicate documents. Fixes an issue in Salesforce Bulk Upsert, Salesforce Bulk Update, and Salesforce Bulk Create Snaps that fail to process Related object and Related external ID values by modifying the input schema that formats the CSV data. Potential Breaking Change This Salesforce Snap patch contains an issue affecting the Salesforce Subscriber and Salesforce Publisher Snaps. If you do not use these Snaps in your Pipelines, then you can use this patch version. Else, we recommend you to not use this patch version as Pipelines will fail. We will fix this issue soon in an upcoming patch. Fixed the Salesforce Create, Update, Bulk Create, Bulk Update, and Bulk Upsert Snaps, enabling you to upload files containing duplicate values across multiple fields. Fixed the Salesforce Create, Update, Bulk Create, Bulk Update, and Bulk Upsert Snaps, enabling you to upload files containing duplicate values across multiple fields. Fixed the Salesforce Subscriber Snap wherein the Salesforce Subscriber and Mapper Snap combination generates Null output for Array object type. Added the Salesforce Bulk Query Snap, which enables you to perform bulk SOQL queries on Salesforce. Enhanced the Salesforce Subscriber Snap to capture Change Data Capture (CDC) events. Added Order by clause and Limit clause properties to the Salesforce Reader Snap to fix an issue wherein the Snap throws an error while fetching records. Pushed automatic rebuild of the latest version of each Snap Pack to SnapLogic UAT and Elastic servers. Added the Snap Execution field to all Standard-mode Snaps. In some Snaps, this field replaces the existing Execute during preview check box. Fixed an issue with resource leak in PK Chunking in Salesforce Read and SOQL Snaps. Fixed an issue with the Salesforce SOQL Snap timing out while waiting for a connection from the pool. 4.14 Patch salesforce5670 snapsmrc486 Fixed a defect that occurs when downstream Snaps are slow in processing documents downloaded from SFDC. Added a new option in Advanced properties - "Validate record count downloaded in Bulk API" that compares the number of records processed vs downloaded and routes output to Error View (if Error View is enabled) if there is a mismatch. snapsmrc480 Polling timeout property's default value increased to 3000 from 300 for Salesforce Lookup, Salesforce Poller, Salesforce Read, and Salesforce SOQL Snaps. Salesforce Poller Snap: Includes the success field in the output. snapsmrc414 Fixed the error in PK Chunking when a downstream Snap is blocking the pipeline Addressed an issue withSalesforce Poller Snap causing JSON Formatter to throw ConcurrentModificationException. Addressed a null pointer exception in the Salesforce Update Snap. This exception was present in both salesforce3082 and salesforce3122. Updated the Salesforce Create, Batch Create, Delete, Poller, Update and Upsert Snaps with Pass through property. snapsmrc398 Added log to troubleshoot a deploy issue. Addressed SFDC SOQL Snap routing to the error view & validate PK Chunking record numbers. Addressed possible leak with threads waiting to download PK Chunking responses. SFDC SOQL Snap route to the error view & validate PK Chuning record numbers. SOQL Snap now correctly routes to the error view & validates PK Chunking record numbers. snapsmrc382 salesforce1633 Resolved an issue with Salesforce Query returning inconsistent result sets. Salesforce Upsert: External ID field is now suggestible. Salesforce Read & Salesforce SOQL now accept 200 as a batch size.Snap Pack History
Release Snap Pack Version Date Type Updates August 2024 438patches28040 Latest August 2024 main27765 Stable Upgraded the org.json.json
library from v20090211 to v20240303, which is fully backward-compatible.May 2024 437patches27307 Latest February 2024 436patches25626 Latest Enhanced the Salesforce Bulk Create, Bulk Delete, Bulk Query, Bulk Update, and Salesforce Bulk Upsert Snaps to include the complete error details under the original
object that contains the copies of the failed input records.February 2024 436patches25192 Latest February 2024 main25112 Stable Enhanced the Salesforce Bulk Query Snap with expression support for the Include Deleted Records checkbox. November 2023 435patches24747 Latest Fixed an issue that caused the input stream to not close properly, which resulted in stale connections. November 2023 435patches24368 Latest November 2023 435patches24006 Latest November 2023 main23721 Stable Updated and certified against the current SnapLogic Platform release. August 2023 434patches23646 Latest Fixed an issue where a long-running pipeline containing the Salesforce Subscriber Snap would suddenly stop responding. August 2023 434patches22537 Latest August 2023 main22460 Stable Updated and certified against the current SnapLogic Platform release. May 2023 433patches21367 Latest main21015 February 2023 432patches20586 Latest February 2023 432patches20393 Latest Error processing table usr__c = ErrorDto{failure='Failed to perform AutoSync for table usr__c
February 2023 432patches20145 Latest Fixed an issue with the Salesforce Read Snap that was causing an error for the Time
data type.February 2023 432patches20087 Latest February 2023 Latest February 2023 main19844 Stable Upgraded with the latest SnapLogic Platform release. November 2022 main18944 Stable Upgraded with the latest SnapLogic Platform release. October 2022 430patches18769 Latest September 2022 430patches18125 Latest Error while processing Data
and without returning 301-error while processing the data.September 2022 430patches18036 Latest August 2022 main17386 Stable 429patches16708 Latest daily limit exceeded
error. Now, the Snap displays the error and stops immediately when it encounters the daily limit exceeded
error.4.29 main15993 Stable Upgraded with the latest SnapLogic Platform release. 4.28 Patch 428patches14355 4.28 main14627 Stable Upgraded with the latest SnapLogic Platform release. 4.27 Patch Latest 4.27 Patch 427patches13944 Latest Fixed an issue with Salesforce accounts, where an account password containing special characters and an empty security token was not properly encoded and the account was not validated. 4.27 Patch 427patches13789 Latest 4.27 main12833 Stable 4.26 Patch 426patches12054 Latest 4.26 main11181 Stable Upgraded with the latest SnapLogic Platform release. 4.25 Patch 425patches10182 Latest Fixed an issue with the Salesforce Read Snap where the retry fields do not work as expected when a Pipeline has more than ten Snaps. 4.25 Patch 425patches9609 Latest Enhanced the Salesforce Read Snap to allow you to add an optional second output view that exposes the schema of the target object as the output document. The output view of the Snap has a minimum of one output and a maximum of two outputs. 4.25 main9554 Stable
This enhancement also addresses the null values issue during Bulk API mode. 4.24 Patch 424patches9024 Latest 4.24 Patch 424paches8569 Latest 4.24 main8556 Stable Upgraded with the latest SnapLogic Platform release. 4.23 Patch 423patches7888 Latest 4.23 main7430 Stable Upgraded with the latest SnapLogic Platform release. 4.22 main6403 Stable Upgraded with the latest SnapLogic Platform release. 4.21 Patch salesforce8829 Latest 4.21 snapsmrc542 Stable Upgraded with the latest SnapLogic Platform release. 4.20 Patch salesforce8814 Latest 4.20 Patch salesforce8797 Latest 4.20 snapsmrc535 Stable 4.19 snaprsmrc528 Stable 4.18 Patch salesforce7832 Latest 4.18 snapsmrc523 Stable Upgraded with the latest SnapLogic Platform release. 4.17 Patch salesforce7474 Latest 4.17 ALL7402 Latest 4.17 snapsmrc515 Latest 4.16 Patch salesforce6889 Latest Added two new properties, Number of retries and Retry interval, to the Salesforce Read, SOQL, Publisher, and Subscriber Snaps. These properties let you handle retry attempts and intervals in case of a network failure. 4.16 snapsmrc508 Stable sObject
(Salesforce Object).sObject
.4.15 Patch salesforce6405 Latest 4.15 Patch salesforce6349 Latest 4.15 snapsmrc500 Stable Upgraded with the latest SnapLogic Platform release. Latest Fixed the Salesforce SOQL Snap that fails to execute if the parameter values of a SOQL query expression contain the WHERE clause. 4.14 snapsmrc490 Stable Upgraded with the latest SnapLogic Platform release. 4.13 Stable 4.12 Patch salesforce4839 Latest 4.12 Patch salesforce4773 Latest 4.12 Stable 4.11 Patch salesforce4299 Latest 4.11 snapsmrc465 Stable 4.10 Patch salesforce4005 Latest 4.10 Stable Upgraded with the latest SnapLogic Platform release. 4.9.0 Patch salesforce3218 Latest 4.9.0 Patch salesforce3247 Latest 4.9.0 Patch salesforce3225 Latest 4.9 snapsmrc405 Stable 4.8.0 Patch salesforce2884 Latest 4.8 Stable 4.7.0 Patch salesforce2284 Latest 4.7.0 Patch salesforce2255 Latest 4.7.0 Patch salesforce2244 Latest 4.7.0 Patch salesforce2218 Latest 4.7.0 Patch salesforce2209 Latest 4.7 Stable 4.6.0 Patch salesforce1931 Latest 4.6 snapsmrc362 Stable 4.5.1 Stable 4.5 snapsmrc344 NA Latest 4.4.1 Stable 4.4 Stable 4.3.2 Stable 4.3 NA 4.22 NA
Have feedback? Email documentation@snaplogic.com | Ask a question in the SnapLogic Community
© 2017-2024 SnapLogic, Inc.