---
availability: INSTALLABLE
description: Enables managers to review, gather context, and act on pending PTO requests using natural language. This plugin functions as the fulfillment engine for PTO notifications.
name: Approve or Reject PTO
installation_asset_uuid: 9c309a75-1f23-49e3-8e83-bd935b6c5b8e
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%22show+my+pending+PTO+approvals%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%22%3Cp%3ESearching+for+your+team%27s+pending+time-off+requests+in+%3Cstrong%3EUKG%3C%2Fstrong%3E...%3C%2Fp%3E%22%2C%22connectorName%22%3A%22ukg%22%7D%5D%7D%2C%7B%22richText%22%3A%22%3Cp%3EI+found+3+pending+PTO+requests+in+your+queue%3A%3C%2Fp%3E%3Col%3E%3Cli%3E%3Cstrong%3EAlex+Rivera%3C%2Fstrong%3E%3A+Vacation+%28Jun+12+-+Jun+14%29%3C%2Fli%3E%3Cli%3E%3Cstrong%3EJamie+Smith%3C%2Fstrong%3E%3A+Personal+Day+%28Jun+13%29%3C%2Fli%3E%3Cli%3E%3Cstrong%3EMorgan+Lee%3C%2Fstrong%3E%3A+Vacation+%28Jun+13+-+Jun+15%29%3C%2Fli%3E%3C%2Fol%3E%3Cp%3EHow+would+you+like+to+handle+these%3F%3C%2Fp%3E%22%7D%5D%7D%2C%7B%22role%22%3A%22user%22%2C%22parts%22%3A%5B%7B%22richText%22%3A%22approve+1%2C+reject+2+and+3%22%7D%5D%7D%2C%7B%22role%22%3A%22assistant%22%2C%22parts%22%3A%5B%7B%22richText%22%3A%22%3Cp%3EUnderstood.+What+is+the+reason+for+rejecting+the+requests+for+%3Cstrong%3EJamie+Smith%3C%2Fstrong%3E+and+%3Cstrong%3EMorgan+Lee%3C%2Fstrong%3E%3F%3C%2Fp%3E%22%7D%5D%7D%2C%7B%22role%22%3A%22user%22%2C%22parts%22%3A%5B%7B%22richText%22%3A%22insufficient+team+coverage%22%7D%5D%7D%2C%7B%22role%22%3A%22assistant%22%2C%22parts%22%3A%5B%7B%22richText%22%3A%22%3Cp%3EOkay%2C+I%27m+ready+to+update+these+in+%3Cstrong%3EUKG%3C%2Fstrong%3E%3A%3C%2Fp%3E%3Cul%3E%3Cli%3E%3Cp%3E%3Cstrong%3EApproved%3C%2Fstrong%3E%3A+Alex+Rivera%27s+Vacation+PTO%3C%2Fp%3E%3C%2Fli%3E%3Cli%3E%3Cp%3E%3Cstrong%3ERejected%3C%2Fstrong%3E%3A+Jamie+Smith%27s+Personal+PTO%2C+Morgan+Lee%27s+Vacation+PTO+with+Reason+as+%5C%22insufficient+team+coverage%5C%22%3C%2Fp%3E%3C%2Fli%3E%3C%2Ful%3E%3Cp%3E%3Cstrong%3EDoes+this+look+right%3F%3C%2Fstrong%3E%3C%2Fp%3E%22%7D%2C%7B%22buttons%22%3A%5B%7B%22buttonText%22%3A%22Yes%22%2C%22style%22%3A%22filled%22%7D%2C%7B%22buttonText%22%3A%22Cancel%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%22%3Cp%3EUpdating+time-off+request+statuses+in+%3Cb%3EUKG%3C%2Fb%3E...%3C%2Fp%3E%22%2C%22connectorName%22%3A%22ukg%22%7D%5D%7D%2C%7B%22richText%22%3A%22%3Cp%3EI%27ve+successfully+updated+these+PTO+requests+in+UKG+WFM.%3C%2Fp%3E%22%7D%2C%7B%22citations%22%3A%5B%7B%22connectorName%22%3A%22ukg%22%2C%22citationTitle%22%3A%22PTO-8821%3A+Alex+Rivera+%28Approved%29%22%7D%2C%7B%22connectorName%22%3A%22ukg%22%2C%22citationTitle%22%3A%22PTO-8822%3A+Jamie+Smith+%28Rejected%29%22%7D%2C%7B%22connectorName%22%3A%22ukg%22%2C%22citationTitle%22%3A%22PTO-8823%3A+Morgan+Lee+%28Rejected%29%22%7D%5D%7D%5D%7D%5D%7D
solution_tags:
- HR - Other
- HR - Time & Absence
systems:
- ukg-pro-wfm
---

