Service Specification¶
Executive Summary¶
The Paystone churn service is a machine learning service that can be used to predict the churn probability of a client with a merchant ID (Mid).
This service provides internal benefit as it allows Paystone to know companies who may churn before it happens, giving Paystone the opportunity to take measures to prevent churn.
Related Objectives and Key Results (OKRs)¶
The main objective for this churn prediction service is to reduce merchant churn. By enabling Paystone to be aware of merchants who churn in advance of them churning, steps can be taken to reach out to the merchants and attempt to prevent them from churning.
Value to Growth Platform¶
N/A
Service Level Agreements (SLAs)¶
Throughput¶
Maximum concurrent requests: 1
Expected requests per batch: 7-10
Expected time between batch of requests: 2 weeks
Latency¶
Median: 150 seconds
95th Percentile: 200 seconds
99th Percentile: 240 seconds
Worst Case Latency: 359 seconds
Notes¶
The Paystone churn service is unique in two ways. Firstly, this service is intended to be called with batches of Mids on a set schedule as opposed to a continuous steady stream of calls being made. This is due to the fact that a churn prediction of a merchant is not anticipated to change often, and so it would be unreasonable to run a prediction on a merchant more often than once every two weeks. This is especially true as there isn't an action that could be considered a "prompt" for the service to be run on a merchant, meaning that the point in time the service is called on a Merchant is arbitrary, so it is logical to call the service on batches of merchants at predetermined intervals, and the service has been designed for such.
Secondly, due to the fact that intensive calculations and aggregations take place on the most recent merchant data each time the service is called on a Mid (or batch of mids), the service will not return a response near-instantaneously like other ML services since it will need some time to pre-process the available raw data into a form that that can be fed into the model.
Schema¶
A POST request must be submitted to the API. The defined schema of this service is:
-Instance - ID: merchant_id Description: The merchant identifier (Mid) of the company whose churn probability should be predicted. Data Type: String Runtime Restrictions: - Must be a currently existing PAY product customer -Parameters - ID: testing Description: A parameter to indicate whether a test request is being sent. Users should always set it to False. Data Type: Boolean Runtime Restrictions: - None -Prediction - ID: merchant_id Description: The merchant identifier (Mid) of the company whose churn probability was predicted. Data Type: String Runtime Restrictions: - None - ID: prediction_id Description: A unique identifier for each prediction instance used for logging. The value maps to the table in BigQuery and can be ignored by users. Data Type: String Runtime Restrictions: - None - ID: churn_probability Description: The probability that the given Mid will churn. Data Type: Float Runtime Restrictions: - Each value must be between 0 and 1, inclusive.
Feedback Mechanisms¶
The data points that will be used to improve the service are: * Each predicted churn probability of a merchant * The date and time that each prediction was made * The churn state (churned or active) of the corresponding merchant throughout time.
Using these data points we will be able to understand how accurate the model was in predicting a churned merchant depending on the prediction made, and the events that came to pass (whether the merchant churned or not). We will also be able to optimize the time duration for which a prediction is most valid, allowing usage strategies to be generated based on empirical data.