Why WQL returns zero rows right after a business process fires
When an orchestration or integration runs a Workday Query Language (WQL) query immediately after a candidate applies for a job or a worker transaction starts, the /wql/v1/data response frequently comes back with "total": 0 and "data": []. Rerunning the same integration manually a few minutes later returns the expected candidate or worker record without any change to the query.
This symptom comes from two separate platform mechanisms that look identical from the outside:
- Transaction sequencing (uncommitted business process data): If the orchestration is launched by an in-flight Integration System step inside a business process—such as Assess Candidate or Job Application—before the business process step writing the record has committed, the target instances do not exist in the reporting layer yet.
- Indexed data source lag (eventual consistency): Even after the business process transaction commits, indexed reporting data sources (
findCandidates,indexedAllWorkers, and extended indexed data sources) are updated asynchronously. Workday’s search index refresh is eventually consistent and is not guaranteed to reflect newly created records within seconds of submission.
Adding an artificial loop or delay step inside an orchestration does not reliably solve either condition. Under tenant load, index updates can take minutes or longer, and an in-flight business process step waiting on a synchronous integration will hold the transaction open for the entire duration of the delay.
Fix 1: Pass business process context directly or trigger on status change
If your orchestration only needs the candidate, worker, or assessment event that triggered the workflow, do not run a discovery WQL query to search for the record that the business process just touched.
Use a Business Process Trigger Orchestrate Service step
When you attach a Business Process Trigger Orchestrate Service step directly to the business process definition, you configure the exact contextual fields that Workday passes into the orchestration at launch. Instead of querying findCandidates by candidate name or application date, pass the Job_Application_Event WID, Candidate WID, and assessment references as launch parameters on the trigger step.
Inside the orchestration, read the launched instance directly from the lp global variable:
// Retrieve the Candidate WID and Event WID passed by the BP trigger
lp.referenceData("Candidate", "WID")
lp.referenceData("Event", "WID")Because you already have the exact workdayID of the primary object, you can read its fields directly via a transactional Workday REST or SOAP operation, or query a non-indexed Primary Business Object (PBO) data source filtered by WHERE workdayID = '<WID>'.
Trigger on Business Process Status Change
If the orchestration is triggered via an integration step while the business process is still mid-step, move the trigger to launch on a Business Process Status Change—such as when the business process reaches Completed—rather than an in-flight step before the commit boundary. Launching on completion guarantees that the underlying business process transaction has committed its records to the tenant database before the first orchestration step runs.
Fix 2: Replace indexed data sources with non-indexed PBO data sources
When your orchestration or Presentation Metadata (PMD) page must run a WQL query immediately after a transaction commits, inspect the FROM clause of your query. You can check whether a data source is indexed by opening the Data Source report in your tenant or running Convert Report to WQL on a test custom report.
Switching from findCandidates to a non-indexed candidate data source
A query against the indexed findCandidates data source looks like this:
SELECT workdayID, candidateID, fullName, email, phoneNumber
FROM findCandidates
WHERE jobApplicationEvent = 'c1a822a2c1a41012126f2bb624820000'Because findCandidates is an indexed data source, a candidate who just submitted an external job application will not appear in findCandidates until the search index refreshes. To read the candidate record immediately upon creation, switch the FROM clause to a non-indexed candidate or job application data source (or query the Candidate business object directly by its workdayID).
Retrieving internal candidate contact details on non-indexed data sources
One reason developers choose findCandidates is that its top-level email and phoneNumber fields return contact details for both external and internal candidates, whereas non-indexed candidate data sources only populate direct candidate contact fields for external candidates. For internal candidates, contact information lives on the linked Worker business object rather than the Candidate record.
To get real-time results without losing internal candidate contact fields:
- Run Create Calculated Field in the tenant and create an Extract Single Instance or Lookup Related Value calculated field (
cf_InternalCandidateWorkEmailandcf_InternalCandidatePhone) on theCandidatebusiness object that pulls primary work contact data from the relatedWorkerobject. - Create an Evaluate Expression calculated field (
cf_CandidateResolvedEmail) onCandidatethat returns the external candidate email when present and falls back tocf_InternalCandidateWorkEmail. - Select the calculated field in your
WQLquery against the non-indexed data source:
SELECT workdayID,
candidateID,
fullName,
cf_CandidateResolvedEmail AS email,
cf_CandidateResolvedPhone AS phoneNumber
FROM candidatesForRecruiting
WHERE workdayID = 'd92a14f8b6110100245cb60433080001'Similarly, for worker queries that run immediately after a Hire or Change Job completion, avoid indexedAllWorkers when real-time consistency is required; query workersForHCMReporting or allActiveAndTerminatedWorkers filtered by WHERE workdayID = '<workerWID>'.
How to verify the fix in your tenant
- Open View WQL Query Result (or test via REST API Explorer against
GET /wql/v1/data) using your non-indexed data source and the calculated contact fields for both an internal candidate (Workerrecord linked) and an external candidate. - Submit a new application for a test requisition so the Job Application and Assess Candidate business processes run end to end.
- Open Orchestration Activity (or Integration Events) for the triggered run and inspect the
WQLstep output payload. Confirm that"total"is1and the candidate’sworkdayIDand contact fields are populated on the first execution without manual relaunch.