# Description

Enables managers to review, gather context, and act on pending PTO requests using natural language. This plugin functions as the fulfillment engine for PTO notifications.

# 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%22show+my+pending+PTO+approvals%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%22%3Cp%3ESearching+for+your+team%27s+pending+time-off+requests+in+%3Cstrong%3EUKG%3C%2Fstrong%3E...%3C%2Fp%3E%22%2C%22connectorName%22%3A%22ukg%22%7D%5D%7D%2C%7B%22richText%22%3A%22%3Cp%3EI+found+3+pending+PTO+requests+in+your+queue%3A%3C%2Fp%3E%3Col%3E%3Cli%3E%3Cstrong%3EAlex+Rivera%3C%2Fstrong%3E%3A+Vacation+%28Jun+12+-+Jun+14%29%3C%2Fli%3E%3Cli%3E%3Cstrong%3EJamie+Smith%3C%2Fstrong%3E%3A+Personal+Day+%28Jun+13%29%3C%2Fli%3E%3Cli%3E%3Cstrong%3EMorgan+Lee%3C%2Fstrong%3E%3A+Vacation+%28Jun+13+-+Jun+15%29%3C%2Fli%3E%3C%2Fol%3E%3Cp%3EHow+would+you+like+to+handle+these%3F%3C%2Fp%3E%22%7D%5D%7D%2C%7B%22role%22%3A%22user%22%2C%22parts%22%3A%5B%7B%22richText%22%3A%22approve+1%2C+reject+2+and+3%22%7D%5D%7D%2C%7B%22role%22%3A%22assistant%22%2C%22parts%22%3A%5B%7B%22richText%22%3A%22%3Cp%3EUnderstood.+What+is+the+reason+for+rejecting+the+requests+for+%3Cstrong%3EJamie+Smith%3C%2Fstrong%3E+and+%3Cstrong%3EMorgan+Lee%3C%2Fstrong%3E%3F%3C%2Fp%3E%22%7D%5D%7D%2C%7B%22role%22%3A%22user%22%2C%22parts%22%3A%5B%7B%22richText%22%3A%22insufficient+team+coverage%22%7D%5D%7D%2C%7B%22role%22%3A%22assistant%22%2C%22parts%22%3A%5B%7B%22richText%22%3A%22%3Cp%3EOkay%2C+I%27m+ready+to+update+these+in+%3Cstrong%3EUKG%3C%2Fstrong%3E%3A%3C%2Fp%3E%3Cul%3E%3Cli%3E%3Cp%3E%3Cstrong%3EApproved%3C%2Fstrong%3E%3A+Alex+Rivera%27s+Vacation+PTO%3C%2Fp%3E%3C%2Fli%3E%3Cli%3E%3Cp%3E%3Cstrong%3ERejected%3C%2Fstrong%3E%3A+Jamie+Smith%27s+Personal+PTO%2C+Morgan+Lee%27s+Vacation+PTO+with+Reason+as+%5C%22insufficient+team+coverage%5C%22%3C%2Fp%3E%3C%2Fli%3E%3C%2Ful%3E%3Cp%3E%3Cstrong%3EDoes+this+look+right%3F%3C%2Fstrong%3E%3C%2Fp%3E%22%7D%2C%7B%22buttons%22%3A%5B%7B%22buttonText%22%3A%22Yes%22%2C%22style%22%3A%22filled%22%7D%2C%7B%22buttonText%22%3A%22Cancel%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%22%3Cp%3EUpdating+time-off+request+statuses+in+%3Cb%3EUKG%3C%2Fb%3E...%3C%2Fp%3E%22%2C%22connectorName%22%3A%22ukg%22%7D%5D%7D%2C%7B%22richText%22%3A%22%3Cp%3EI%27ve+successfully+updated+these+PTO+requests+in+UKG+WFM.%3C%2Fp%3E%22%7D%2C%7B%22citations%22%3A%5B%7B%22connectorName%22%3A%22ukg%22%2C%22citationTitle%22%3A%22PTO-8821%3A+Alex+Rivera+%28Approved%29%22%7D%2C%7B%22connectorName%22%3A%22ukg%22%2C%22citationTitle%22%3A%22PTO-8822%3A+Jamie+Smith+%28Rejected%29%22%7D%2C%7B%22connectorName%22%3A%22ukg%22%2C%22citationTitle%22%3A%22PTO-8823%3A+Morgan+Lee+%28Rejected%29%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 **Approve or Reject** **PTO** plugin, please ensure the following requirements are met:

