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 or BalanceIdData. If there are multiple balances with the same balance templateId, then BalanceIdData 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 the ResourceId when possible. Use BalanceIdData only when the ResourceId 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 is true (default):
      • A new on-demand balance interval is created.
      • StartDate is set to the supplied StartDate.
      • The instance EndDate is calculated from the balance template.
      Note: The start dates must be in ascending order.
    • If CreateOnDemand is false:
      • 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.
    • 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 the CreditFloor 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 the Amount to -5.0 and the CreditFloor to -10.0.