Workday - Tips and FAQ

Workday - Adding Attachments to Objects

In Workday, you have an option to add attachments to Suppliers & Supplier-Invoices using Manage Attachments & Add Attachment. The same can be achieved in Cloud Elements using the objectName resource. This article describes on how to add attachments to different objects which support this functionality. 

Currently, attachments upload is supported for Suppliers and Supplier-Invoices in Workday and the same can be done through CE API calls. 

Please find the steps below on how to add attachments using Cloud Elements endpoints for Invoice; similar steps can be followed for other objects to add attachments.

To add an attachment while creating a new supplier-invoice, use the below endpoint in objectName resource:

POST /{objectName}/attachments 

 if you want to add an attachment to the existing supplier-invoice, use the below endpoint in objectName resource:

PATCH /{objectName}/{objectId}/attachments

Below are the screenshots for Creating/Updating attachments in Supplier Invoices and the parameter values to be used while creating/updating supplier-invoices with attachments. In the JSON body, attachment data object should not be passed; instead, select the File to be uploaded. 





To verify if the attachments were added successfully to the supplier-invoice, you can use the below endpoint in supplier-invoices resource:

GET /supplier-invoices/{id} 

In the response, you can see the "Attachment_Data" object which has the details of file uploaded like Filename, Content Type, and FileContent in binary-encoded. 

This can also be validated by logging into workday UI.








Workday - Tips and Tricks

Workday is a complex element and comes with some peculiarities we will highlight in this article.

  • As of version 31.0, Workday has 43 APIs and 1850 total operations, with an average of 43 methods per API. As a consequence, only a restrained number of resources are present in the swagger. If the needed resource can not be found in the swagger, the generic GET/POST/PUT/PATCH/DELETE /{objectname} endpoint can be used to send the request and the object name field value will take the format method_Service$Operation.For example:
curl -X GET "$Financial_Management"
  • By default, Workday instances point towards the version 31.0. There are cases when the endpoint works only with a version equal to or higher than v31.1. For example, the GET /Get_Company_Organizations$Financial_Management request will throw an error if called with a v31.0 instance.
  • There are GET endpoints that have similar behavior with GET/ by {id} ones, the only difference being the fact that the ID needs to be specified in the where clause in order for the request to succeed. For i.e in the case of Get_Ledgers$Financial_Management  the request should have the following structure:
GET /Get_Ledgers$Financial_Management where Request_Reference.Actuals_Ledger_Reference.ID = 'something'

Performing REST Calls for Workday Operations

Workday offers over 1,800+ operations, and Cloud Elements's Workday element provides a generic way for you to perform REST calls and metadata for each, presuming you have sandbox privileges.

  • You can pull the native Workday operations via GET /objects?fetchAll=true. The operations take the format Service$Operation. See Workday Web Services Directory.
  • You can pull metadata on the native Workday operations via GET /objects/{objectName}/metadata API.
  • You can perform CRUDS operations using the on native Workday object name.