Bulk Enqueue Postings to Generate Leads Action
This action is available in API version 68.0 and later.
Pass one or more RecruitmentPosting IDs to enqueue asynchronous candidate lead generation. Duplicate IDs are removed before enqueueing. Postings that generated leads in the last 24 hours are skipped. The action returns as soon as the postings are enqueued and doesn't wait for leads to be created. Use it from a scheduled flow, a process, or REST API.
You can pass up to 2,000 posting IDs in one request. If you pass more, the request fails with the INVALID_INPUT error.
Special Access Rules
To access the Bulk Enqueue Postings to Generate Leads action, your org must have the Talent Recruitment Management Specialist Add-on, and the user must have the Talent Recruitment Management Specialist Access permission set. When you invoke this action from a scheduled flow, it runs as the Automated Process user. For setup, see Set Up Lead Sourcing.
Supported REST HTTP Methods
- URI
- /services/data/v68.0/actions/standard/bulkEnqueuePostingsToGenLeads
- Formats
- JSON
- HTTP Methods
- GET, POST
- Authentication
- Authorization: Bearer token
Inputs
| Input | Details |
|---|---|
| recruitmentPostingIds |
|
Outputs
| Output | Details |
|---|---|
| enqueuedPostings |
|
| responseMessage |
|
The invocable action result also includes isSuccess. This value is true when every posting is ENQUEUED or SKIPPED. If any posting is FAILED, isSuccess is false and the result includes errors. Always inspect status on each item in enqueuedPostings.
Example
- GET
-
This example shows how to get the details of the Bulk Enqueue Postings to Generate Leads action type.
1curl --include --request GET \ 2--header 'Authorization: Bearer 00DR...xyz' \ 3--header 'Content-Type: application/json' \ 4"https://instance.salesforce.com/services/data/v68.0/actions/standard/bulkEnqueuePostingsToGenLeads" - POST
-
Here’s a request for the Bulk Enqueue Postings to Generate Leads action.
1{ 2 "inputs": [ 3 { 4 "recruitmentPostingIds": [ 5 "a03xx0000001QzAAI", 6 "a03xx0000001QzBAI" 7 ] 8 } 9 ] 10}Here’s a response for the Bulk Enqueue Postings to Generate Leads action.1[ 2 { 3 "actionName": "bulkEnqueuePostingsToGenLeads", 4 "errors": null, 5 "invocationId": null, 6 "isSuccess": true, 7 "outcome": null, 8 "outputValues": { 9 "enqueuedPostings": [ 10 { 11 "recruitmentPostingId": "a03xx0000001QzAAI", 12 "status": "ENQUEUED", 13 "mqMessageId": "707xx0000004L1vAAE" 14 }, 15 { 16 "recruitmentPostingId": "a03xx0000001QzBAI", 17 "status": "SKIPPED", 18 "errorMessage": "Posting generated leads within the last 24 hours" 19 } 20 ], 21 "responseMessage": "Enqueued 1 posting(s). Skipped 1 (generated within last 24h). 0 failed." 22 }, 23 "sortOrder": -1, 24 "version": 1 25 } 26]