Power BI
Use Power BI to report on your Conversation Intelligence (CI) data. Capacity delivers interaction data to an Azure Data Lake Storage Gen2 container that you own, and Power BI connects to that container as its data source. This article covers the Azure setup, the details to share with Capacity, and how to connect and prepare the data in Power BI Desktop.
How It Works
After an interaction is ingested and transcribed in CI, an outbound webhook sends the interaction data to a dedicated Capacity endpoint. Capacity transforms the data from JSON into Parquet, a file format designed for analytics, and writes the Parquet files to your Azure Data Lake Storage Gen2 container. Power BI then reads the files from that container.
For details of the fields in each interaction, see Conversation Intelligence Data Model.
Before You Begin
- You need an Azure account that can create storage accounts and containers, and retrieve access keys or generate SAS tokens.
- You need Power BI Desktop installed.
Azure Configuration
Create a Storage Account and Container
- Go to portal.azure.com and sign in.
- In the left-hand menu, select Storage accounts
- Select +Create.
- Under Resource group, choose an existing group or create a new one.
- Enter a name for the storage account and select a region.
- Under Primary service, select Azure Blob Storage or Azure Data Lake Storage Gen2.
- On the Advanced tab, make sure Enable hierarchical namespace is selected. This turns on the Data Lake Gen2 features.
- Select Review + create, then select Create.
- When the storage account is ready, select Go to resource, then select Containers in the left menu.
- Select + Container
- Name the container, and set Anonymous access level to Private (no anonymous access).
- Select Create.
Retrieve the Primary Data Lake Endpoint
- In your storage account, go to Settings and select Endpoints.
- Under Primary endpoint, copy the URL next to Data Lake Storage. This is your primary Data Lake endpoint. You'll share it with Capacity.
Choose Authenticate Method
Capacity needs credentials to write files to your container. You can provide either an access key or a SAS token.
| Credential | Access | Best for |
|---|---|---|
| SAS token (recommended) | Limited to the permissions, scope and expiry date you choose when you create it. | Giving Capacity access to this container only. |
| Access key | Full access to the entire storage account. | A storage account used only for this integration. |
An access key gives full access to everything in the storage account and can't be narrowed. If the storage account holds anything other than this integration's data, use a SAS token.
Option 1: SAS Token
- In your storage account, select Containers, then select the container you created.
- Select Shared access tokens in the left menu.
- For Signing method, select Account key.
- Set Permissions.
Setting Value Permissions sp=racwdlme - Set a Start and Expiry date. Choose an expiry far enough ahead for ongoing use, and make a note of the date.
- Select Generate SAS token and URL.
- Copy the Blob SAS token. This is the token you'll share with Capacity.
Capacity can only write to your container while the SAS token is valid. Before it expires, generate a new token and send it to creovai-support@capacity.com. Otherwise, new interactions stop arriving in your container.
Option 2: Access Key
- In your storage account, go to Security + networking and select Access keys.
- Copy one of the Key values. This is the key you'll share with Capacity.
What to Share with Capacity
Share the following securely with Capacity. Contact creovai-support@capacity.com to arrange how.
| Item | Description |
|---|---|
| Storage account name | The name of the storage account you created (also called the deployment name). |
| Data Lake Storage primary endpoint | The URL you copied from Endpoints. |
| Container name | The name of the container Capacity will write to. |
| Access key or SAS token | The credentials configured above. Tell us which type you're sending. |
| SAS token expiry date | If you're using a SAS token, the date it expires. |
Once Capacity has your details, we'll configure the JSON-to-Parquet transformation and test delivery to your container. We'll confirm with you before go-live. After that, Capacity automatically pushes Parquet files to your container.
Power BI Configuration
Once data is arriving in your container, follow these steps to connect Power BI to it.
Create the Data Source
- Open Power BI Desktop.
- On the Home tab, select Get Data.
- Select Azure, then Azure Data Lake Storage Gen2, then select Connect.
- Enter your primary Data Lake endpoint, followed by a forward slash (
/) and your container name, then select OK.https://<storage-account-name>.dfs.core.windows.net/<container-name>
- When Power BI asks you to authenticate, choose the method that matches how you're set up:
Method What to do Account key Select Account key, enter your access key, then select Connect. Shared access signature (SAS) Select Shared access signature (SAS), enter your SAS token, then select Connect. The token needs read and list permissions on the container. - Power BI lists the files in your container. Select Combine >> Combine & Transform Data.
- Power BI identifies the file type as Parquet. Select Transform Data.
Prepare the Data
Power BI opens your combined Parquet files in Power Query Editor. Each interaction contains nested data (call groups, classifications and participants) packed into single columns. In this step, you'll move each of these into its own table and expand it, so the data is easy to report on.
When you finish, you'll have four tables. Each one links back to its interaction using callId.
| Table | Contains |
|---|---|
| Interactions | One row per interaction, with its duration and other top-level details. |
| Call Groups | The call groups assigned to each interaction. |
| Classifications | What CI detected or scored on each interaction (for example, CSATai). |
| Participants | The agent and customer on each interaction. |
Clean Up the Main Query
- Delete the columns you don't need for reporting:
- textHits
- customText
- customStrings
- customLongs
- customDoubles
- customDateTimes
- evaluatedCustomFields
- matchedCustomFields
- Right-click the main query and select Rename. Name it Interactions.
Create Sub-Queries
Repeat the steps below three times, once for each row in the table that follows.
- Right-click the Interactions query and select Duplicate.
- Rename the new query.
- Delete every column except callId and the column listed for that query.
- Select the expand button at the top of that column.
- Clear the checkboxes listed for that query, then select OK.
| Rename the query to | Keep these columns | Clear these when expanding |
|---|---|---|
| Call Groups | callId, callGroups | id |
| Classifications | callId, classifications | id |
| Participants | callId, participants | participantId, refId, segments |
Leave Use original column name as prefix ticked when you expand. The recommended measures later in this article rely on column names such as classifications.content.
Finish the Interactions Query
- Select the Interactions query.
- Delete the three columns you've moved into their own queries: callGroups, classifications and participants.
- Select the Duration column.
- On the Add Column tab, select Duration >> Total Seconds. This adds a column that makes calculations such as average handle time (AHT) easier later.
Load the Data
- On the Home tab, select Close & Apply.
Power BI loads your four tables: Interactions, Call Groups, Classifications and Participants. Your data is now ready for reporting.
Recommended Measures
These measures are a starting point for your reports.
| Main Table | Measure | Comments |
|---|---|---|
| Interactions | Total Seconds HH:mm:ss= TIME(0,0,SUM('Interactions'[Total Seconds])) | Total seconds, formatted as HH:mm:ss. |
Total Seconds Avg. HH:mm:ss= TIME(0,0,AVERAGE('Interactions'[Total Seconds])) | Average of total seconds, formatted as HH:mm:ss. | |
| Participants | Total CSATai Satisfied= CALCULATE(
COUNT('Participants'[callId]),
FILTER(
Classifications,
Classifications[classifications.content] = "Satisfied"
)
) | Total number of calls with a Satisfied rating from CSATai. |
Total Calls by CSATai Satisfied= DIVIDE(
[Total CSATai Satisfied],
COUNT('Participants'[callId])
) | Percentage of total calls rated Satisfied by CSATai. |
If you need help with this integration, contact creovai-support@capacity.com.
