workday-cancel-pto implementation guide

---
availability: INSTALLABLE
description: Enables employees to withdraw pending or approved upcoming PTO requests from the HRIS, keeping time off records and balances accurate when plans change.
installation_asset_uuid: 9ff25e26-d672-4eee-8b9e-e2e26bc54e0f
name: Cancel PTO Request
purple_chat_link: https://marketplace.moveworks.com/purple-chat?conversation=%7B%22messages%22%3A%5B%7B%22role%22%3A%22user%22%2C%22parts%22%3A%5B%7B%22richText%22%3A%22I+need+to+see+my+upcoming+PTO+requests.+I+may+need+to+cancel+one.%22%7D%5D%7D%2C%7B%22role%22%3A%22assistant%22%2C%22parts%22%3A%5B%7B%22reasoningSteps%22%3A%5B%7B%22status%22%3A%22success%22%2C%22richText%22%3A%22Retrieving+time+off+requests+from+%3Cb%3EWorkday%3C%2Fb%3E...%22%2C%22connectorName%22%3A%22workday%22%7D%5D%7D%2C%7B%22richText%22%3A%22%3Cp%3EI+found+3+upcoming+requests+in+%3Cstrong%3EWorkday%3C%2Fstrong%3E%3A%3C%2Fp%3E%3Cul%3E%3Cli%3E%3Cstrong%3EPTO-482%3C%2Fstrong%3E+%7C+Vacation+%7C+Oct+12+-+Oct+14+%7C+Reason%3A+Family+trip+%28%3Cstrong%3EApproved%3C%2Fstrong%3E%29%3C%2Fli%3E%3Cli%3E%3Cstrong%3EPTO-490%3C%2Fstrong%3E+%7C+Personal+%7C+Nov+05+-+Nov+05+%7C+Reason%3A+Appointment+%28%3Cstrong%3EApproved%3C%2Fstrong%3E%29%3C%2Fli%3E%3Cli%3E%3Cstrong%3EPTO-501%3C%2Fstrong%3E+%7C+Vacation+%7C+Dec+20+-+Dec+24+%7C+Reason%3A+Camping+trip+%28%3Cstrong%3EPending%3C%2Fstrong%3E%29%3C%2Fli%3E%3C%2Ful%3E%3Cp%3EWhich+of+these+would+you+like+to+cancel%3F%3C%2Fp%3E%22%7D%2C%7B%22citations%22%3A%5B%7B%22connectorName%22%3A%22workday%22%2C%22citationTitle%22%3A%22PTO-482%3A+Vacation%22%7D%2C%7B%22connectorName%22%3A%22workday%22%2C%22citationTitle%22%3A%22PTO-490%3A+Personal%22%7D%2C%7B%22connectorName%22%3A%22workday%22%2C%22citationTitle%22%3A%22PTO-501%3A+Vacation%22%7D%5D%7D%5D%7D%2C%7B%22role%22%3A%22user%22%2C%22parts%22%3A%5B%7B%22richText%22%3A%22%3Cp%3EPlease+cancel+the+first+one%3C%2Fp%3E%22%7D%5D%7D%2C%7B%22role%22%3A%22assistant%22%2C%22parts%22%3A%5B%7B%22richText%22%3A%22%3Cp%3EI+can+help+you+cancel+that+%3Cstrong%3EWorkday%3C%2Fstrong%3E+request.%3C%2Fp%3E%3Cul%3E%3Cli%3E%3Cstrong%3EPTO-482%3C%2Fstrong%3E%3A+Vacation+%7C+Oct+12+-+Oct+14+%7C+Family+trip%3C%2Fli%3E%3C%2Ful%3E%3Cp%3EAre+you+sure+you+want+to+proceed%3F%3C%2Fp%3E%22%7D%2C%7B%22buttons%22%3A%5B%7B%22buttonText%22%3A%22Yes%2C+cancel+it%22%2C%22style%22%3A%22filled%22%7D%2C%7B%22buttonText%22%3A%22No%22%2C%22style%22%3A%22outlined%22%7D%5D%7D%5D%7D%2C%7B%22role%22%3A%22user%22%2C%22parts%22%3A%5B%7B%22richText%22%3A%22Yes%22%7D%5D%7D%2C%7B%22role%22%3A%22assistant%22%2C%22parts%22%3A%5B%7B%22reasoningSteps%22%3A%5B%7B%22status%22%3A%22success%22%2C%22richText%22%3A%22Cancelling+request+in+%3Cb%3EWorkday%3C%2Fb%3E...%22%2C%22connectorName%22%3A%22workday%22%7D%5D%7D%2C%7B%22richText%22%3A%22I%27ve+successfully+cancelled+your+vacation+request+%28PTO-482%29+in+%3Cstrong%3EWorkday%3C%2Fstrong%3E.%22%7D%2C%7B%22citations%22%3A%5B%7B%22connectorName%22%3A%22workday%22%2C%22citationTitle%22%3A%22PTO-482%22%7D%5D%7D%5D%7D%5D%7D
solution_tags:
- HR - Time & Absence
- Employee Self-Service
systems:
- workday
---

