Set up webhooks for your Workday HR spoke
Retrieve details the required employees in the Workday HR application to your ServiceNow instance by setting up the webhooks.
Before you begin
Role required: admin
Configure ServiceNow Webhook API Client for OAuth 2.0 in Workday
Configure API client in Workday to authenticate webhook requests.
Before you begin
Role required: Workday admin role or the role with granted permission to setup OAuth 2.0 client in Workday.
About this task
You only need to configure this step if you want to use the ServiceNow platform as a listener endpoint, and receive event notifications from Workday. If you don't need to receive any event notifications from Workday, then you can skip the configurations mentioned in this section.
Note: These configurations must be performed in Workday.
Procedure
In Workday, access the Edit Tenant Setup - Security task.
Select the OAuth 2.0 Clients Enabled option from the OAuth 2.0 Settings section.
Access the Register API Client task.
Enter the Client Name.
Select the Client Grant Type as Authorization Code Grant.
Select Access Token Type as Bearer.
Enter a valid Redirection URI.
Note: Make sure that the OAuth 2.0 Redirection URI is a valid HTTPS URL.
Select the Refresh Token Timeout in days.
Select the Non-Expiring Refresh Tokens option to prevent the refresh token from timing out.
Select the Grant Administrative Consent option to grant OAuth permission to a REST API Client tenant-wide.
When you select this option, you don't have to grant client access explicitly to Workday functional areas.
From the Functional Areas prompt, select the functional areas to which your OAuth 2.0 client requires access.
If the OAuth 2.0 client requires access to core Workday domains that aren’t in any functional areas, select the Include Workday Owned Scope option.
Set up CreateUser Webhook for the Workday HR spoke
Use the CreateUser Webhook to get the details of the newly onboarded employee from Workday to your ServiceNow instance.
Generate user name and password in your ServiceNow instance for Create User webhook
Generate user name and password in your ServiceNow instance to authenticate requests for Create User webhook and retrieve the required data from the Workday application.
Before you begin
Role required: ServiceNow admin
Note: These configurations must be performed in your ServiceNow instance.
Procedure
Log in to your ServiceNow instance as an admin.
Navigate to All > System Definition > Table.
Filter and search for the Workday HR spoke webhook registry table.
For example, Workday Webhook Registry.
Click the Show List related list.
Click New.
On the form, fill these values.
Field Description Description Description of the webhook registry record. Enter Workday event and authentication for Create User.UserName Workday user who has integration rights using Workday Web Services. Password Password of the Workday user. Workday Event Event for which the webhook is set up. Enter CreateUser.Workday Instance Workday host URL and tenant name. Enter the URL in this format: https://<workday_host_url>/<workday_tenant_name>Right-click the form header and click Save.
Click Generate UserName And Password.
Copy and record the values of username and password. These values must be specified in the Workday instance to authenticate the webhook requests.
Note: If you have more than one HIRE BP in your environment, you must configure all the HIRE BPs to enable the Create User webhook for all HIRE employee transactions.
Retrieve the resource path from your ServiceNow instance for Create User webhook
Retrieve the resource path from your ServiceNow instance for later use to authenticate Create User webhook requests and retrieve the required data from the Workday application
Before you begin
Role required: ServiceNow admin.
Note: These configurations must be performed in your ServiceNow instance.
Procedure
Log in to your ServiceNow instance as an admin.
Navigate to All > System Web Services > Scripted Web Services > Scripted REST APIs.
Open the record for the Workday HR spoke.
In the Resources tab, click the Callback record.
Record and save the value of Resource path for later use.
Import CLAR file to your Workday instance for Create User webhook
Import CLAR file available at ServiceNow Store to set up Create User webhook and authenticate requests from ServiceNow instance.
Before you begin
- Workday Studio should be installed.
Access to custom report creation policy.
Create custom report in workday based on the New_Hire_record report structure and share the report with ISU user.
Access to edit business process definition.
- Access to create and edit integration system.
- Role required: admin
Note:
- Except integration name, report field XPath (if required), and Workday instance header, users are cautioned against modifying the values of fields or properties in the CLAR file.
- These configurations must be performed in Workday Studio.
Procedure
From the Workday HR spoke page on ServiceNow Store, download the
Workday-HR-Webhook-Studio-Samplefile from Supporting Links and Docs.Unzip the sample file to obtain the CLAR file.
Import the CLAR file to Workday Studio.
In the Properties tab of the StartHere component, navigate to Services and select the RAAS report created for this webhook.
Configure the StartHere component
Choose the environment where your report exists such as, implementation or sandbox and configure the report as per your requirement.
Provide a report name and select the required report.
Report name
- Provide the alias name of the report.
Alias name
- After the report alias is added, add the selected path of report in Extra Path that is used to run the report based on prompt.
Extra Path
- In the Set Headers component, provide your Workday instance for the WorkdayInstance header.
Configure the Set Headers component
- In the properties of HttpOut, fill in these values.
| Field | Value |
|---|---|
| Endpoint | REST endpointNote: See Retrieve the resource path from your ServiceNow instance for more information. |
| Http Method | POST |
Configure the HttpOut properties
Save the changes.
In the project explorer, select the integration and deploy it in your Workday system.
Log in to your Workday instance and navigate to Integration > Integration System > Configure Integration Attributes.
Configure Integration Attributes
- Provide user name and password in Configure Integration Attributes that you have generated in Generate user name and password in your ServiceNow instance.
Configure integration attributes
Modify a business process and add this integration in your business process.
- Edit definition of the business process.
Edit definition
2. Select the effective date and click **Ok**.
3. Click the + sign and add a new business process step in BP.
4. Select an order, which is after the completion step of business process.
5. Add the business process and select **Type** as **Integration**.
Select Integration type
6. Provide ISU username in **Run as User** and click **Ok**.
7. Click **Configure Integration** on the newly added business process step in Hire BP.
Configure integration
8. In integration criteria, select value type as **Determine value at runtime** and select value as **Employee ID**.
Determine value at runtime
Selected **Employee ID** field in value is displayed.
Employee ID field
9. Click **Ok**.
10. Create a report for the webhook with these details:
Report definition:
Report definition
Column labels:
Column labels
Calculated field details:
Calculated field details
Filter and prompt details:
Filter and prompt details
Set up Offboarding Webhook for the Workday HR spoke
Use the Offboarding Webhook to get the details of the offboarded employee from Workday to your ServiceNow instance.
Generate user name and password in your ServiceNow instance for Offboarding webhook
Generate user name and password in your ServiceNow instance to authenticate requests for Offboarding webhook and retrieve the required data from the Workday application.
Before you begin
Role required: admin
Note: These configurations must be performed in your ServiceNow instance.
Procedure
Log in to your ServiceNow instance as an admin.
Navigate to All > System Definition > Table.
Filter and search for the Workday HR spoke webhook registry table.
For example, Workday Webhook Registry.
Click the Show List related list.
Click New.
On the form, fill these values.
Field Description Description Description of the webhook registry record. Enter Workday event and authentication for Offboarding.UserName Workday user who has integration rights using Workday Web Services. Password Password of the Workday user. Workday Event Event for which the webhook is set up. Workday Instance Workday host URL and tenant name. Enter the URL in this format: https://<workday_host_url>/<workday_tenant_name>Right-click the form header and click Save.
Click Generate UserName And Password.
Copy and record the values of username and password. These values must be specified in the Workday instance to authenticate the webhook requests.
Note: If you have more than one HIRE BP in your environment, you must configure all the HIRE BPs to enable the Create User webhook for all HIRE employee transactions.
Retrieve the resource path from your ServiceNow instance for Offboarding webhook
Retrieve the resource path from your ServiceNow instance for later use to authenticate Offboard webhook requests and retrieve the required data from the Workday application
Before you begin
Role required: admin.
Note: These configurations must be performed in your ServiceNow instance.
Procedure
Log in to your ServiceNow instance as an admin.
Navigate to All > System Web Services > Scripted Web Services > Scripted REST APIs.
Open the record for the Workday HR spoke.
In the Resources tab, click the Callback record.
Record and save the value of Resource path for later use.
Import CLAR file to your Workday instance for Offboarding webhook
Import CLAR file available at ServiceNow Store to set up Offboarding webhook and authenticate requests from ServiceNow instance.
Before you begin
- Workday Studio should be installed.
Access to custom report creation policy.
Create custom report in workday based on the New_terminated_record report structure and share the report with ISU user.
Access to edit business process definition.
- Access to create and edit integration system.
- Role required: admin
Note:
- Except integration name, report field XPath (if required), and Workday instance header, users are cautioned against modifying the values of fields or properties in the CLAR file.
- These configurations must be performed in Workday Studio.
Procedure
From the Workday HR spoke page on ServiceNow Store, download the
Workday-HR-Offboarding-Webhook-Studio-Samplefile from Supporting Links and Docs.Unzip the sample file to obtain the CLAR file.
Import the CLAR file to Workday Studio.
In the Properties tab of the StartHere component, navigate to Services and select the RAAS report created for this webhook.
RAAS report for offboarding spoke
Choose the environment where your report exists such as, implementation or sandbox and configure the report as per your requirement.
Provide a report name and select the required report.
Custom RaaS report for Offboarding webhook
- Provide the alias name of the report.
Alias report for offboarding webhook
- After the report alias is added, add the selected path of report in Extra Path that is used to run the report based on prompt.
extra path for offboarding webhook
Select the report alias.
In the Set Headers component, provide your Workday instance for the WorkdayInstance header.
Set headers component offboarding webhook
- In the properties of HttpOut, fill in these values.
| Field | Value |
|---|---|
| Endpoint | REST endpointNote: See Retrieve the resource path from your ServiceNow instance for more information. |
| Http Method | POST |
httpout properities for offboarding
Save the changes.
In the project explorer, select the integration and deploy it in your Workday system.
Log in to your Workday instance and navigate to Integration > Integration System > Configure Integration Attributes.
configure integration attributes offboarding
- Provide user name and password in Configure Integration Attributes that you have generated in Generate user name and password in your ServiceNow instance for Offboarding webhook.
integration attributes configuration offboarding webhook
Modify a business process and add this integration in your business process.
- Edit the definition of the business process.
2. Select the ISU user in Workday Account box.
3. Select the effective date and click **Ok**.
4. Click the + sign and add a new business process step in BP.
5. Select an order, which is after the completion step of business process.
6. Add the business process and select **Type** as **Integration**.
7. Provide ISU username in **Run as User** and click **Ok**.
8. Click **Configure Integration** on the newly added business process step in Hire BP.
configure integration offboarding webhook
9. In integration criteria, select value type as **Determine value at runtime** and select value as **Employee ID**.
integration criteria value at runtime
The selected **Employee ID** field in value is displayed.
integration criteria employee ID for offboarding webhook
10. Click **Ok**.
11. Open **Create Custom Report** task.
12. Enter the report name, for example, enter `New_terminated_record`.
13. Select **Report Type** as Advanced.
14. Uncheck the Optimized for performance option.
15. Select Data Source as All Workers.
View Custom Report for offboarding
16. Create a report as shown below:
Sample report for offboarding webhook
Group Column Headings in reports
Group column headings in report
Sort section in reports
Filter section in reports\[Omitted image "filter-section-report-offboarding.jpg"\] Alt text: filter section in reports
17. Select **Populate Undefined Prompt defaults** option from the **Prompts** tab.
18. Select **Enable as web service** option from the **Advanced** tab.
Set up LeaveofAbsence Webhook for the Workday HR spoke
Use the LeaveofAbsence Webhook to get leave of absence details of an employee from Workday to your ServiceNow instance.
Generate user name and password in your ServiceNow instance for LeaveofAbsence webhook
Generate user name and password in your ServiceNow instance to authenticate requests for LeaveofAbsence webhook and retrieve the required data from the Workday application.
Before you begin
Role required: admin
Note: These configurations must be performed in your ServiceNow instance.
Procedure
Log in to your ServiceNow instance as an admin.
Navigate to All > System Definition > Table.
Filter and search for the Workday HR spoke webhook registry table, for example, Workday Webhook Registry.
Click the Show List related list.
Click New.
On the form, fill these values.
Field Description Description Description of the webhook registry record. Enter Workday event and authentication for leave of absence.UserName Workday user who has integration rights using Workday Web Services. Password Password of the Workday user. Workday Event Event for which the webhook is set up. Enter LeaveofAbsence.Workday Instance Workday host URL and tenant name. Enter the URL in this format: https://<workday_host_url>/<workday_tenant_name>Right-click the form header and click Save.
Click Generate UserName And Password.
Copy and record the values of username and password. These values must be specified in the Workday instance to authenticate the webhook requests.
Note: If you have more than one HIRE BP in your environment, you must configure all the HIRE BPs to enable the Create User webhook for all HIRE employee transactions.
Retrieve the resource path from your ServiceNow instance for LeaveofAbsence webhook
Retrieve the resource path from your ServiceNow instance for later use to authenticate Offboard webhook requests and retrieve the required data from the Workday application
Before you begin
Role required: admin.
Note: These configurations must be performed in your ServiceNow instance.
Procedure
Log in to your ServiceNow instance as an admin.
Navigate to All > System Web Services > Scripted Web Services > Scripted REST APIs.
Open the record for the Workday HR spoke.
In the Resources tab, click the Callback record.
Record and save the value of Resource path for later use.
Import CLAR file to your Workday instance for LeaveofAbsence webhook
Import CLAR file available at ServiceNow Store to set up LeaveofAbsence webhook and authenticate requests from ServiceNow instance.
Before you begin
- Workday Studio should be installed.
Access to custom report creation policy.
Create custom report in workday based on the Leave_of_absence_request report structure and share the report with ISU user.
Access to edit business process definition.
- Access to create and edit integration system.
- Role required: admin
Note:
- Except integration name, report field XPath (if required), and Workday instance header, users are cautioned against modifying the values of fields or properties in the CLAR file.
- These configurations must be performed in Workday Studio.
Procedure
From the Workday HR spoke page on ServiceNow Store, download the
Workday-HR-Leave-of-Absence-Webhook-Studio-Samplefile from Supporting Links and Docs.Unzip the sample file to obtain the CLAR file.
Import the CLAR file to Workday Studio.
In the Properties tab of the StartHere component, navigate to Services and select the RAAS report created for this webhook.
RaaS report for leave of absence webhook
Choose the environment where your report exists such as, implementation or sandbox and configure the report as per your requirement.
Provide a report name and select the required report.
Custom Raas Report for leave of absence webhook
- Provide the alias name of the report.
Alias for report name
- After the report alias is added, add the selected path of report in Extra Path that is used to run the report based on prompt.
Extra path for report alias
Select the report alias.
In the Set Headers component, provide your Workday instance for the WorkdayInstance header.
Set headers for Workday instance
- In the properties of HttpOut, fill in these values.
| Field | Value |
|---|---|
| Endpoint | REST endpointNote: See Retrieve the resource path from your ServiceNow instance for more information. |
| Http Method | POST |
http out properties for leave of absence webhook
Save the changes.
In the project explorer, select the integration and deploy it in your Workday system.
Log in to your Workday instance and navigate to Integration > Integration System > Configure Integration Attributes.
Configure integration attributes for leave of absence webhook
- Provide user name and password in Configure Integration Attributes that you have generated in Generate user name and password in your ServiceNow instance for LeaveofAbsence webhook.
user name and password for integration attributes configuration
Modify a business process and add this integration in your business process.
- Edit definition of the business process.
Business process definition
2. Select the ISU user in Workday Account box.
3. Select the effective date and click **Ok**.
4. Click the + sign and add a new business process step in BP.
5. Select an order, which is after the completion step of business process.
6. Add the business process and select **Type** as **Integration**.
Business process type integration
7. Provide ISU username in **Run as User** and click **Ok**.
8. Click **Configure Integration** on the newly added business process step in Hire BP.
Configure integration for business process
9. In integration criteria, select value type as **Determine value at runtime** and select value as **Employee ID**.
Integration criteria value at runtime
Selected **Employee ID** field in value is displayed.
Employee ID selected for integration criteria
10. Click **Ok**.
11. Open **Create Custom Report** task.
12. Enter the report name, for example, `Leave_of_absence_request`.
13. Select **Report Type** as Advanced.
14. Uncheck the Optimized for performance option.
15. Select **Data Source** as **All Active and Terminated Workers**.
16. Create a report as shown below:
Sample report
Group Column Heading section in report
Group Column Headings in report
Filter section in report
Filter section in report
17. Select **Populate Undefined Prompt defaults** option from the **Prompts** tab.
18. Select **Enable as web service** option from the **Advanced** tab.