Returns a rowset that contains information about a send. The rowset contains the SourceID, SourceType, and IsInclusionSource values from the specified job ID. The function doesn’t output any information about the status of the job itself. It returns data even if the job was canceled, so we recommend that you don’t use this function to test whether a job completed.
Availability
<table> <tr> <td>Marketing Cloud Engagement</td> <td>✅ Yes</td> </tr> <tr> <td>Marketing Cloud Next</td> <td>❌ No</td> </tr> </table>Syntax
RetrieveSalesforceJobSources(jobId)
The RetrieveSalesforceJobSources() function has one parameter:
jobId(number): Required. The job ID of the Salesforce send to retrieve information about.
Usage
To use this function, pass it the numeric job ID of a Salesforce send.
%%[
var @jobId, @jobData, @row, @rowCount
set @jobId = 90492034
set @jobData = RetrieveSalesforceJobSources(@jobId)
for @counter = 1 to rowCount(@jobData) do
var @sourceID
var @sourceType
var @isInclusionSource
set @rowData = row(@jobData, @counter)
set @sourceID = field(@rowData, "SourceID")
set @sourceType = field(@rowData, "SourceType")
set @isInclusionSource = field(@rowData, "IsInclusionSource")
]%%
<p>SourceID: %%=v(@sourceID)=%%</p>
<p>SourceType: %%=v(@sourceType)=%%</p>
<p>IsInclusionSource: %%=v(@isInclusionSource)=%%</p>
%%[ next @counter ]%%
The function outputs the SourceID, SourceType, and IsInclusionSource values for each row in the rowset.