Pre-check is a mechanism that can be used by the developers of a Service Manager for covering business flows/gaps that interworks.cloud platform does not support. Such scenarios could be not to allow the customer to purchase the same product for a second time or not to allow him to purchase product A unless he has purchased first product B.
You will not need to implement new endpoints, you will need only to define which endpoints require a pre-check action. When an endpoint runs on “precheck” mode, no provisioning actions should be executed and the process will continue only if our platform gets no error from the precheck call.
Define the Pre-Check End Points
You can define for which endpoints (actions) precheck will be performed via BSS Setup > Service Manager > Edit integration > “Pre Check”. If a specific endpoint is not filled in in this list, then no precheck is performed for this action.
Understanding the Pre-Check Mechanism
For the endpoints that support pre-check action, the following procedure is followed:
We first make a "precheck" call to the service manager by setting the parameter "checkonly:true" to get any errors that might be returned from the service manager.
If no error occurs, we proceed with the actual call by calling the endpoint with the parameter "checkonly:false".
If a "precheck" action returns an error, we display that error, and we do not proceed to any other call.
So, for the endpoints that support pre-check, you need to implement two modes:
When we pass the parameter checkonly=true, your implementation must check only if the business rules you want to enforce are valid or not.
When we pass the parameter checkonly=false, your implementation must do the actual provisioning.
End Points that Support Pre-Check
Pre-check can be activated in the following endpoints:
Trigger Events for the Pre-check actions in BSS
For subscriptions that are supported by your Service Manager, the following actions that are performed by a BSS user trigger the precheck calls:
Creation of a new subscription → precheck of the “Subscription Create” endpoint
Creation of a new trial subscription → precheck of the “Subscription Create” endpoint
Saving an existing subscription → precheck of the “Subscription Update” endpoint
Suspension of an active subscription → precheck of the “Subscription Suspend” endpoint
Cancellation of an active subscription → precheck of the “Subscription Cancel” endpoint
Increase or decrease of subscription quantity → precheck of the “Subscription Update” endpoint
Addition of a new addon → precheck of the “Addon Create” endpoint
Increase or decrease of addon quantity → precheck of the “Addon Update” endpoint
Cancellation of an addon → precheck of the “Addon Cancel” endpoint
Trigger Events for the Pre-check actions in Storefront
All the precheck actions are executed during the basket checkout. Depending on the “nature” of the basket items (if it is a new service, extra licenses for an existing, purchase of add-ons, etc.), the appropriate precheck action will be called.