---
schema_version: "1"
id: 38e1aee7474395ddff3ca0318d53fbfeb7f194c4b3522b33c425a13cc70ce40f
title: Train Predictive Model with Customized CSI Score Semantic Model
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/analytics/264-0-0/csi_score_predictive_training.md
canonical_url: https://help.salesforce.com/s/articleView?id=analytics.csi_score_predictive_training.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 1d48e067e1f17daa83189e17748fe0afbc85872381ad71dcbb272ae681f320d4
description: During CSI Score installation, the predictive models are trained automatically with synthetic data. This training doesn't consider any company-specific nuances, such as additional KPIs or updates to composite score calculation logic. After your company's custom CSI Score semantic model is ready with company-specific scores, weights, and formulas, retrain the predictive models with actual data. And set a training schedule for the updated models.
products:
  - Cross Cloud
release: "264"
---
# Train Predictive Model with Customized CSI Score Semantic Model

During CSI Score installation, the predictive models are trained automatically with synthetic data. This training doesn't consider any company-specific nuances, such as additional KPIs or updates to composite score calculation logic. After your company's custom CSI Score semantic model is ready with company-specific scores, weights, and formulas, retrain the predictive models with actual data. And set a training schedule for the updated models.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col style="width:100%"></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;"><a href="https://help.salesforce.com/s/articleView?id=analytics.csi_score_learn_requirements.htm&amp;release=264.0.0&amp;type=5" title="Learn about the Salesforce editions, products, and licenses required for CSI Score.">View supported editions</a></td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d7872e63">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d7872e63 ">To manage data for predictive models:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d7872e63 ">Data Cloud Architect permission set</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d7872e63 ">To manage predictive models:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d7872e63 ">Allow users to manage models in Einstein Studio</td>

          </tr>
        </tbody>
      </table>

Before customizing the predictive models, make sure the company's custom CSI Score semantic model is finalized and ready. The predictive models use resources from the semantic model to identify which KPIs have the highest statistical leverage. See [Customize CSI Score](https://help.salesforce.com/s/articleView?id=analytics.csi_score_customisation.htm&release=264.0.0&type=5 "Customize and extend CSI Score based on the company's priority metrics and KPIs, scoring logic, and visualization preferences. Admins or analysts can add new scores, update the data source for scores, enhance the scoring logic, calculations, and weights, and customize visualizations. Modify metric weights to change the influence of specific scores, such as increasing the weight of the Sentiment Score from 0.5 to 0.7. Add new KPIs to integrate proprietary metrics such as custom churn probability, or customize dashboards to enhance the visual layout for specific business needs.").

To include new composite KPIs in their respective predictive models, make sure that the KPIs have at least 400 records to train the model.

## Prepare Dataset for Predictive Model Training

