Skip to main content
Dynamics 365

KPI enhancements with Customer Insights July 2017 update

Applies to: Dynamics 365 for Customer Insights July 2017 update

 

Dynamics 365 for Customer Insights (DCI) July 2017 update brings a number of enhancements to help customers implement new scenarios to drive intelligent customer engagements across all channels of interaction. KPIs form the core of analytics capabilities of DCI. We continue to improve the KPI engine to define various metrics, from simple to complex, to model typical KPIs needed to capture any behavioral, engagement or transactional patterns seen with customers, partners, or employees or any entity modeled in DCI. In this blog post, I will highlight some of the notable new enhancements done with the KPI engine along with some real-world examples on how to define the corresponding KPIs to help you model your scenarios.

KPI engine enhancements

The list below provides an overview of features added or enhanced with the July 2017 update:

  • Expression support in aggregate and filter conditions: Aggregate and filter condition definition now supports expressions using arithmetic and logical operators.
  • KPIs over related entity properties using graph traversal with extracts – DCI underneath gets a significant update with a new graph engine. This graph engine now enables the possibility to define KPIs over relationship graph modeled with relationships and links in DCI. Extract provides the ability to extract properties from related entities and use them in KPI calculation. For example, City property from Customer profile can be modeled with extract for use in group by dimension of the KPI to compute chat interactions related with Customer. Extracts can be used in aggregate, filter condition, or group by. Extracts can be defined over multiple hops of the relationships graph. Extracts can be defined over multiple cardinality relationships (1 to N or M to N) as well. Such extracted fields are treated as Array value type.
  • Advanced expressions with aliases for use in aggregate, filter condition or group by: Aliases allow the possibility to define expressions over direct profile or interaction properties as well as extract based properties from related entities. Aliases in addition allow set operations such as Union, Intersect or CrossApply if the extracted property is an Array value type.
  • Time window support for Profile KPI with mapping to a timestamp field: A timestamp field can now be used to compute profile KPIs allowing grouping of data in time windows as well for insights. For example, the number of cases resolved by resolution day can be computed using the resolution timestamp of case entity to analyze the case resolution trend.
  • KPI over KPI calculation for advanced calculation scenarios: Sum, difference or division of several KPIs can be defined with expressions using KPI over KPIs.
  • String and Date functions for use in alias expressions to transform data: Simple transformations functions such as existence of a sub-string or diff between two timestamps or day/month/year type transformations can be used in expressions to build powerful KPIs.
  • Text analytics function for sentiment extraction: Sentiment function to compute the score for text properties in the range of -1 to 1.
  • Session support for KPI calculations: Users often engage with businesses in a series of interactions for a specific purpose such as buying a product or logging a support case. Often the interactions are grouped logically into a customer session and KPIs needs to be computed over the session to understand customer behavior. For example: the average duration of a session, the average number of pages clicked in a session, the average number of support agents involved in a session, the average number of chat messages exchanged in a session, etc. A new session function is provided to group a sequence of interactions based on a timestamp into a session and then use session specific analytic functions to compute metrics such as session duration, first response time, or length of session.

KPI examples

It’s best to understand the power of the KPI engine with some real-world examples to highlight the value of the new features. The following examples will demonstrate setup of some typical KPIs used in sales, service, or marketing scenarios to get insights about customer behavior.

Customer Engagement Score

This KPI computes an engagement score for contacts and accounts based on the time decay of the various engagement activities done with the contacts of an account. A contact connects with the company doing various engagement activities such as Phone Call, Email, Chat, or Web visit. The more they engage with the company, the higher the strength of the relationship. The engagement activities are typically valued based on the recency of the activity. In this example, activity contribution to the score decays linearly from 1 to 0 over a period of 90 days. Each activity in turn weights differently based on activity type on a scale of 1-10 per the following:

  • Web visit is worth 2 points
  • Email is worth 3 points
  • Chat is worth 5 points
  • Phone call is worth 8 points
  • Appointment is worth 10 points

