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.7
Application Pega 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. 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 shows 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 shows 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 different types of data exports which are available in comma-separated value (.CSV) format.

There are two ways to access the data exports. An application user with analyst role can manually download the data exports from the Analysis > Exports menu option on the portal or these exports can be accessed via export API.

The different types of data exports available to a client are:

  1. Weekly or monthly aggregate data exports
  2. Default data export which can contain one or more types of data exports in a zipped file -
    • Detailed daily raw data exports (High-Level data export)
    • User’s hierarchy data export
    • Processed export
    • Workflow export
    • Step export
  3. Custom data exports
Note 1: You can enable either a weekly export or a monthly data export. Both exports cannot be enabled at the same time. Once the weekly or monthly and or default data export files are created, the data pipeline will not update or modify the historical export files.
Note 2: Default data exports are disabled by default. Clients can select (from above) which default data export they need. To request the different default data exports, clients will need to request them from My Support Portal.

Due to the size of these exports, clients might find the export API to be the preferable download method to gain access to the data to create their own reports and visualizations. After the Service Delivery team enables the requested exports, clients can use the Export API to create scripts to download and access the different types of data exports available to them. Clients can schedule and automate the export, download, and designate a centralized location to save the download.

Sample API call for a weekly data export (if weekly data export is enabled) - https://clientname.wfi.pega.com/api/v1/s3-exports/download?fileName=exports/pega-wfi-clientname_Data_Export_Weekly_20211024.csv

Sample API call for a monthly data export (if monthly data export is enabled) - 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 default data - https://clientname.wfi.pega.com/api/v1/s3-exports/download?fileName=daily-event-exports/20211014-default-clientname.zip

Note: In the Workforce Intelligence 8.7 release, the default data export filename and extension changed to “.zip”. The zipped file contains individual “.CSV” files for event, processed, step, user, or workflow exports.

Custom data exports[edit]

Introduced in Workforce Intelligence release 8.7, if an analyst sees a metric in the Workforce Intelligence application, then we can include it in a custom data export. Clients need to create a Service Request through My Support Portal (https://msp.pega.com) to have a custom export built.

Like default data exports, custom data exports will be generated daily, and they can be accessed via Analysis > Exports or through Export API.

Note: At this time, we cannot do more than a single day at a time.

Examples of some custom data export which Service Delivery team can build are:

  • Administrator audit log
  • Screen Rules export

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

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.

Weekly data export report example.

This format is an exact duplicate of the portal report pulled using the manual download method:


User hierarchy data export example

Workflow data export example



Step data export example





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 setup 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. After 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.