Update Offer Subscription Balances

The CRM / Ordering system updates multiple Balances on Offer Subscription in the OCS.io system via the RESTful API for those Offers having Balance service. The request body contains updated Offer Subscription identification, and list of Balance’s figures which will be applied. The OCS.io system updates each instance of the Balance on Offer Subscription, then returns Business Transaction containing list of updated Balances on Offer Subscription as a payload of the response. Other systems may be notified about the Business Transaction via the Streaming Platform.

Primary Actor

CRM / Ordering system.

Basic Flow

Update Offer Subscription Balances Basic Flow
Step Actor Action Description

1.

CRM / Ordering

Call updateSubscription API

CRM / Ordering system calls Update Offer Subscription Balances API exposed by OCS.io.

2.

OCS.io

Request Validation

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 updateSubscription Response

OCS.io returns Response to the CRM / Ordering System.

Response codes are as follows:

  • 200 = OK

  • 400 = Request Validation failed

  • 500 = Internal error

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.