Workforce Intelligence APIs

From PegaWiki
Importing and exporting data using APIs / This is the approved revision of this page, as well as being the most recent.
Jump to navigation Jump to search

Workforce Intelligence APIs

Description The business purpose of the different Workforce Intelligence APIs
Version as of 8.5
Application Workforce Intelligence
Capability/Industry Area Workforce Intelligence



Workforce Intelligence - REST APIs[edit]

Workforce Intelligence provides a distinct set of REST APIs that a client can leverage, and these REST APIs are organized into two different categories:

  1. Data-driven APIs
  2. External data source APIs

The APIs can be accessed via Client ID (username) and Client Secret (password). Clients can request the credentials to access these APIs from the Pega Workforce Intelligence Service Delivery Team.

Data-driven APIs[edit]

Application Summary API[edit]

The Application Summary API enables clients to programmatically integrate aggregated Workforce Intelligence data into their existing data warehouse, without the need to download aggregated weekly or monthly export files from the exports page of the Workforce Intelligence portal. The Application Summary API returns the data in a JSON format.

The Application Summary API can be used to retrieve information about applications within a specified timeframe. The application information can be aggregated at a department, team, or associate level.

The required parameters to access the Application Summary API are:

  1. Start date
  2. End date
  3. Aggregation level (department, team, or associate level)

There are two optional parameters:

  1. Application Category - The different application categories available within Workforce Intelligence are:
    • Production
    • Other-Work
    • Non-Work
    • Idle
    • Unknown
  2. Business Unit ID - Specify the department or team id (business unit id) to retrieve application summary data for a specific department or team.

Note: If a category is not specified, then all the categories are returned and if a business unit is not specified, then the data defaults to parent/root department.

Sample Data Results[edit]

Sample API call 1 - https://clientname.wfi.pega.com/api/v1/business-unit/applications/summary?startDate=2020-07-01T00:00:00Z&endDate=2020-07-01T00:00:00Z&level=associate&businessUnitId=31

Sample Results 1 - The following image show a data pull in which the aggregation level was set to associate, and a business unit ID was provided for a team. Application Category was not used in the query; therefore, the results contain data from all application categories.

Application Summary API - Screenshot.jpg

Sample API call 2 - https://clientname.wfi.pega.com/api/v1/business-unit/applications/summary?startDate=2020-07-01T00:00:00Z&endDate=2020-07-01T00:00:00Z&level=associate&businessUnitId=31&category=otherwork

Sample Results 2 - The following image show a data pull in which the aggregation level was set to associate, a business unit ID was provided for a team, and the application category was set to Other-Work.

Application Summary API - Screenshot 2.jpg

Export API[edit]

From the Workforce Intelligence Portal, users assigned to the analyst role can download two types of data exports in comma-separated value (.CSV) format. These are:

  1. Weekly or monthly aggregate data exports
  2. Detailed daily raw data exports (High-Level data export)

This manual download method is available from the Analysis > Exports menu option on the portal. This is one of the ways in which analysts can download and access these exports. Another method for accessing these exports is by using the Export API. The Export API provides access to clients who choose to hide the Export option under the Analysis tab from all users. Clients find the API to be a preferable method, due to the size of these exports. The Export API allows clients to access these reports through a custom process that they create.

The following image shows an example of a weekly report pulled using the Export API. This format is an exact duplicate of the portal report pulled using the manual download method:

Export api result - screenshot.jpg

Sample API call for a weekly data export - https://clientname.wfi.pega.com/api/v1/s3-exports/download?fileName=exports/pega-wfi-clientname_Data_Export_Weekly_20200621.csv

Sample API call for a weekly data export - https://clientname.wfi.pega.com/api/v1/s3-exports/download?fileName=exports/pega-wfi-clientname_Data_Export_Monthly_202009.csv

Sample API call for a daily data export - https://clientname.wfi.pega.com/api/v1/s3-exports/download?fileName=daily-event-exports/event-export_20201019.csv

Due to the detailed nature of the daily raw data export, it is recommended that you see the data dictionary of high-level events, which is available on Pega Community.

Note: You can enable either a weekly export or a monthly data export. Both exports cannot be enabled at the same time. Once the weekly/monthly or daily detailed raw export files are created, the data pipeline will not update or modify the historical export files.

External data source APIs[edit]

Task API[edit]

The Task API provides an alternative to Workflow tags and can be used in conjunction with workflow tags. This API provides a more precise method of capturing workflows, however, it does require some setting up on the client side.

Task-based workflows track specific activities and help clients to detect patterns between applications/screens within a given start and end time (for example, the start and end time of a process, such as an address change, claim dispute, profile update and so on).

The following list outlines an example process using the Pend Address Change feature, as utilized by a client:

  • A task start trigger, start change of address
  • A task end trigger, pend change of address
  • A task start trigger to Pend Resolve change of address
  • A task end trigger to Resolve change of address
  • The system administrator would send:
    • Task name, XXXX Change of Address
    • Start Time
    • End time
    • Network ID of user performing task

All activities between these two points would be captured within the portal, and bookends all of the work. Once the Change of Address TASK API, Pend and Resolve Change of Address are set up, a client can see how many first call resolutions were completed in a case vs. a pended case, and how long the average change of address took if the case was pending.

When enabling Workforce Intelligence in Pega Customer Service, task data is automatically sent for analysis.

Metric API[edit]

If Workforce Intelligence is enabled in Pega Customer Service, you will be able to see the Workforce Intelligence dashboard (pictured below). This API allows you to send additional metrics, such as a Net Promoter Score, from other data sources; for example, Pega Customer Service or even another external source metric. The new metric can be plotted with the production score that is generated by the Workforce Intelligence application.

As shown in the following image, the Net Promoter Score is coupled with the production score and provides a graphical representation of where your agents are positioned in each of the four quadrants. You can customize the four quadrants based on your business needs.

Metric API - Screenshot.jpg

Note: We cannot customize the four quadrants for different departments/teams. Currently, the quadrants are defined at the company (root) level.