Skip to content

Repository files navigation

Genesys Cloud Hourly Interacting Analysis Tool

Purpose This browser-based static application reviews Genesys Cloud users, activity time, assigned roles and permissions, and possible eligibility for Hourly Interacting licensing.

Overview

The application helps identify users who may be suitable for Hourly Interacting licensing by combining activity time with permission eligibility checks.

  1. Review how much time each user spent in Genesys Cloud agent routing statuses during a selected billing-month review period.
  2. Check whether the user's assigned roles contain permissions that disqualify the user from Hourly Interacting licensing.

Genesys states that Hourly Interacting licensing is not available for administrators or supervisors, and that users with any listed disqualifying permission are not eligible.

Official list: https://help.genesys.cloud/articles/hourly-interacting-license-disqualifying-permissions/

Application Structure

The app has no backend service, build step, package manager, or local database. It runs entirely in the browser from static HTML and JavaScript files.

External browser libraries:

Application Pages

Login

The login is the initial starting point. The user will need to login with their Genesys Cloud credentials to the respective Org:

Login

User Directory

The User Directory provides info on all the users:

User Directory

Once logged in, it:

  • Shows the authenticated Genesys Cloud user.
  • Loads all users from the org, including active and inactive users.
  • Expands each user with authorization and last-login data.
  • Looks up license definitions and per-user licenses where available.
  • Displays user active state, last login, license, and role names.
  • Provides an identity visibility toggle that hides or shows names and email addresses.
  • Caches shared organization data in browser localStorage for 15 minutes.

User Performance Dashboard

The User Performance Dashboard is an Agent Status Report for the selected complete billing-month range:

User Performance Dashboard

This dashboard:

  • Reuses the authenticated browser session from index.html.
  • Defaults to the previous complete month.
  • Queries Genesys analytics user aggregates.
  • Calculates logged-in time from tSystemPresence, excluding OFFLINE.
  • Calculates interacting time from tAgentRoutingStatus with qualifier INTERACTING.
  • Calculates communicating time from tAgentRoutingStatus with qualifier COMMUNICATING.
  • Calculates Hourly Interacting Time as ceil((interacting + communicating) / 1 hour).
  • Resolves each user's roles and role permission policies.
  • Compares permissions with the embedded disqualifying permission patterns.
  • Provides charts for disqualifying-permission split, division split, and total status times.

The detailed dashboard is informational. Users with disqualifying permissions are shown as not applicable for Hourly Interacting availability. Users without disqualifying permissions are labelled HOURLY INTERACTING or NAMED using a fixed 50-hour threshold in the script.

Suggested Licensing Mix

The Suggested Licensing Mix page creates the licensing recommendation summary. It:

  • Reviews all active and inactive users.
  • Uses a selected complete billing-month range.
  • Let the reviewer choose a Named User hours threshold from 10 to 100 hours.
  • Calculates Hourly Interacting Hours as interacting plus communicating time, rounded up to whole hours.
  • Resolves each user's role permissions and disqualifying-permission matches.
  • Exports the summary to CSV or XLSX.

The summary groups users into inactive users, not-logged-in users, named users due to permissions, named users due to high hours, and suggested Hourly Interacting users.

Genesys Cloud API Usage

Endpoint Used for
GET /api/v2/users/me?expand=authorization Authenticated user profile and authorization context.
GET /api/v2/users?state=any&expand=authorization,dateLastLogin All active and inactive users, roles, and last login.
GET /api/v2/license/definitions License definition names.
GET /api/v2/license/users License lookup in bulk.
GET /api/v2/authorization/divisions/{divisionId} Division name lookup.
GET /api/v2/authorization/roles/{roleId} Role details, direct permissions, and permission policies.
POST /api/v2/analytics/users/aggregates/query User presence and routing-status aggregates for the selected interval.

Access model OAuth scopes alone are not enough. Genesys Cloud evaluates both the OAuth client scopes and the signed-in user's permissions. The reporting user must be able to read the users, roles, divisions, licenses, and analytics data being requested.

Genesys Cloud OAuth Setup

An appropriate OAuth client must be set up to run the application:

  1. In Genesys Cloud, go to Admin > Integrations > OAuth.
  2. Select Add client.
  3. Give the app a name, for example Hourly Interacting Licensing Dashboard.
  4. Select the Code Authorization / PKCE grant type.
  5. Add the authorized redirect URI for the index.html page URL that users will open.
  6. Add the required OAuth scopes.
  7. Save the OAuth client and copy the generated Client ID.

Client ID and Client Secret The Client ID is required and must be configured in the JavaScript files. The Client Secret is not required and must not be added to the JavaScript files. This is a browser-based PKCE application.

Authorized Redirect URIs

Authorized redirect URIs are the exact browser URLs that Genesys Cloud is allowed to redirect back to after sign-in. In this app, the redirect URI is the same index.html page that starts the login flow.

const redirectUri = window.location.origin + window.location.pathname;

The OAuth redirect URI must exactly match the URL used to open index.html, including protocol, host, port, and path. The dashboard and summary pages reuse the access token stored in browser localStorage.

Redirect URIs Examples

