SWAP Subscriber Resource
The CRM / Ordering system updates a Resource on the Subscriber in the OCS.io via the RESTful API. The Resource identifies usage of the Subscriber in the OCS.io. In Telco world, typically MSISDN, IMSI, but may also be Username, E-Mail, etc. By term SWAP is meant, that old Resource will not be used any more and new comes effective.
The request body contains old and new Resource details. The OCS.io updates the instance of the Resource, then returns Business Transaction containing updated Resource as a payload of the response. Other systems may be notified about the Business Transaction via the Streaming Platform.
Basic Flow
Step | Actor | Action | Description |
---|---|---|---|
1. |
CRM / Ordering |
Call swapSubscriberResource API |
CRM / Ordering system calls Swap Subscriber’s Resource API exposed by OCS.io. |
2. |
OCS.io |
Request Validations |
OCS.io validates Request whether all mandatory attributes are populated, all data types are valid, ENUMs match with definition, etc. Additionally, OCS.io validates Request against Business Logic. This typically includes, that referenced entity exists in the system, entity has proper state, etc. |
3. |
OCS.io |
Perform Business Logic |
OCS.io performs Business Logic implemented for the Use-Case. |
4. |
OCS.io |
Publish Business Transaction |
OCS.io publishes zero to many messages to Streaming Platform that impacted entities have been changed. |
5. |
OCS.io |
Return swapSubscriberResource Response |
OCS.io returns Response to the CRM / Ordering System. |
6. |
DWH |
Subscribe for Business Transactions |
DWH subscribes for Business Transactions to be delivered by Streaming Platform. |
7. |
DWH |
Process Business Transactions |
DWH process Business Transactions internally. This typically includes storing of changed entities, update indexes, update metrics, etc. |
Request Validations
The following validations are performed when swapping a subscriber’s resource:
-
Subscriber must be provided in the request, it must be already created in the system and must not be in Deactivated State.
-
Swap Resource must be provided in the request, it must exists on Subscriber.
-
Resource must be provided in the request, it must be unique and must not be already assigned to another Subscriber in other than Deactivated State.
-
If Resource is already assigned to another Subscriber in Deactivated State, that assignment will be ignored.
-
Resource Type must be provided in the request and it must be configured in the system.