Each Activity is related to Primary Contact which is related to Account per the following relationship diagram:

 

Relationship diagram showing an activity related to Primary Contact, which is related to Account

 

 

 

Let’s go through the steps to model the various KPIs to compute the contact and account engagement score. This KPI is defined for Activity interaction entity grouped by contactId and accountId to provide the ability to rollup engagement score to account or contact level per the following:

KPI Definition
Basic information Name = ActivityEngagementScore

Source = Interaction

Type = Activity

Calculation Window = Lifetime

Extracts Name = AccountIds

Account traversal = Activity to ActivityPrimaryContact(Contact) Entity Name = Contact

Property = AccountId

Aliases 1.       DaysSinceActivity: DateDiff(day, ActivityTimestamp, DateTimeUtcNow())

2.       DecayFactor: (90 – DaysSinceActivity)/90

3.       AppointmentActivityPoints: Activity == ‘Appointment’ ? 10 : 0

4.       PhoneActivityPoints: Activity == ‘Phone’ ? 8 : 0

5.       ChatActivityPoints: Activity == ‘Chat’ ? 5 : 0

6.       EmailActivityPoints: Activity == ‘Email’ ? 3 : 0

7.       WebActivityPoints: Activity == ‘Web’ ? 2 : 0

8.       AccountId: CrossApply(AccountIds.AccountId)

Aggregate Function Function = SUM

Expression = DecayFactor * (AppointmentActivityPoints + PhoneActivityPoints + ChatActivityPoints + EmailActivityPoints + WebActivityPoints)

Filter Conditions DaysSinceActivity <= 90
Group By ContactId, AccountId

 

KPI definition JSON

 

