Workday SAM Integration failing with "Cannot read property 'CountryRegionReference' from undefined"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Hi Community,
I am facing an issue with the Workday Direct Integration for Software Asset Management (SAM). My integration is using a SOAP connection. The scheduled job is failing, and I am seeing a specific script error in the execution logs.
The Setup:
Integration: Workday SaaS License Management
Connection Type: SOAP
The Error: The flow "Workday Download Subscriptions" crashes at Step 8 (Set Flow Variables). The error log says: Error: Cannot read property "CountryRegionReference" from undefined
Technical Details: The error occurs in the scripted variable for Country. The OOB script is attempting to access: workerJobData[key1].PositionData.BusinessSiteAddressData[0].CountryRegionReference.CountryRegionID.
It seems that when a worker record has a primary job but no address data provided via the SOAP response, BusinessSiteAddressData[0] is undefined, causing the entire flow to fail. Consequently, the condition in Step 9 evaluates to False, and no subscriptions are updated.
Questions:
Since this is an Out-of-the-Box (OOB) flow, is there a recommended way to handle missing address data without creating a custom copy of the flow?
Has anyone else encountered this specific "undefined" crash with the Workday SAM spoke when certain worker fields are empty in Workday?
Any insights would be greatly appreciated!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Hi Amit,
I encountered lots of error during SAM Workday integration (Dec 2024) before it worked fine but not the specific error you are getting.
I will suggest, don't go with custom flow. It should work with OOB flow only. Log a case to vendor - they will help you to debug the oob flow (/error) .