1. Use the [Semantic Query API](https://developer.salesforce.com/docs/data/semantic-layer/guide/query-api.html) to retrieve the details of your CSI Score semantic model.
    
    Example payload for the installed CSI Score semantic model:
    
    ```
    {
      "structuredSemanticQuery": {
        "fields": [
          {
            "expression": {
              "tableField": {
                "name": "Account_Id",
                "tableName": "Account"
              }
            },
            "alias": "Account.Account_Id",
            "rowGrouping": true
          },
          {
            "expression": {
              "tableField": {
                "name": "DateDimSQLSDO_Date_SQL",
                "tableName": "DateDimSQL"
              }
            },
            "alias": "Snapshot_Date",
            "rowGrouping": true
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Average_Pipeline_Velocity_Normalized_clc"
              }
            },
            "alias": "CCSI_Average_Pipeline_Velocity_Normalized_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Campaign_to_Opportunity_Contribution_Normalized_clc"
              }
            },
            "alias": "CCSI_Campaign_to_Opportunity_Contribution_Normalized_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Campaign_to_Revenue_Contribution_Normalized_clc"
              }
            },
            "alias": "CCSI_Campaign_to_Revenue_Contribution_Normalized_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Case_Resolution_Speed_Normalized_clc"
              }
            },
            "alias": "CCSI_Case_Resolution_Speed_Normalized_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Churn_Risk_Index_Score_clc"
              }
            },
            "alias": "CCSI_Churn_Risk_Index_Score_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Customer_Health_Score_clc"
              }
            },
            "alias": "CCSI_Customer_Health_Score_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Customer_Lifetime_Value_Score_clc"
              }
            },
            "alias": "CCSI_Customer_Lifetime_Value_Score_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Engagement_Effectiveness_Score_clc"
              }
            },
            "alias": "CCSI_Engagement_Effectiveness_Score_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_FSvc_Customer_Health_Score_clc"
              }
            },
            "alias": "CCSI_FSvc_Customer_Health_Score_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_FSvc_Engagement_Effectiveness_Score_clc"
              }
            },
            "alias": "CCSI_FSvc_Engagement_Effectiveness_Score_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_FSvc_Journey_Experience_Score_clc"
              }
            },
            "alias": "CCSI_FSvc_Journey_Experience_Score_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_FSvc_Operations_Score_clc"
              }
            },
            "alias": "CCSI_FSvc_Operations_Score_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_FTFR_Normalized_clc"
              }
            },
            "alias": "CCSI_FTFR_Normalized_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Fsvc_Behaviour_Score_clc"
              }
            },
            "alias": "CCSI_Fsvc_Behaviour_Score_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Journey_Experience_Score_clc"
              }
            },
            "alias": "CCSI_Journey_Experience_Score_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Lead_to_Oppty_Ratio_Normalized_clc"
              }
            },
            "alias": "CCSI_Lead_to_Oppty_Ratio_Normalized_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Mixed_Sentiment_Normalized_clc"
              }
            },
            "alias": "CCSI_Mixed_Sentiment_Normalized_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Mktg_Behaviour_Score_clc"
              }
            },
            "alias": "CCSI_Mktg_Behaviour_Score_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Mktg_Churn_Risk_Index_Score_clc"
              }
            },
            "alias": "CCSI_Mktg_Churn_Risk_Index_Score_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Mktg_Customer_Health_Score_clc"
              }
            },
            "alias": "CCSI_Mktg_Customer_Health_Score_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Mktg_Engagement_Effectiveness_Score_clc"
              }
            },
            "alias": "CCSI_Mktg_Engagement_Effectiveness_Score_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Mktg_Journey_Experience_Score_clc"
              }
            },
            "alias": "CCSI_Mktg_Journey_Experience_Score_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Mktg_Operations_Score_clc"
              }
            },
            "alias": "CCSI_Mktg_Operations_Score_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Mktg_Revenue_Health_Score_clc"
              }
            },
            "alias": "CCSI_Mktg_Revenue_Health_Score_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Mobile_Engagement_Activities_Normalized_clc"
              }
            },
            "alias": "CCSI_Mobile_Engagement_Activities_Normalized_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Mobile_Engagement_Bounce_Events_Normalized_clc"
              }
            },
            "alias": "CCSI_Mobile_Engagement_Bounce_Events_Normalized_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Mobile_Engagement_Negative_Interactions_Normalized_clc"
              }
            },
            "alias": "CCSI_Mobile_Engagement_Negative_Interactions_Normalized_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Monthly_Recurring_Revenue_Normalized_clc"
              }
            },
            "alias": "CCSI_Monthly_Recurring_Revenue_Normalized_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Negative_Sentiment_Normalized_clc"
              }
            },
            "alias": "CCSI_Negative_Sentiment_Normalized_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Neutral_Sentiment_Normalized_clc"
              }
            },
            "alias": "CCSI_Neutral_Sentiment_Normalized_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Open_Support_Cases_Normalized_clc"
              }
            },
            "alias": "CCSI_Open_Support_Cases_Normalized_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Operations_Score_clc"
              }
            },
            "alias": "CCSI_Operations_Score_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Positive_Sentiment_Normalized_clc"
              }
            },
            "alias": "CCSI_Positive_Sentiment_Normalized_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Ratio_For_Total_Work_Orders_Closed_and_Created_Normalized_clc"
              }
            },
            "alias": "CCSI_Ratio_For_Total_Work_Orders_Closed_and_Created_Normalized_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Ratio_for_Total_Cases_Closed_Created_Normalized_clc"
              }
            },
            "alias": "CCSI_Ratio_for_Total_Cases_Closed_Created_Normalized_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Rev_Behaviour_Score_clc"
              }
            },
            "alias": "CCSI_Rev_Behaviour_Score_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Rev_Churn_Risk_Index_Score_clc"
              }
            },
            "alias": "CCSI_Rev_Churn_Risk_Index_Score_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Rev_Customer_Health_Score_clc"
              }
            },
            "alias": "CCSI_Rev_Customer_Health_Score_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Rev_Customer_Lifetime_Value_Score_clc"
              }
            },
            "alias": "CCSI_Rev_Customer_Lifetime_Value_Score_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Rev_Revenue_Health_Score_clc"
              }
            },
            "alias": "CCSI_Rev_Revenue_Health_Score_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Revenue_Health_Score_clc"
              }
            },
            "alias": "CCSI_Revenue_Health_Score_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Revenue_at_Risk_Normalized_clc"
              }
            },
            "alias": "CCSI_Revenue_at_Risk_Normalized_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Sales_Behaviour_score_clc"
              }
            },
            "alias": "CCSI_Sales_Behaviour_score_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Sales_Engagement_Effectiveness_Score_clc"
              }
            },
            "alias": "CCSI_Sales_Engagement_Effectiveness_Score_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Sales_Journey_Experience_Score_clc"
              }
            },
            "alias": "CCSI_Sales_Journey_Experience_Score_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Sales_Revenue_Health_Score_clc"
              }
            },
            "alias": "CCSI_Sales_Revenue_Health_Score_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Sentiment_Score_clc"
              }
            },
            "alias": "CCSI_Sentiment_Score_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Svc_Behaviour_Score_clc"
              }
            },
            "alias": "CCSI_Svc_Behaviour_Score_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Svc_Customer_Health_Score_clc"
              }
            },
            "alias": "CCSI_Svc_Customer_Health_Score_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Svc_Engagement_Effectiveness_Score_clc"
              }
            },
            "alias": "CCSI_Svc_Engagement_Effectiveness_Score_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Svc_Journey_Experience_Score_clc"
              }
            },
            "alias": "CCSI_Svc_Journey_Experience_Score_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Svc_Operations_Score_clc"
              }
            },
            "alias": "CCSI_Svc_Operations_Score_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Total_Complaints_Raised_By_Users_Normalized_clc"
              }
            },
            "alias": "CCSI_Total_Complaints_Raised_By_Users_Normalized_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Total_Opportunities_Win_Rate_Normalized_clc"
              }
            },
            "alias": "CCSI_Total_Opportunities_Win_Rate_Normalized_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Total_Orders_Created_Normalized_clc"
              }
            },
            "alias": "CCSI_Total_Orders_Created_Normalized_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Total_Renewal_Orders_Normalized_clc"
              }
            },
            "alias": "CCSI_Total_Renewal_Orders_Normalized_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Total_Revenue_Normalized_clc"
              }
            },
            "alias": "CCSI_Total_Revenue_Normalized_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Upsell_Cross_Sell_Identified_During_Visits_Normalized_clc"
              }
            },
            "alias": "CCSI_Upsell_Cross_Sell_Identified_During_Visits_Normalized_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Whatsapp_Failed_Deliveries_Normalized_clc"
              }
            },
            "alias": "CCSI_Whatsapp_Failed_Deliveries_Normalized_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Won_Closed_Opportunities_Normalized_clc"
              }
            },
            "alias": "CCSI_Won_Closed_Opportunities_Normalized_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          },
          {
            "expression": {
              "semanticField": {
                "name": "CCSI_Work_Order_Volume_Normalized_clc"
              }
            },
            "alias": "CCSI_Work_Order_Volume_Normalized_clc",
            "rowGrouping": false,
            "semanticAggregationMethod": "SEMANTIC_AGGREGATION_METHOD_AUTO"
          }
        ],
        "topNFilter": {
          "rowsNumber": 100,
          "sortOrders": [
            {
              "simpleSortOrder": {
                "sortByFieldAlias": "Account.Account_Id",
                "sortingOrder": "ASC"
              }
            }
          ]
        },
        "options": {
          "limitOptions": {
            "limit": 10001
          },
          "sortOrders": [
            {
              "simpleSortOrder": {
                "sortByFieldAlias": "Account.Account_Id",
                "sortingOrder": "ASC"
              }
            }
          ],
          "grandTotal": true
        }
      },
      "semanticModelId": "2SMLTXXXXXXXXXX4AQ"
    }
    ```
2. Convert the Semantic Query API's response into a .csv file.
    
    The .csv file is used to train the predictive models.
    
    Use a custom process to convert the API's JSON-based response into a .csv file.
    
    For example, use these resources to create the .csv file by using Python.<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
              <colgroup>
                <col style="width:33.33333333333333%">
                <col style="width:33.33333333333333%">
                <col style="width:33.33333333333333%">
              </colgroup>
              <thead class="slds-text-title_caps ">
                <tr class="">
                  <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d7872e168">Resource</th>
                  <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d7872e171">Use</th>
                  <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d7872e174">Sample Resource</th>
                </tr>
              </thead>
              <tbody>
                <tr class="">
                  <td data-label="Resource" class="slds-cell-wrap" style="vertical-align:top;" headers="d7872e168 ">API response JSON</td>

                  <td data-label="Use" class="slds-cell-wrap" style="vertical-align:top;" headers="d7872e171 ">
                    <p>Store the API's response in a .json file.</p>
                    <p style="margin-bottom:0;">The sample contains a partial
                      response of the API as reference.</p>
                  </td>

                  <td data-label="Sample Resource" class="slds-cell-wrap" style="vertical-align:top;" headers="d7872e174 ">
                    <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x"><code>{
  "queryResults": {
    "queryMetadata": {
      "fields": {
        "Account.Account_Id": {
          "placeInOrder": 0,
          "type": "VARCHAR",
          "semanticType": { "semanticDimensionType": "SEMANTIC_DIMENSION_TYPE_TEXT" }
        },
        "DateDimSQL.DateDimSQLSDO_Date_SQL": {
          "placeInOrder": 1,
          "type": "DATE",
          "semanticType": { "semanticDimensionType": "SEMANTIC_DIMENSION_TYPE_DATE" }
        },
        "CCSI_Whatsapp_Failed_Deliveries_Normalized_clc": {
          "placeInOrder": 2,
          "type": "NUMERIC",
          "semanticType": { "semanticMeasurementType": "SEMANTIC_MEASUREMENT_TYPE_NUMBER" }
        },
        "CCSI_FTFR_Normalized_clc": {
          "placeInOrder": 3,
          "type": "NUMERIC",
          "semanticType": { "semanticMeasurementType": "SEMANTIC_MEASUREMENT_TYPE_NUMBER" }
        },
        "is_data_row__sl": {
          "placeInOrder": 9,
          "type": "BOOLEAN",
          "semanticType": { "semanticSystemType": "SEMANTIC_TYPE_AUTOGENERATED" }
        }
      }
    },
    "queryData": {
      "rows": [
        {
          "values": [ null, null, 3.09, 53.08, false ]
        },
        {
          "values": [ "001LT00000kAigPYAS", "2026-01-24", 0, null, true ]
        },
        {
          "values": [ "001LT00000kAigQYAS", "2026-04-20", null, null, true ]
        },
        {
          "values": [ "001LT00000kAigRYAS", "2026-05-24", 0, 12.5, true ]
        }
      ]
    }
  },
  "status": "SUCCESS"
}</code></pre>
                  </td>

                </tr>
                <tr class="">
                  <td data-label="Resource" class="slds-cell-wrap" style="vertical-align:top;" headers="d7872e168 ">Mapping JSON</td>

                  <td data-label="Use" class="slds-cell-wrap" style="vertical-align:top;" headers="d7872e171 ">
                    <p>Maps fields from the semantic model to fields of the .csv file</p>
                    <p style="margin-bottom:0;">The
                      sample lists fields from the installed semantic model. Change the mappings
                      based on your company's semantic model.</p>
                  </td>

                  <td data-label="Sample Resource" class="slds-cell-wrap" style="vertical-align:top;" headers="d7872e174 ">
                    <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x"><code>{
    "Account.Account_Id": "Account_Id",
    "DateDimSQL.DateDimSQLSDO_Date_SQL": "DateDimSQL",
    "CCSI_VoC_Score_clc": "CCSI_VoC_Score",
    "CCSI_Sentiment_Score_clc": "CCSI_Sentiment_Score",
    "CCSI_Journey_Experience_Score_clc": "CCSI_Journey_Experience_Score",
    "CCSI_Engagement_Effectiveness_Score_clc": "CCSI_Engage_Effectiveness_Score",
    "CCSI_Revenue_Health_Score_clc": "CCSI_Revenue_Health_Score",
    "CCSI_Operations_Score_clc": "CCSI_Operations_Score",
    "CCSI_Customer_Health_Score_clc": "CCSI_Customer_Health_Score",
    "CCSI_Churn_Risk_Index_Score_clc": "CCSI_Churn_Risk_Index_Score",
    "CCSI_Customer_Lifetime_Value_Score_clc": "CCSI_Customer_Lifetime_Value_Score",
    "CCSI_Mobile_Engagement_Bounce_Events_Normalized_clc": "CCSI_Mobile_Eng_Bounce_Events_Norm",
    "CCSI_Case_Resolution_Speed_Normalized_clc": "CCSI_Case_Res_Speed_Norm",
    "CCSI_Sales_Cloud_CSAT_Normalized_clc": "CCSI_Sales_Cloud_CSAT_Normalized",
    "CCSI_Mixed_Sentiment_Normalized_clc": "CCSI_Mixed_Sentiment_Normalized",
    "CCSI_Service_Cloud_NPS_Normalized_clc": "CCSI_Service_Cloud_NPS_Normalized",
    "CCSI_Positive_Sentiment_Normalized_clc": "CCSI_Positive_Sentiment_Normalized",
    "CCSI_Total_Revenue_Normalized_clc": "CCSI_Total_Revenue_Normalized",
    "CCSI_Open_Support_Cases_Normalized_clc": "CCSI_Open_Support_Cases_Normalized",
    "CCSI_Field_Service_CSAT_Normalized_clc": "CCSI_Field_Service_CSAT_Normalized",
    "CCSI_Marketing_Cloud_CSAT_Normalized_clc": "CCSI_Marketing_Cloud_CSAT_Normalized",
    "CCSI_Ratio_for_Total_Cases_Closed_Created_Normalized_clc": "CCSI_Ratio_Cases_Closed_Created_Norm",
    "CCSI_Campaign_to_Revenue_Contribution_Normalized_clc": "CCSI_Campaign_Revenue_Contrib_Norm",
    "CCSI_Revenue_Cloud_CSAT_Normalized_clc": "CCSI_Revenue_Cloud_CSAT_Normalized",
    "CCSI_Total_Complaints_Raised_By_Users_Normalized_clc": "CCSI_Total_Complaints_By_Users_Norm",
    "CCSI_Average_Pipeline_Velocity_Normalized_clc": "CCSI_Avg_Pipeline_Vel_Norm",
    "CCSI_Lead_to_Oppty_Ratio_Normalized_clc": "CCSI_Lead_to_Oppty_Ratio_Norm",
    "CCSI_Negative_Sentiment_Normalized_clc": "CCSI_Negative_Sentiment_Normalized",
    "CCSI_Revenue_at_Risk_Normalized_clc": "CCSI_Revenue_at_Risk_Normalized",
    "CCSI_Marketing_Cloud_NPS_Normalized_clc": "CCSI_Marketing_Cloud_NPS_Normalized",
    "CCSI_Mobile_Engagement_Activities_Normalized_clc": "CCSI_Mobile_Engage_Activities_Norm",
    "CCSI_Total_Orders_Created_Normalized_clc": "CCSI_Total_Orders_Created_Norm",
    "CCSI_Ratio_Open_Closed_Cases_Normalized_clc": "CCSI_Ratio_WO_Closed_Created_Norm",
    "CCSI_FTFR_Normalized_clc": "CCSI_FTFR_Normalized",
    "CCSI_Total_Opportunities_Win_Rate_Normalized_clc": "CCSI_Total_Opptys_Win_Rate_Norm",
    "CCSI_Sales_Cloud_NPS_Normalized_clc": "CCSI_Sales_Cloud_NPS_Normalized",
    "CCSI_Upsell_Cross_Sell_Identified_During_Visits_Normalized_clc": "CCSI_Upsell_Cross_Sell_Visits_Norm",
    "CCSI_Total_Renewal_Orders_Normalized_clc": "CCSI_Total_Renewal_Orders_Norm",
    "CCSI_Neutral_Sentiment_Normalized_clc": "CCSI_Neutral_Sentiment_Normalized",
    "CCSI_Field_Service_NPS_Normalized_clc": "CCSI_Field_Service_NPS_Normalized",
    "CCSI_Revenue_Cloud_NPS_Normalized_clc": "CCSI_Revenue_Cloud_NPS_Normalized",
    "CCSI_Work_Order_Volume_Normalized_clc": "CCSI_Work_Order_Volume_Normalized",
    "CCSI_Won_Closed_Opportunities_Normalized_clc": "CCSI_Won_Closed_Opportunities_Norm",
    "CCSI_Campaign_to_Opportunity_Contribution_Normalized_clc": "CCSI_Campaign_Oppty_Contrib_Norm",
    "CCSI_Monthly_Recurring_Revenue_Normalized_clc": "CCSI_Monthly_Recurring_Revenue_Norm",
    "CCSI_Mobile_Engagement_Negative_Interactions_Normalized_clc": "CCSI_Mobile_Engage_Ng_Interact_Norm",
    "CCSI_Service_Cloud_CSAT_Normalized_clc": "CCSI_Service_Cloud_CSAT_Normalized__c"
}</code></pre>
                  </td>

                </tr>
                <tr class="">
                  <td data-label="Resource" class="slds-cell-wrap" style="vertical-align:top;" headers="d7872e168 ">Python script</td>

                  <td data-label="Use" class="slds-cell-wrap" style="vertical-align:top;" headers="d7872e171 ">Uses the mapping JSON to convert the API's response to a .csv
                    file.</td>

                  <td data-label="Sample Resource" class="slds-cell-wrap" style="vertical-align:top;" headers="d7872e174 ">
                    <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x"><code>import pandas as pd, numpy as np, json

