Skip to main content

Prepaid with Drawdown Objects and Data Query

Zuora

Prepaid with Drawdown Objects and Data Query

The Prepaid with Drawdown feature is in the Early Adopter phase. We are actively soliciting feedback from a small set of early adopters before releasing it as generally available. If you want to join this early adopter program, submit a request at Zuora Global Support.

You can perform queries on the Prepaid Balance, Prepaid Balance Fund, Prepaid Balance Transaction objects through Data Query. For information about the basic usage of Data Query, see Constructing SQL Queries in Data Query.

Prepaid Balance fields

The following table lists all the fields that are defined on the Prepaid Balance object. You can access the Prepaid Balance object and all its fields through Data Query.

  • Object name: PrepaidBalance
  • Alias: pb
Field Type Description
Id string The identifier.
Name string The name of the Prepaid Balance. It is a combination of Subscription Number and Prepaid UOM. For example, A-S00000037_Each
TotalFund decimal The total funded prepaid balance. 
Balance decimal The current prepaid balance.
StartDate date The start date of the Prepaid Balance.
EndDate date The end date of the Prepaid Balance.
AccountId string If it belongs to an Account, the Invoice Owner Account Id.
OrigSubscriptionId string If it belongs to a Subscription, the original Subscription Id.
UOM string The Prepaid UOM for a prepayment charge. 
CreatedById string The ID of the user who created the Prepaid Balance.
CreatedDate datetime The date when the Prepaid Balance is created.
UpdatedById string The ID of the user who updated the Prepaid Balance.
UpdatedDate datetime The date when the Prepaid Balance is updated.
Deleted boolean Indicates whether the Prepaid Balance is deleted. 
PrepaidBalanceState enum The state of the Prepaid Balance.  Values: ACTIVE or EXPIRED 
PrepaidType int The type of the Prepaid Balance.  Value: NULL.

Prepaid Balance Fund fields

The following table lists all the fields that are defined on the Prepaid Balance Fund object. You can access the Prepaid Balance Fund object and all its fields through Data Query.

  • Object name: PrepaidBalanceFund
  • Alias: pbf
Field Type Description
Id string The identifier.
AccountId string The Account Id.
PrepaidBalanceId string The Prepaid Balance Id.
FundedBalance decimal The funded balance: the total units of the fund. 
Balance decimal Remaining balance on the fund: the remaining units of the fund. 
SourceId string The source Id of the fund: the original charge ID. 
FundSourceType string(enum) The type of the Prepaid Balance Fund.  Values: CHARGE, ORDER_LINE_ITEM, CREDIT_MEMO_ITEM, or DEBIT_MEMO_ITEM
FundingPrice fixed The price amount of a fund.
Calculation: {number of Billing Periods in one Fund Validity Period} * {price in one Billing Period}
ChargeSegmentNumber Integer The number of the charge segment.
StartDate date Start date of the fund effective period.
EndDate date End date of the fund effective period.
CreatedById string The ID of the user who created the Prepaid Balance Fund.
CreatedDate datetime The date when the Prepaid Balance Fund is created.
UpdatedById string The ID of the user who updated the Prepaid Balance Fund.
UpdatedDate datetime The date when the Prepaid Balance Fund is updated.
Priority Int The priority of the Fund.  Positive values: 10(high), 50(medium),100(low)
Deleted boolean Indicates whether the Prepaid Balance Fund is deleted.

Prepaid Balance Transaction fields

The following table lists all the fields that are defined on the Prepaid Balance Transaction object. You can access the Prepaid Balance Transaction object and all its fields through Data Query.

  • Object name: PrepaidBalanceTransaction
  • Alias: pbt
Field Type Description
Id string The identifier.
AccountId string The Account Id.
PrepaidBalanceId string The Prepaid Balance Id.
FundId string The Fund Id.
Amount decimal The Amount of Units to be adjusted to the Prepaid Balance (could be positive or negative).
PrepaidBalanceTransactionType enum

The type of the Prepaid Balance Transaction. One of the following values: 

  • PREPAYMENT
  • DRAWDOWN
  • PREPAYMENT_ADJUSTMENT 
  • DRAWDOWN_ADJUSTMENT
  • PREPAYMENT_CREDIT_BACK
  • PREPAYMENT_REVERSE_CREDIT_BACK
Balance decimal The Prepaid Balance after a transaction.
TransactionSourceType enum The type of the transaction source.  Values: CHARGE, ORDER_LINE_ITEM, or USAGE. 
SourceId string The transaction source id (original Charge Id, Guided Usage Id, Order Line Item Id).
CreatedById string The ID of the user who created the Prepaid Balance Transaction.
CreatedDate datetime The date when the Prepaid Balance Transaction is created.
UpdatedById string The ID of the user who updated the Prepaid Balance Transaction.
UpdatedDate datetime The date when the Prepaid Balance Transaction is updated.
TransactionDate date The date of the Prepaid Balance Transaction.
Deleted boolean Indicates whether the Prepaid Balance Transaction is deleted.

Sample use cases

1. Query the Prepaid Balance object by using the OrigSubscriptionId field:

select Id,Name,Balance,TotalFund,StartDate,EndDate,OrigSubscriptionId,UOM from prepaidbalance 
where OrigSubscriptionId='402881847e2d707b017e2d76c48a0016'

2. Query the Prepaid Balance object by using the Name field:

select Id,Name,TotalFund,Balance,UOM 
from prepaidbalance
where Name ='A-S00000037_Each'

3. Query the Prepaid Balance Fund object by using the PrepaidBalanceId field:

select id,PrepaidBalanceId,FundedBalance,Balance,StartDate,EndDate,FundSourceType from prepaidbalancefund
where PrepaidBalanceId='402881847e2d707b017e2d76c8ae002f' 

4. Query the Prepaid Balance Transaction object by using the FundId field:

select id,PrepaidBalanceId,FundId,Amount,Balance,TransactionDate,PrepaidBalanceTransactionType 
from PrepaidBalanceTransaction where FundId='402881847e2d707b017e2d76c8b80030'