arazzo: 1.0.1
info:
title: SAP BRIM Batch Rate Usage and Charge the Total
summary: Rate a batch of usage events in one call, then charge the account for the aggregate total.
description: >-
Rates many usage events at once on SAP BRIM Convergent Charging and bills the
aggregate. The workflow submits a batch of usage events for rating, reads the
batch summary total it returns, and charges the account for that total amount.
The charge amount is taken directly from the batch rating summary. Every step
spells out its request inline so the flow can be read and executed without
opening the underlying OpenAPI description.
version: 1.0.0
x-realizes-capability-ids:
- BC-4250.20
x-capability-derivation:
method: 'deterministic join: sourceDescriptions -> per-tag OpenAPI -> tag/capability edge. No classification at this step.'
min_confidence: 0.7
sources:
- capability_id: BC-4250.20
capability_name: Rating & Charging
spec: sap-brim-billing-and-revenue-innovation-management-rating-api-openapi.yml
confidence: 0.88
model: Turbo EA Capabilities by Vincent Verdet — Turbo EA, https://github.com/vincentmakes/turbo-ea-capabilities, CC BY 4.0
sourceDescriptions:
- name: chargingApi
url: ../openapi/sap-brim-billing-and-revenue-innovation-management-charging-api-openapi.yml
type: openapi
- name: ratingApi
url: ../openapi/sap-brim-billing-and-revenue-innovation-management-rating-api-openapi.yml
type: openapi
workflows:
- workflowId: batch-rate-and-charge
summary: Rate a batch of usage events and charge the aggregate total.
description: >-
Rates a batch of usage events in a single request and charges the account
for the total charge reported in the batch summary.
inputs:
type: object
required:
- accountId
- events
properties:
accountId:
type: string
description: Identifier of the account to charge for the batch total.
events:
type: array
description: >-
Array of rating requests, each with subscriberId, serviceType,
quantity, and usageTimestamp (and optional unit, pricingPlanId).
items:
type: object
chargeType:
type: string
description: Charging model for the aggregate charge (PREPAID or POSTPAID).
steps:
- stepId: rateBatch
description: Rate the full batch of usage events in a single request.
operationId: rateUsageEventBatch
requestBody:
contentType: application/json
payload:
events: $inputs.events
successCriteria:
- condition: $statusCode == 200
outputs:
results: $response.body#/results
totalChargeValue: $response.body#/summary/totalCharge/value
totalChargeCurrency: $response.body#/summary/totalCharge/currency
successCount: $response.body#/summary/successCount
- stepId: chargeTotal
description: Charge the account for the aggregate total returned by the batch.
operationId: chargeAccount
requestBody:
contentType: application/json
payload:
accountId: $inputs.accountId
amount:
value: $steps.rateBatch.outputs.totalChargeValue
currency: $steps.rateBatch.outputs.totalChargeCurrency
chargeType: $inputs.chargeType
description: Aggregate charge for batch-rated usage events
successCriteria:
- condition: $statusCode == 200
outputs:
chargeId: $response.body#/chargeId
status: $response.body#/status
remainingBalance: $response.body#/remainingBalance
outputs:
successCount: $steps.rateBatch.outputs.successCount
totalChargeValue: $steps.rateBatch.outputs.totalChargeValue
chargeId: $steps.chargeTotal.outputs.chargeId
remainingBalance: $steps.chargeTotal.outputs.remainingBalance
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.