en-US/about_PSUKG.help.txt

TOPIC
    about_PSUKG

SHORT DESCRIPTION
    PSUKG is a PowerShell module for the UKG HR Service Delivery REST API v2.

LONG DESCRIPTION
    PSUKG provides a comprehensive set of cmdlets for interacting with the UKG
    HR Service Delivery API (formerly PeopleDoc). The module supports full CRUD
    operations for employees, users, organizations, roles, documents, and more.

    Key Features:
    - OAuth 2.0 authentication with automatic token refresh
    - Support for multiple regions (EU, US, UKG_ATL, UKG_TOR)
    - Support for multiple environments (Production, Staging)
    - Full CRUD operations for all major resource types
    - Bulk operations with async status tracking
    - Cursor-based pagination with automatic retrieval
    - Pipeline support for chaining cmdlets
    - Cross-platform compatibility (PowerShell 5.1 and 7+)

  Module Structure
    The module is organized into functional areas:

    Authentication:
        Connect-UKG - Establish API connection
        Disconnect-UKG - Close API connection
        Get-UKGSession - View current session

    Employees:
        Get-UKGEmployee - Retrieve employee data
        New-UKGEmployee - Create new employee
        Set-UKGEmployee - Update employee
        Remove-UKGEmployee - Delete employee
        Search-UKGEmployee - Search employees
        Invoke-UKGEmployeeBulk - Bulk employee operations
        Get-UKGEmployeeBulkStatus - Check bulk operation status
        Send-UKGEmployeeVaultInvite - Send vault invitation
        Send-UKGEmployeePortalInvite - Send portal invitation
        Remove-UKGEmployeeVaultLink - Remove vault link
        Send-UKGEmployeeVaultDocument - Send vault document

    Users:
        Get-UKGUser - Retrieve user data
        New-UKGUser - Create new user
        Set-UKGUser - Update user
        Invoke-UKGUserBulk - Bulk user operations
        Get-UKGUserBulkStatus - Check bulk operation status
        Send-UKGUserInvite - Send user invitation

    Organizations:
        Get-UKGOrganization - Retrieve organization data
        Set-UKGOrganization - Update organization
        Get-UKGOrganizationGroup - Retrieve organization groups
        Set-UKGOrganizationGroup - Update organization group

    Roles:
        Get-UKGRole - Retrieve role data
        Set-UKGRole - Update role
        Get-UKGRoleCorePermission - Get core permissions
        Set-UKGRoleCorePermission - Update core permissions
        Get-UKGRoleEFMPermission - Get EFM permissions

    Custom Fields:
        Get-UKGCustomField - Retrieve custom fields
        Set-UKGCustomField - Update custom fields

    Documents:
        Send-UKGDocument - Upload document
        Get-UKGEmployeeDocument - Get employee documents
        New-UKGEmployeeDocument - Create employee document
        Get-UKGRedirectionUrl - Get document redirection URL

    Document Types:
        Get-UKGEmployeeDocumentType - Get employee document types
        Set-UKGEmployeeDocumentType - Update employee document type
        Get-UKGCompanyDocumentType - Get company document types
        Set-UKGCompanyDocumentType - Update company document type

    Folders:
        Get-UKGEmployeeFolder - Get employee folders
        Get-UKGCompanyFolder - Get company folders

    Subscriptions:
        Get-UKGEmployeeSubscription - Get employee subscriptions

    Electronic Vault:
        Get-UKGElectronicVaultOption - Get vault options
        Set-UKGElectronicVaultOption - Update vault options

  Supported Regions
    The module supports the following regions and environments:

    Region Environment Base URL
    ------ ----------- --------
    EU Production https://apis.eu.people-doc.com/api/v2
    EU Staging https://apis.staging.eu.people-doc.com/api/v2
    US Production https://apis.us.people-doc.com/api/v2
    US Staging https://apis.staging.us.people-doc.com/api/v2
    UKG_ATL Production https://apis.hrsd.ultipro.com/api/v2
    UKG_TOR Production https://apis.hrsd.ultipro.ca/api/v2

  Requirements
    - PowerShell 5.1 or higher
    - PowerShell 7+ recommended for cross-platform support
    - Valid UKG API credentials (Application ID, Secret, Client ID)
    - Internet connectivity to UKG API endpoints

EXAMPLES
  Example 1: Basic Authentication and Employee Retrieval
    # Authenticate with UKG API
    $secret = Read-Host -AsSecureString -Prompt "Enter Application Secret"
    Connect-UKG -ApplicationId "app123" -ApplicationSecret $secret -ClientId "client456" -Region EU

    # Get an employee
    Get-UKGEmployee -Id "emp123"

    # Disconnect when done
    Disconnect-UKG

  Example 2: Search and Pipeline Operations
    # Search for active employees and update their department
    Search-UKGEmployee -Filter @{ status = @{ eq = "active" } } |
        Where-Object { $_.department -eq "Sales" } |
        ForEach-Object { Set-UKGEmployee -Id $_.id -Department "Business Development" }

  Example 3: Bulk Employee Creation
    # Create multiple employees at once
    $employees = @(
        @{ email = "emp1@company.com"; first_name = "John"; last_name = "Doe"; employee_number = "E001" },
        @{ email = "emp2@company.com"; first_name = "Jane"; last_name = "Smith"; employee_number = "E002" }
    )

    $result = Invoke-UKGEmployeeBulk -Create -Employees $employees -WaitForCompletion

    if ($result.status -eq "completed") {
        Write-Host "Successfully created $($result.successful_count) employees"
    }

  Example 4: Document Upload
    # Upload a document for an employee
    Send-UKGDocument -FilePath "C:\Documents\contract.pdf" -EmployeeId "emp123" -FolderId "folder456"

KEYWORDS
    UKG, HR, API, REST, PeopleDoc, Employee, User, Organization

SEE ALSO
    about_PSUKG_Authentication
    about_PSUKG_Pagination
    about_PSUKG_BulkOperations
    about_PSUKG_ErrorHandling
    Connect-UKG
    Get-UKGEmployee
    Online documentation: https://github.com/JosephMcEvoy/PSUKG