Debit Commit EDRs
Purpose
Debit Commit EDRs are generated by the OCS “engine” subsystem when the debit engine executes and a change to a wallet occurs due to the debit being committed (so no debit commit EDR is generated for enquiries).
Example
{
"type": "debit-commit",
"node-name": "marc",
"event-timestamp": "2023-03-25T23:50:11.640511Z",
"correlation-info": {
"slee-session-id": "e3755d7e-2e3b-4790-8ec8-b2e89976933e",
"slee-event-id": "1/1"
},
"source-info": {
"source-service": "BasicEngineTest",
"source-system": "unit.ocs.engine"
},
"status-message": "",
"rating-info": {
"balance-initial": [
{
"bucket-info": {
"bucket-id": "rHWOrJ",
"bucket-amount": 1500000000,
"bucket-unit": "microcents"
}
}
],
"balance-current": [
{
"bucket-info": {
"bucket-id": "rHWOrJ",
"bucket-amount": 0,
"bucket-unit": "microcents"
}
}
],
"balance-impacts": [
{
"bucket-info": {
"bucket-id": "rHWOrJ",
"bucket-amount": 0,
"bucket-unit": "microcents",
"bucket-delta": 1500000000
}
}
],
"policies": [],
"ancillary-info": {},
"rating-requested": [
{
"bucket-amount": 1500000000,
"bucket-unit": "microcents"
}
],
"rating-applied": [
{
"bucket-amount": 1500000000,
"bucket-unit": "microcents"
}
],
"rating-timestamp": "2023-03-25T23:50:11.596119900Z",
"context-info": {}
},
"account-info": {
"account-id": "BDTestAccount0cceae0f-6634-4790-8ddb-269a3abcd3bc"
}
}
Fields
Field | Type | Presence | Description |
---|---|---|---|
account-info |
Object | Always | Information on the wallet against which the bucket was applied. |
account-info.account-id |
String | Always | The unique ID of the wallet against which the debit was applied. |
rating-info |
Object | Always | A breakdown of the rating calculations that were applied to the wallet. |
policies |
Array | Always | A list of policies that were applied to this rating event. |
context-info |
Object | Always | The information provided to this rating event from the client. This will include, for example, source_location and/or destination_location fields for doing location based rating. |
ancillary-info |
Object | Always | When a rating event is performed as part of a greater action - e.g. a voucher redemption, ancillary information is passed through the engine and included in the EDR in this object. |
rating-timestamp |
Timestamp | Always | The timestamp that the rating event was considered to have taken place. This may not be the same as the wall-clock time - i.e. it can be altered by the client. |
rating-requested |
Array | Always | An array of units and amounts requested by the client to apply as a rating cost. |
rating-applied |
Array | Always | An array of units and amounts that were actually applied by the rating engine. This may be, and often is, quite different to the rating requested. |
balance-initial |
Array | Always | An array of the balances that were available during rating and their values before any rating was applied. |
balance-current |
Array | Always | An array of the balances that were available during rating and their values after any rating was applied. |
balance-impacts |
Array | Always | A list of the buckets which had their values changed due to the rating event. |
In the bucket-info-initial
object the bucket’s details will be included.
This includes all the information that would normally be retrieved about the
bucket through the OCS API.