Create a revenue waterfall for several contracts
defrr_create_waterfallUse when you need the deferred revenue roll-forward for a set of contracts: send up to 50 contracts' terms and get back, for each contract and for all of them together, every month's billing, revenue and ending deferred balance (opening deferred balance + billing - revenue = ending). Each contract is built like defrr_create_contract. Everything or nothing: if one contract is rejected the call fails and nothing is charged. Costs 1 credit per contract (refunded if it fails). Nothing you send is stored. For more than 50 contracts, send them in batches of up to 50, each saying which batch it is (batch: number and of) and passing in the carry returned by the batch before; the last batch returns grandTotal for all of them. For a very large set, call the REST API from a script instead of through the model.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| batch | No | Only when sending more than 50 contracts in several calls: which call this is. Send batch 1 first, then 2, and so on, in order. | |
| carry | No | From batch 2 on: the carry returned by the previous batch, passed back exactly as it was given. Not used on batch 1. | |
| shape | No | 'wide' (the default) gives each contract's months as lists. 'rows' gives one row per contract per month, ready for a spreadsheet or a database. | |
| contracts | Yes | The contracts to include, up to 50. Each is charged 1 credit. |