# Customer Churn Prediction Activity

Averroes Customer churn prediction activity enables you to predict your customers' churn status using the churn model trained on your data directly from UiPath easily without any required coding.

In this tutorial, we will go with detailed steps on how to use this activity:

* Assuming you already have a project, create a new sequence:

![](/files/-MQrGfrD4x_u4EaSbMAO)

* If you haven’t downloaded the packages, download them. Afterwards, search for customer churn prediction activity

![](/files/-MQrLyG0hiUjJjD728L4)

First, let's explore the details of this activity:

![](/files/-MUIXrpULDDyf9HozFBn)

**Authentication:** On the right-hand side (properties panel); you should fill in your Averroes account info: **Email** and **Password&#x20;*****without quotations.***

**Input:**

* **Data  File:** path of the file contains the data you want to predict its churn status.
  * Data should be in Tabular (structured in CSV format)&#x20;
  * In the same format of the dataset file used in training the model. The only exception is, that the prediction file doesn't contain the churn status column.
* **Config ID:** Config ID generated from training the churn model on your data.
* **Model ID:** Model ID generated from training the churn model on your data.

**From where to get Conig ID and Model ID:**

* The email sent to you after your training completed successfully
* Your account on Averroes (link of the desired training will sent also in the email), as the following figure shows:

![](/files/-MQrelZIB-cv_Q41OB0V)

Where your training execution is listed here with its settings and performance results. If you click on the Test button, it will redirect you to the prediction tab, where you can test prediction of one sample, in addition to the integration section, which provides to you the Config ID and Model ID generated from this training execution.

![](/files/-MQrgkRGqc-vm3BCg0gB)

**Output:**

* **Message**: a message that indicates the status of the prediction; success, failure, etc

### Now, how to use the activity?!

* Fill in the email and the password in the authentication section without quotations.
* To prevent errors that may be produced from using an absolute path, it's better to use the built-in UiPath activity "Select File" which is more user friendly.&#x20;
* As a UiPath user, it's assumed that creating new variables to store output values is familiar to you. Otherwise, follow these steps:
  * Add the "Select File" activity, and select it.
  * From its properties window, click on the **"+"** icon beside **selectedFile** in Output section, then choose **"Create Variable".** Write a unique variable name (ex; predictionFilePath) to store the selected file path, in order to use as input to the Data File in Customer churn prediction activity.
* Fill Config ID and Model ID.
* Store the customer churn prediction activity output message in a variable, in the same way we did previously.
* Use the built-in UiPath activity "Message Box" to show the message of the churn prediction activity.
* Once you hit Run, the sequence will start execution by showing a pop-up window asking you to select the data file:&#x20;

![](/files/-MQrhqgC_lNzBJV3YjDq)

* If you're in Debug mode, log messages will appear on the right-hand side panel during the execution.
* After the execution is completed successfully, the following message will be shown:

![](/files/-MQrhv2dH73Vu1v4TVlW)

* That's great, lets check the created file:

![](/files/-MQrhyvpaw1UdEQtcn-f)

If you open the file, you will notice the two columns:

![](/files/-MQroHff393dr4lbObM2)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://uipathlearn.averroes.ai/averroes-uipath-integration/customer-churn-package/customer_churn_predict.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