## **1. UKG Connector**

This plugin requires an active **UKG connector** with **user consent auth** to communicate with your UKG instance.

- If you have not already configured the connector, please follow the **[UKG Connector Guide](https://marketplace.moveworks.com/connectors/ukg-pro-wfm)** available in the Moveworks Marketplace.
- The connector must be fully set up 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**.

**Note:** UKG’s user-consent authorization expires every 24 hours, requiring users to reauthorize once per day. This is a known limitation, and support for handling such short-lived refresh tokens is being built on Moveworks.

## **2. UKG System Requirements**

### **End User Permissions (Manager Persona)**

To approve or reject PTO through this plugin, managers must already have permissions to approve or reject PTO in UKG WFM — the same permissions required to approve or reject PTO through the UKG WFM UI.

At a minimum, end users must have:

- **Time Off permissions** that allow:
    - Viewing available Time Off Types
    - Viewing own Time Off requests
    - Viewing, Approving or Rejecting Time Off requests for direct reports
- Access to their own and **direct reports’ employee profile and time account balances**

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

# **Implementation details**

## Visual Representation of How the Plugin Works

![image.png](Approve%20or%20Reject%20PTO/image.png)

## API Details

Before running the cURL examples below, replace `<YOUR_UKG_HOST>` with your actual UKG hostname.

**Admin Checklist: How to Find Your UKG Hostname**

1. Log in to your UKG account.
2. Check the URL in your browser’s address bar.
3. Your hostname will follow one of these formats (examples):
    - `https://acme-dev.cfn.mykronos.com`
    - `https://acme-test.cfn.mykronos.com`
    - `https://acme-uat.cfn.mykronos.com`
    - `https://acme-prod.cfn.mykronos.com`

Use the full hostname (e.g., `acme-prod.cfn.mykronos.com`) when replacing `<YOUR_UKG_HOST>` in the cURL commands.

### **API #1: Get a User’s UKG ID**

This REST API is used to fetch employee details for the current logged in user.

```bash
curl --request GET \
  --url 'https://<YOUR_UKG_HOST>/api/v1/commons/persons/current_user_info?include_contact_information=true' \
  --header 'Authorization: <ACCESS_TOKEN>' \
  --header 'Content-Type: application/json'
```

**Query Parameters:**

- None.

### **API #2: Update PTO Status**

This API is used to **update the status of a PTO request** in UKG WFM as a an authenticated manager user.

```bash
curl --request POST \
  --url https://<YOUR_UKG_HOST>/api/v1/scheduling/timeoff/apply_update \
  --header 'Authorization: <ACCESS_TOKEN>' \
  --header 'Content-Type: application/json'
  --data '{
    "changeState": {
        "do": {
            "toStatus": {
                "name": "<NEW_STATUS>"
            },
            "commentNotes": [
                {
                    "comment": {
                        "active": true,
                        "name": "Request Comment"
                    },
                    "notes": [
                        {
                            "text": "<COMMENT_TEXT>",
                            "dataSourceDisplayName": "<COMMENTER_USERNAME>"
                        }
                    ]
                }
            ]
        },
        "where": {
            "timeOffRequestId": "<PTO_ID>"
        }
    }
}'
```

**Query Parameters:**

- `NEW_STATUS` *(string):* This will be the new status value that needs to be applied to the PTO request and should only be set to “Approved” or “Refused”.
- `COMMENT_TEXT` *(string):* This will be the comment to be added to the PTO request.
- `PTO_ID` *(string):* This will be the PTO Identifier to update.

**Key nuances:**

- `NEW_STATUS` values can only be “Approved” or “Refused”.
- `COMMENT_TEXT` is mandatory if the `NEW_STATUS` is “Refused”.

### API References

This plugin use **UKG WFM Pro Time Management REST APIs** to retrieve employee information, determine eligible PTO time types, and check PTO balance.

For detailed information on request parameters, response formats, error handling, and versioning, please refer to the [**official UKG API documentation**](https://developer.ukg.com/wfm/reference/welcome-to-the-ukg-pro-workforce-management-api) provided by UKG.

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

This plugin supports the following capabilities:

- Approve or reject time-off requests for **select leave types** (e.g., Vacation, Sick Leave, Casual Leave, Earned Leave, Comp Time, etc.).
- Perform bulk actions on multiple time-off requests within a single interaction.
- In cases of partial success during bulk actions, clearly display which requests were successfully processed and which failed.

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

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

- Approving or rejecting time off requests for **non-limited or leave-of-absence types**, such as parental leave, FMLA, or long-term disability.