The OAuth redirect URI must exactly match the URL used to open index.html, including protocol. For example if running the application locally then it may be something such as shown below – with the exact values varying based upon your exact deployment

https://localhost:8443/index.html
https://127.0.0.1:8443/index.html

Hosted Deployment Redirect URI Format

https://your-web-server.example.com/genesys-hourly/index.html

Add only the exact index.html URLs users will open. Do not use file:// URLs for OAuth redirect URIs.

OAuth Scopes

Configure the OAuth client with the minimum read-oriented scopes needed for these API areas:

  • analytics:readonly
  • authorization:readonly
  • license:readonly
  • users:readonly

Depending on org settings and scope enforcement, license endpoints may require a different scope in the org. If a page returns a missing-scope error, update the OAuth client authorization to include the scope required by that endpoint.

Configure The Application

Item Detail
OAuth Client ID Required. Set clientId in scripts/main.js and scripts/user-performance.js.
Genesys Cloud region host Required. Set environment in all three JavaScript files. Use host only, such as mypurecloud.com, euw2.pure.cloud, etc.
Authorized redirect URI Required. Set in the Genesys Cloud OAuth client, not in the app files.
OAuth scopes Required. Configure in Genesys Cloud OAuth / Authorized Application settings.
OAuth client secret Not required and not used. Do not add it to JavaScript.
Access token Not manually configured. Created during login and stored temporarily in browser localStorage.
Org name Not used. The org is determined by the OAuth client, signed-in user, and region.

JavaScript values to replace

Update the OAuth Client ID in scripts/main.js and scripts/user-performance.js:

const clientId = 'CLIENT_ID_ADD_HERE';

Update the Genesys Cloud region host in scripts/main.js, scripts/user-performance.js, and scripts/hourly-interacting-summary.js:

const environment = 'GENESYS_CLOUD_REGION_HERE_IE_euw2.pure.cloud';

Example:

const clientId = '12345678-1234-1234-1234-123456789abc';
const environment = 'euw2.pure.cloud';

Region host format Use the region host only. Do not include https://, api., or https://api. The code builds API URLs as https://api.${environment}.

How To Use

  1. Open index.html using the local or hosted URL configured as the OAuth redirect URI.
  2. Select Login to Genesys Cloud.
  3. Complete the Genesys Cloud authentication and consent flow.
  4. Load or refresh the user directory.
  5. Open User Performance Dashboard to review active-user activity and disqualifying permissions.
  6. Select the review start and end months.
  7. Load the Agent Status Report.
  8. Open Hourly Interacting Summary.
  9. Select the same review period and the Named User hours threshold.
  10. Load the summary and export CSV or XLSX if needed.

Browser Storage

Key Purpose
gc_auth_state OAuth token, expiry, and scope returned by Genesys Cloud.
gc_identity_visibility Whether names and email addresses are visible.
gc_shared_org_cache Shared user, license, division, and metrics cache.
gc_user_performance_interval Last selected review period.
gc_hourly_interacting_named_threshold Last selected Named User hours threshold.

Logout removes the OAuth token locally. Cached org data may remain until overwritten or cleared by the browser.

Important Notes and Limitations

  • This is a reporting and analysis tool. It does not change Genesys Cloud users, roles, permissions, or licenses.
  • The application runs as the signed-in user and is limited by that user's permissions.
  • OAuth tokens are stored in browser localStorage; host and use the app only in trusted environments.
  • The disqualifying-permissions list is embedded in JavaScript and must be maintained when Genesys updates its official list.
  • The detailed dashboard uses a fixed 50-hour threshold, while the summary page lets the reviewer choose a threshold from 10 to 100 hours.
  • The selected month range is treated as complete UTC billing months.
  • Large orgs may take time to load and may theoretically encounter API rate or permission issues.
  • Name and email visibility can be toggled, but user IDs remain visible because they identify report rows.

Troubleshooting

Item Detail
No active Genesys Cloud session found Open index.html and log in first. The dashboard and summary reuse the token created by the index page.
Redirect URI mismatch Add the exact index.html URL to the OAuth client's authorized redirect URI list.
OAuth client ID or redirect URI is invalid Confirm the client ID, region, redirect URI, and PKCE grant type. The OAuth client must exist in the same Genesys Cloud region configured in the app.
Missing scope or forbidden access Check both OAuth scopes and the signed-in user's Genesys Cloud permissions.
Permission popup is blocked Allow popups for the app's origin.
Names and email addresses are hidden Enable the identity visibility checkbox.

Maintenance Checklist

  • Confirm clientId is set correctly in scripts/main.js and scripts/user-performance.js.
  • Confirm environment is set correctly in all three JavaScript files.
  • Confirm the OAuth redirect URI matches the deployed index.html URL.
  • Confirm OAuth scopes are approved for the org.
  • Confirm the reporting user has sufficient Genesys Cloud permissions.
  • Compare ADMIN_PERMISSION_PATTERNS with the current Genesys disqualifying-permissions article before relying on final recommendations.
  • Test the User Directory, User Performance Dashboard, and Suggested Licensing Mix pages after any region, OAuth, or permission-list change.

About

The application helps identify users who may be suitable for Hourly Interacting licensing by combining activity time with permission eligibility checks.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages