---
schema_version: "1"
id: 32609ad0ecac5888c163d696949a5f73f7a1160b714d035927e77d3daa73aefb
title: Configure a Use Case for Churn Prediction
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/comms_configure_a_use_case.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.comms_configure_a_use_case.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: fe10ef00918346ce84b2913f7e2b1c2f3a92514cbd105ea4500b65966eda4113
description: Select the machine learning models and feature extractors that you want to use for predicting real-time churn. You can save computed features and prediction results in records.
products:
  - Communications
release: "264"
---
# Configure a Use Case for Churn Prediction

Select the machine learning models and feature extractors that you want to use for predicting real-time churn. You can save computed features and prediction results in records.

1. From Setup, in the Quick Find box, enter AI Accelerator, and then select **AI Accelerator**.
2. On the ChurnPredictionRealTime row, click **Edit**.
    
    For information about configuring use cases, see [Configure Your Use Case](https://help.salesforce.com/s/articleView?id=ind.ai_accelerator_configure_usecases.htm&type=5&language=en_US).
3. If you want to save the computed features, the prediction score, insights about the prediction score, and suggestions to improve the prediction score, select **Customer Interaction** as the primary response object.
    
    After you map all the required fields of the object, the computed features and prediction results are stored in the Customer Interaction object as per specified field mappings.
4. If you want to configure a real-time feature extractor, select **Minimize\_Subscription\_Churn\_Customer\_Interaction** as the model and select **RealtimeCaseFeatureExtractor** as the Apex class.
    
    To see the sample code of the RealtimeCaseFeatureExtractor Apex class, from Setup, in the Quick Find box, enter Apex, and then select **Apex Classes**. Open the RealtimeCaseFeatureExtractor class.
    
    The RealtimeCaseFeatureExtractor Apex class computes case-related features based on the latest case records.

The churn score that’s used to get recommendations is generated by the AI Accelerator Predictions API. The call to the AI Accelerator Predict API is made by using the Get Churn Score Apex action. The Get Churn Score Apex action uses the class SampleGetChurnScore in the SFI-NBARecommendationFlow. You can replace or extend the SampleGetChurnScore class. To see the sample code of this class, from Setup, in the Quick Find box, enter Apex, and then select **Apex Classes**. Open the SampleGetChurnScore class.