Create or Update KPI (ARM)

[This topic is pre-release documentation and is subject to change.]

Creates a new or updates an existing KPI in a Customer Insights Hub.


The request is constructed as follows:

HTTP Verb Request URI

URI Parameters

URI Parameter Required Description
subId Yes The Azure subscription ID
rgName Yes The resource group name
hubName Yes Name of your Customer Insights Hub
KpiName Yes The name of the KPI to create or update.

Request Body

A JSON object describing a KPI, for example:

    "entityType": "Profile",
    "entityTypeName": "testProfile2327128",
    "displayName": {
        "en-us": "Kpi DisplayName"
    "description": {
        "en-us": "Kpi Description"
    "calculationWindow": "Day",
    "function": "Sum",
    "expression": "SavingAccountBalance",
    "unit": "unit",
    "groupBy": ["SavingAccountBalance"],
    "thresHolds": {
        "lowerLimit": 5.0,
        "upperLimit": 50.0,
        "increasingKpi": true
    "aliases": [{
        "aliasName": "alias",
        "expression": "Id+4"


The response includes an HTTP status code and a standard set of response headers. Upon success, the body will contain information about the newly created KPI in the following form:

    "id": <kpiUrl>, 
    "name": <kpiName>, 
    "type": "Microsoft.CustomerInsights/hubs/kpi", 
    "properties": { <kpiProperties> }

Status Code

  • 200 (OK) - the update request completed successfully. The provisioningState property in the response body is set to 'Succeeded' when the provisioning finishes.
  • 400 (Bad Request) - The display name or definition contains invalid JSON.