with open('semanticQueryResponse.json', 'r') as f:
    data = json.load(f)

fields = data["queryResults"]["queryMetadata"]["fields"]

cols = [k for k, v in sorted(fields.items(), key=lambda x: x[1]["placeInOrder"])]     # sort columns based on 'placeInOrder'
drop_cols = [k for k, v in fields.items() if v.get("semanticType", {}).get("semanticSystemType") == "SEMANTIC_TYPE_AUTOGENERATED"]   # Identify autogenerated columns to drop

rows = [[np.nan if v is None else v for v in r["values"]] 
        for r in data["queryResults"]["queryData"]["rows"]]

with open('mapping.json', 'r') as file:
    field_name_mapping = json.load(file)

df = pd.DataFrame(rows, columns=cols).drop(columns=drop_cols).rename(columns=field_name_mapping)        # drop autogenerated columns and rename the columns that exist in both semanticQueryResponse and the mapping
df.to_csv('output_data.csv', index=False)</code></pre>
                  </td>

                </tr>
              </tbody>
            </table>

## Update Dataset and Data Model Object (DMOs) Mappings for Predictive Model Training

1. In the installed CSI Score DS data stream, upload the .csv file of the dataset.
    
    See [Data Stream Updates Using File Upload](https://help.salesforce.com/s/articleView?id=data.c360_a_upload_a_csv_file_update_data_stream.htm&language=en_US).
2. Refresh the data stream.
    
    See [Data Stream Settings and Refresh Modes](https://help.salesforce.com/s/articleView?id=data.c360_a_data_stream_edit_settings.htm&language=en_US).
3. In the installed CSIScore Top Drivers Input data model object (DMO), map fields of the company-specific KPIs from the semantic model that you want to use for model training.
    
    If the semantic model doesn't include new KPIs, you can ignore this step.
    
    See [Edit Data Model Object Properties](https://help.salesforce.com/s/articleView?id=data.c360_a_data_model_object_properties.htm&language=en_US).

## Update Predictive Models with New KPIs

1. From the AI Models tab, open the installed predictive model for a composite score that has new KPIs.
2. Edit the model and add the new KPIs as model variables.
    
    See [Create a Model from Scratch](https://help.salesforce.com/s/articleView?id=data.c360_a_ai_ec_create_model_steps.htm&language=en_US).
3. Save and activate the predictive model version.
4. Update the training schedule of the predictive model.
5. Repeat steps 1–4 for the remaining composite scores that have new KPIs.