# Description

The **“Cancel PTO Request”** plugin enables employees, including managers, to cancel approved and pending PTO requests in **Workday** directly through the **Moveworks AI Assistant**, eliminating the need to navigate HR portals or complex forms.

# User Experience Preview

Please refer to the following [**Purple Chat**](https://marketplace.moveworks.com/purple-chat?conversation=%7B%22messages%22%3A%5B%7B%22role%22%3A%22user%22%2C%22parts%22%3A%5B%7B%22richText%22%3A%22I+need+to+see+my+upcoming+PTO+requests.+I+may+need+to+cancel+one.%22%7D%5D%7D%2C%7B%22role%22%3A%22assistant%22%2C%22parts%22%3A%5B%7B%22reasoningSteps%22%3A%5B%7B%22status%22%3A%22success%22%2C%22richText%22%3A%22Retrieving+time+off+requests+from+%3Cb%3EWorkday%3C%2Fb%3E...%22%2C%22connectorName%22%3A%22workday%22%7D%5D%7D%2C%7B%22richText%22%3A%22%3Cp%3EI+found+3+upcoming+requests+in+%3Cstrong%3EWorkday%3C%2Fstrong%3E%3A%3C%2Fp%3E%3Cul%3E%3Cli%3E%3Cstrong%3EPTO-482%3C%2Fstrong%3E+%7C+Vacation+%7C+Oct+12+-+Oct+14+%7C+Reason%3A+Family+trip+%28%3Cstrong%3EApproved%3C%2Fstrong%3E%29%3C%2Fli%3E%3Cli%3E%3Cstrong%3EPTO-490%3C%2Fstrong%3E+%7C+Personal+%7C+Nov+05+-+Nov+05+%7C+Reason%3A+Appointment+%28%3Cstrong%3EApproved%3C%2Fstrong%3E%29%3C%2Fli%3E%3Cli%3E%3Cstrong%3EPTO-501%3C%2Fstrong%3E+%7C+Vacation+%7C+Dec+20+-+Dec+24+%7C+Reason%3A+Camping+trip+%28%3Cstrong%3EPending%3C%2Fstrong%3E%29%3C%2Fli%3E%3C%2Ful%3E%3Cp%3EWhich+of+these+would+you+like+to+cancel%3F%3C%2Fp%3E%22%7D%2C%7B%22citations%22%3A%5B%7B%22connectorName%22%3A%22workday%22%2C%22citationTitle%22%3A%22PTO-482%3A+Vacation%22%7D%2C%7B%22connectorName%22%3A%22workday%22%2C%22citationTitle%22%3A%22PTO-490%3A+Personal%22%7D%2C%7B%22connectorName%22%3A%22workday%22%2C%22citationTitle%22%3A%22PTO-501%3A+Vacation%22%7D%5D%7D%5D%7D%2C%7B%22role%22%3A%22user%22%2C%22parts%22%3A%5B%7B%22richText%22%3A%22%3Cp%3EPlease+cancel+the+first+one%3C%2Fp%3E%22%7D%5D%7D%2C%7B%22role%22%3A%22assistant%22%2C%22parts%22%3A%5B%7B%22richText%22%3A%22%3Cp%3EI+can+help+you+cancel+that+%3Cstrong%3EWorkday%3C%2Fstrong%3E+request.%3C%2Fp%3E%3Cul%3E%3Cli%3E%3Cstrong%3EPTO-482%3C%2Fstrong%3E%3A+Vacation+%7C+Oct+12+-+Oct+14+%7C+Family+trip%3C%2Fli%3E%3C%2Ful%3E%3Cp%3EAre+you+sure+you+want+to+proceed%3F%3C%2Fp%3E%22%7D%2C%7B%22buttons%22%3A%5B%7B%22buttonText%22%3A%22Yes%2C+cancel+it%22%2C%22style%22%3A%22filled%22%7D%2C%7B%22buttonText%22%3A%22No%22%2C%22style%22%3A%22outlined%22%7D%5D%7D%5D%7D%2C%7B%22role%22%3A%22user%22%2C%22parts%22%3A%5B%7B%22richText%22%3A%22Yes%22%7D%5D%7D%2C%7B%22role%22%3A%22assistant%22%2C%22parts%22%3A%5B%7B%22reasoningSteps%22%3A%5B%7B%22status%22%3A%22success%22%2C%22richText%22%3A%22Cancelling+request+in+%3Cb%3EWorkday%3C%2Fb%3E...%22%2C%22connectorName%22%3A%22workday%22%7D%5D%7D%2C%7B%22richText%22%3A%22I%27ve+successfully+cancelled+your+vacation+request+%28PTO-482%29+in+%3Cstrong%3EWorkday%3C%2Fstrong%3E.%22%7D%2C%7B%22citations%22%3A%5B%7B%22connectorName%22%3A%22workday%22%2C%22citationTitle%22%3A%22PTO-482%22%7D%5D%7D%5D%7D%5D%7D) for a sample conversational experience between a user and the AI Assistant for this plugin.

# Pre-requisites

Before installing and using the **Cancel PTO Request** plugin, please ensure the following requirements are met:

## **1. Workday Connector**

This plugin requires an active **Workday connector** using **Basic Auth** to ****communicate with your Workday instance.

- If you have not already configured the connector, please follow the [Workday Connector Guide](https://marketplace.moveworks.com/connectors/workday#how-to-implement) available in the Moveworks Marketplace.
- The connector must be fully set up and before installing this plugin.
- Once the connector is successfully configured, follow our [**plugin installation documentation**](https://help.moveworks.com/docs/ai-agent-marketplace-installation) for detailed steps on how to install and activate the plugin in **Agent Studio**.

## **2. Workday System Requirements**

### **a. End User Permissions**

To cancel a PTO request through this plugin, employees must already have permission to cancel time off in Workday — the same permissions required to cancel through the Workday UI.

At a minimum, employees and managers must have:

- **Time Off permissions** that allow:
    - Viewing available Time Off Types
    - Cancelling Time Off / PTO requests
- Access to their own **employee profiles and time account balances**
- Eligibility to cancel PTO requests based on company time-off policies

> Note: The plugin does not grant new permissions. It respects existing role-based permissions and policies granted to the user in Workday.
> 

### **b. API Permissions (via Integration User)**

The Workday connector uses an **Integration Systems User (ISU)** to process PTO requests through Workday APIs.

That admin/integration user must have permissions to:

- View Time Off requests on behalf of employees
- Read Time Off Types and Time Account information
- Validate employee eligibility and balances (as required by your configuration)
- Cancel Time Off requests on behalf of employees

These permissions are typically configured through **Create Integration System User (ISU)** Workday Task.

## **3. Workday User Identity Ingestion**

This plugin requires User Identity Ingestion from workday in Moveworks. For Moveworks to complete actions across systems on the behalf of a user, it needs to have knowledge of all of the system IDs for the given user.
Setup information for User identity can be found on [https://help.moveworks.com/docs/user-identity](https://help.moveworks.com/docs/user-identity).

Below mandatory attributes are needed from this user ingestion.

1. workday ID of the user.
2. organization id of the user.

# **Implementation details**

## Visual Representation of How the Plugin Works

![image.png](Cancel%20PTO%20Request/image.png)

## API Details

<aside>

To use the curl examples below be sure to update details for <tenantUrl> and <tenantName>.

As a Workday administrator, obtain these details as follows:

1. Log in to Workday
2. In the search bar, search for **Public Web Services**
3. Open it
4. Select **Actions → Web Services → View WSDL**
5. In the WSDL file, locate:
    
    ```
    soap:address location="https://<hostname>/ccx/service/<tenant>/..."
    ```
    

The <hostname> (tenantUrl) and <tenant> (tenantName) in this URL are your **true tenant URL components**.

</aside>

### **API #1: Fetches the approved PTO for an employee by date**

This API retrieves any approve PTO requests for future dates only so that they can be cancelled by the user (see API#3).

```bash
curl -X POST "https://<tenantUrl>/ccx/api/wql/v1/<tenantName>/data" \
  -H "Content-Type: application/json" \
  -d '{
  "query": "SELECT status, workerRequestingPaidTimeOff, workersPreferredName, cf_workerEmployeeID,timeOffEntry, cf_timeOffUnit,timeOffDate, timeOffTypeForTimeOffEntry, cf_Manager, timeOffEvent, organization 
  FROM timeOffByDateTaken (organizations = ({{org_id}}), includeSubordinateOrganizations = true , startDate = ('{{today_date}}'))  
  WHERE status in (0391102bd1b542538d996936c8fa2fa7) 
  AND latestTimeOffEntry is not null AND totalUnits > 0 AND workerRequestingPaidTimeOff = '{{worker_id}}' 
  GROUP BY status, timeOffDate, workerRequestingPaidTimeOff, workersPreferredName, timeOffTypeForTimeOffEntry, cf_Manager, cf_workerEmployeeID, organization,timeOffEvent ,timeOffEntry , cf_timeOffUnit"
}'
```

**Query Parameters**

- `ORG_ID` *(string):* organisation ID of the logged in user fetched from user identity object.
- `TODAY_DATE` *(string):* date entered by the user for fetching the approved PTOs. If not provided then default is today’s date.
- `WORKER_ID` *(string):* worker ID of the logged in user fetched from user identity object.
- `SELECT`: Limits the response to required user PTO only:
    - `status`
    - `workerRequestingPaidTimeOff`
    - `workersPreferredName`
    - `cf_workerEmployeeID`
    - `timeOffEntry`
    - `cf_timeOffUnit`
    - `timeOffDate`
    - `timeOffTypeForTimeOffEntry`
    - `cf_Manager`
    - `timeOffEvent`
    - `organization`

### **API #2: Fetches the pending PTO for an employee**

This API retrieves any pending PTO requests for past or future dates so that they can be cancelled by the user (see API#4).

```bash
curl -X POST "https://<tenantUrl>/ccx/api/wql/v1/<tenantName>/data" \
  -H "Content-Type: application/json" \
  -d '{
  "query": "SELECT status, workerRequestingPaidTimeOff, workersPreferredName, cf_workerEmployeeID, cf_timeOffUnit, timeOffDate,timeOffEntry, timeOffTypeForTimeOffEntry, cf_Manager, timeOffEvent, organization 
  FROM timeOffByDateTaken (organizations = ({{org_id}}), includeSubordinateOrganizations = true) 
  WHERE status in (dd817fe688db4ac7bf84e3ef79f72948) AND latestTimeOffEntry is not null AND totalUnits > 0 AND workerRequestingPaidTimeOff = '{{worker_id}}' 
  GROUP BY status, workerRequestingPaidTimeOff, workersPreferredName, timeOffTypeForTimeOffEntry, cf_Manager, cf_workerEmployeeID, organization, cf_timeOffUnit, timeOffDate, timeOffEvent,timeOffEntry"
}'
```

**Query Parameters**

- `ORG_ID` *(string):* organisation ID of the logged in user fetched from user identity object.
- `WORKER_ID` *(string):* worker ID of the logged in user fetched from user identity object.
- `SELECT`: Limits the response to required user PTO only:
    - `status`
    - `workerRequestingPaidTimeOff`
    - `workersPreferredName`
    - `cf_workerEmployeeID`
    - `cf_timeOffUnit`
    - `timeOffDate`
    - `timeOffEntry`
    - `timeOffTypeForTimeOffEntry`
    - `cf_Manager`
    - `timeOffEvent`
    - `organization`

### **API #3: Cancel approved PTO**

This API is used to cancel the approved PTOs for future dates only.

```bash
curl --request POST \
  --url https://<tenantUrl>/ccx/service/<tenantName>/Absence_Management/v45.1 \
  --header 'Content-Type: text/xml; charset=utf-8' \
  --header 'SOAPAction: Get_Workers_Request' \
  --data '<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <env:Header>
        <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <wsse:UsernameToken wsu:Id="UsernameToken-{{USERNAME_PLACEHOLDER_TOKEN}}">
                <wsse:Username>ISU_TimeOffCorrections@{{TENANT}}</wsse:Username>
                <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">{{PASSWORD}}</wsse:Password>
            </wsse:UsernameToken>
        </wsse:Security>
    </env:Header>
    <env:Body>
        <bsvc:Adjust_Time_Off_Request xmlns:bsvc="urn:com.workday/bsvc" bsvc:version="v45.1">
            <bsvc:Business_Process_Parameters>
                <bsvc:Auto_Complete>true</bsvc:Auto_Complete>
                <bsvc:Run_Now>true</bsvc:Run_Now>
            </bsvc:Business_Process_Parameters>
            <bsvc:Adjust_Time_Off_Data>
                <bsvc:Worker_Reference bsvc:Descriptor="string">
                    <bsvc:ID bsvc:type="WID">{{worker_wid}}</bsvc:ID>
                </bsvc:Worker_Reference>
                <bsvc:Adjust_Time_Off_Entry_Data>
                    <bsvc:Time_Off_Entry_ID></bsvc:Time_Off_Entry_ID>
                    <bsvc:Time_Off_Entry_Reference bsvc:Descriptor="string">
                        <bsvc:ID bsvc:type="WID">{{event_entry_wid}}</bsvc:ID>
                    </bsvc:Time_Off_Entry_Reference>
                    <bsvc:Adjustment_to_Requested>{{duration}}</bsvc:Adjustment_to_Requested>
                </bsvc:Adjust_Time_Off_Entry_Data>
            </bsvc:Adjust_Time_Off_Data>
        </bsvc:Adjust_Time_Off_Request>
    </env:Body>
</env:Envelope>
'
```

**Query Parameters**

- `WORKER_WID` *(string):* worker ID of the logged in user fetched from user identity object.
- `EVENT_ENTRY_WID` *(string):*  ID of the event entry fetched from API #1 to be used to cancel the approved PTO.
- `DURATION` *(string):*  negative value, full day or half day duration cancelation.

**Key nuances:** 

- In workday, approved PTOs cannot be canceled using cancel SOAP web services due to which Adjust time off API is used. Duration will be sent as negative value.

### **API #4: Cancel pending PTO**

This API is used to cancel pending PTO requests for past and futures dates.

```bash
curl \
  -X POST \
  -H 'Content-Type: text/xml; charset=utf-8' \
  -H 'SOAPAction: Get_Workers_Request' \
  -d '<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope
	xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema">
	<env:Header>
		<wsse:Security
			xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
			xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
			<wsse:UsernameToken wsu:Id="UsernameToken-{{USERNAME_PLACEHOLDER_TOKEN}}">
				<wsse:Username>ISU_TimeOffCorrections@{{TENANT}}</wsse:Username>
				<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">{{PASSWORD}}</wsse:Password>
			</wsse:UsernameToken>
		</wsse:Security>
	</env:Header>
	<env:Body>
		<bsvc:Cancel_Business_Process_Request
			xmlns:bsvc="urn:com.workday/bsvc" bsvc:version="v45.1">
			<bsvc:Event_Reference bsvc:Descriptor="string">
				<!-- Zero or more repetitions: -->
				<bsvc:ID bsvc:type="WID">{{event_wid}}</bsvc:ID>
			</bsvc:Event_Reference>
			<!-- Optional: -->
			<bsvc:Cancel_Business_Process_Data>
				<!-- Optional: -->
				<bsvc:Comment>{{comment}}</bsvc:Comment>
				<!-- Optional: -->
				<bsvc:Suppress_Notifications>false</bsvc:Suppress_Notifications>
			</bsvc:Cancel_Business_Process_Data>
		</bsvc:Cancel_Business_Process_Request>
	</env:Body>
</env:Envelope>' \
  'https://<tenantUrl>/ccx/service/<tenantname>/Integrations/v45.1'
```

**Query Parameters:**

- `EVENT_WID` *(string):* workday ID of the event fetched from API #2 which will be used to cancel the PTO.
- `COMMENT` *(string):* Comment to include with the cancelled PTO

**Key nuances:** 

- Workday doesn’t support partial cancelation of the PTOs, we cancel the business process that is associated with the business process. So if we have multiple days leave in a single block and wants to cancel only one day, Workday will cancel the whole block.

### API References

This plugin uses a combination of **Workday WQL REST APIs** and **SOAP Web services** to retrieve PTOs information, cancel PTO requests.

For detailed information on request parameters, response formats, error handling, and versioning, please refer to the **official Workday API documentation** provided by Workday.

# **What Is In Scope for This Plugin?**

This plugin supports the following capabilities:

- Cancelling PTO requests for **limited leave types** (e.g., Vacation, Sick Leave, Casual Leave, Earned Leave, Comp Time).
- Cancelling approved or pending requests for an **employee’s own PTO only**.
- Cancelling PTO requests that respect **existing Workday policies, validations, and approval workflows**.

# **What Is Out of Scope for This Plugin?**

This plugin does **not** support the following:

- Cancelling PTO requests for **non-limited or leave-of-absence types**, such as parental leave, FMLA, or long-term disability.
- Cancelling **partial PTO requests** (e.g., cancelling one day from a PTO request that originally requested 3 days).