Balance Initialization During Migration
During migration, you can initialize balances for on-demand balance intervals.
The following SubMan APIs initialize balances for on-demand balance intervals:
- MtxRequestSubscriberImportBalanceValue — For more information about this API, see the discussion about MtxRequestSubscriberImportBalanceValue.
- MtxRequestGroupImportBalanceValue — For more information about this API, see the discussion about MtxRequestGroupImportBalanceValue.
Balance Initialization During Migration
The balance-specific SubMan APIs for migration have the following general behavior and restrictions:
- The balance instance must already exist. When using the MtxRequestSubscriberAdjustBalance and MtxRequestGroupAdjustBalance APIs, you
can identify a balance in a wallet with the
ResourceId
orBalanceIdData
. If there are multiple balances with the same balancetemplateId
, thenBalanceIdData
cannot identify a unique balance in the wallet and returns the error "Too many ResourceIds match the BalanceID data, cannot uniquely identify the balance." For this reason, use theResourceId
when possible. UseBalanceIdData
only when theResourceId
is not known. - An amount is assigned to a balance instance. Only the gross amount is adjusted; the reserved amount is unchanged.
- Thresholds and credit limits are not checked.
- An EDR is not created.
- The balance is marked as INITIALIZED after the import. This means that first use and recurring processing flags are set.
- For any created balance interval instances:
- No balance instance creation notifications are generated.
- Balance expiration notifications are scheduled if necessary.
- For aggregated balances, only the instance specified is modified. Any parent/child aggregated values are unchanged.
- Any meters on the target balance are unchanged.
Balance-specific Behavior
The balance-specific SubMan APIs for migration have the following behavior and
restrictions:
- Simple Balances — The Amount is set to the supplied value.
- Periodic Balances — The Amount for
the periodic interval specified by the
StartDate
is set to the supplied value. If the interval does not exist, the request fails. - On-Demand Balances
- If
CreateOnDemand
istrue
(default):- A new on-demand balance interval is created.
StartDate
is set to the suppliedStartDate
.- The instance
EndDate
is calculated from the balance template.
Note: The start dates must be in ascending order. - If
CreateOnDemand
isfalse
:- An existing
on-demand interval is identified using the supplied
StartDate
. - If no such interval exists, the request fails.
- If multiple instances exist, the last interval is selected.
- An existing
on-demand interval is identified using the supplied
- The
Amount
of the interval is set to the supplied value. - Prepaid Balances — The balance credit floor is automatically set to
the
Amount
of the import. You can override the credit floor amount by setting theCreditFloor
parameter in the request. For example, if you import a balance in the middle of a cycle and want the balance scenario to be 5GB remaining of 10GB granted, set theAmount
to-5.0
and theCreditFloor
to-10.0
.
- If