{

       "Aliases": [{

              "AliasName": "DaysSinceActivity",

              "Expression": "DateDiff(day, ActivityTimestamp, DateTimeUtcNow())"

       },

       {

              "AliasName": "DecayFactor",

              "Expression": "(90-DaysSinceActivity)/90"

       },

       {

              "AliasName": "AppointmentActivityPoints",

              "Expression": "Activity == 'Appointment' ? 10 : 0"

       },

       {

              "AliasName": "PhoneActivityPoints",

              "Expression": "Activity == 'Phone' ? 8 : 0"

       },

       {

              "AliasName": "ChatActivityPoints",

              "Expression": "Activity == 'Chat' ? 5 : 0"

       },

       {

              "AliasName": "EmailActivityPoints",

              "Expression": "Activity == 'Email' ? 3 : 0"

       },

       {

              "AliasName": "WebActivityPoints",

              "Expression": "Activity == 'Web' ? 2 : 0"

       },

       {

              "AliasName": "AccountId",

              "Expression": "CrossApply(AccountIds.AccountId)"

       }],

       "CalculationWindow": "Lifetime",

       "EntityType": "Interaction",

       "EntityTypeName": "Contact",

       "Expression": "DecayFactor*(AppointmentActivityPoints+PhoneActivityPoints+ChatActivityPoints+EmailActivityPoints+EmailActivityPoints)",

       "Extracts": [{

              "ExtractName": "AccountIds",

              "Expression": "TRAVERSE(ActivityPrimaryContact).TRAVERSE(ContactAccount).SELECT(AccountId)"

       }],

       "Filter": "DaysSinceActivity <= 90",

       "Function": "Sum",

       "GroupBy": ["AccountId","ContactId"],

 

First response time of chat session

This KPI computes the average time taken to provide the first response to a chat session (in minutes) in a typical customer support scenario. Imagine customers are engaging in chat sessions. You want to determine the average first response time that happens in a day by support center for a specific support category. You do this to plan for support resources and compare performance of support centers. Sessionization is a very powerful concept and it applies to any sequence of interaction that happen in time ordered fashion to capture an engagement session such as a chat session, web session or IVR session. Let’s assume the customer is collecting Chat interactions to capture the chat sessions and property ChatSessionId is used to reflect chat messages exchanged in a single session.

Let’s go through the steps to define the KPI. This KPI is defined for Chat interaction entity grouped by SupportCenterId and SupportCategoryId to provide the ability to rollup average first response time to support center or support category per the following:

KPI Definition Part
Basic information Name = AverageChatFirstResponseTime

Source = Interaction

Entity = Chat

Calculation Window = Day

Extracts None
Aliases ChatFirstResponseTime = FirstActivityInterval(ChatSessionId, ChatTimestamp)
Aggregate Function Function = AVG

Expression = ChatFirstResponseTime

Filter Conditions None
Group By SupportCenterId, SupportCategoryId

Note: FirstActivityInterval function support is not yet available in KPI definition UI. You can create a session based KPI using the rest APIs using JSON below. Refer to help links provided below on how to create a KPI using rest APIs.

 

KPI definition JSON

 

{

       "Aliases": [{

              "AliasName": "ChatFirstResponseTime",

              "Expression": "FirstActivityInterval(ChatSessionId,ChatTimestamp)"

       }],

       "CalculationWindow": "Day",

       "EntityType": "Interaction",

       "EntityTypeName": "Chat",

       "Expression": "ChatFirstResponseTime",

       "Function": "Avg",

       "GroupBy": ["SupportCenterId","SupportCategoryId"]

       "KpiName": "AverageChatFirstResponseTime"

}

 

Daily/Monthly Active Users

These KPIs are used to calculate daily or monthly active users. Let’s assume a customer is collecting PageVisited interactions capturing UserId and Pagetype and active user is defined as someone who visits pages of type either “login” or “create”. Let’s go through the steps to define the DAU and MAU KPIs.

DAU is defined as follows:

KPI Definition
Basic information Name = DAU

Source = Interaction

Entity = Chat

Calculation Window = DAY

Extracts None
Aliases None
Aggregate Function CountDistinct

Expression = UserId

Filter Conditions Pagetype ==’login’ || Pagetype == ’create’
Group By None

 

Next, we define the MAU KPI:

KPI Definition
Basic information Name = MAU

Source = Interaction

Entity = Chat

Calculation Window = Month

Extracts None
Aliases None
Aggregate Function Function = CountDistinct

Expression = UserId

Filter Conditions Pagetype ==’login’ || Pagetype == ’create’
Group By None

 

KPI definition JSON

DAU:

{

       "CalculationWindow": "Day",

       "EntityType": "Interaction",

       "EntityTypeName": "Chat",

       "Expression": "UserId",

       "Filter": "Pagetype == 'login' || Pagetype == 'create'",

       "Function": "CountDistinct",

       "KpiName": "DAU"

}




MAU:

{

       "CalculationWindow": "Month",

       "EntityType": "Interaction",

       "EntityTypeName": "Chat",

       "Expression": "UserId",

       "Filter": "Pagetype == 'login' || Pagetype == 'create'",

       "Function": "CountDistinct",

       "KpiName": "MAU"

}

 

These examples illustrate the powerful capabilities of the KPI engine to implement real world scenarios to compute various metrics. The value lies in being able to use these KPIs in driving intelligent customer engagement as part of Dynamics 365 processes or any other operational system to improve the customer experience. For this purpose, DCI has an export connector available with the July 2017 update to extract the output value of the KPIs to Azure blob storage. These can then be synchronized to any operational system to augment processes with any automation or enhanced business logic.

KPIs computed with DCI can also be extracted to Power BI with the Power BI connector available with the July 2017 update for interactive exploration of KPI aggregated data using a Power BI report. Refer to blogpost Analyzing DCI data with Power BI for details on how to do it.

Useful Links

 

 

– Narinder Singh

Principal Program Manager

Dynamics 365 Customer Engagement