Conga Product Documentation

Welcome to the new doc site. Some of your old bookmarks will no longer work. Please use the search bar to find your desired topic.

Show Page Sections

Working with Draft Usage Rating

The draft usage rating enables you to see the forecasted billable amount for the submitted usage inputs before you actually rate them.

This helps you to

  • Edit the quantity, add more inputs, etc., before you perform the actual rating.
  • Use this amount as a source for your Revenue Forecast requirements.

Once you are comfortable with the draft computed data, you can process them to get the rated amount.

Processing Draft Usage Rating

You can process a single usage input from the Usage Input Detail page, or process multiple usage inputs from the listview, by running abatch job, or by calling an API.

Single Usage Input

  1. Go to the Usage Input Detail page.
  2. Click the (Draft) Process Usage Input button to display the (Draft) Calculate Rated Amount page, which shows the message, "Usage Input can be draft computed only if it has a status Loaded. The current status is Loaded."
  3. Click Process.The Usage Input Detail page opens, showing the forecasted amount against the (Draft) Rated Amount field.
    Note: The Status of the draft processed Usage Input remains as Loaded.


The Usage Inputs related lists are updated with the new usage inputs and corresponding (Draft) Rated Amount.

Input id

Asset No.

Status

Quantity

Rated Amount

Uasge Date

Product UOM

(Draft) Rated Amount

IN-00007052

akdsjs

Loaded

20.00

6/5/2023

Each

USD 4000.00

IN-00007053

akdsjs

Loaded

10.00

7/8/2023

Each

USD 2000.00

The (Draft) Rated Quantity and (Draft) Fee Amount are updated on the Usage Schedule.

Schedule id

Fee Amount

Billing Schedule

Actual Quantity

Period Start Date

Period End Date

Status

Type

(Draft) Rated Quantity

(Draft) Fee Amount

US-00008316

USD 0.00

BS-01311820

0.00

6/1/2023

6/30/2023

Pending Billing

Usage

20.00

USD 4000.00

US-00008317

USD 0.00

BS-01311821

0.00

7/1/2023

7/31/2023

Pending Billing

Usage

10.00

USD 2000.00

Once you are satisfied with the forecasted values in the above-mentioned fields you can process the usage input.

Click Process Usage Input. The forecasted amount is rated and updated in the Rated Amount field. The corresponding billing schedule reflects the rated amount as the fee amount to be billed.

Multiple Usage Inputs

You can submit multiple usage inputs that are in Rated or Loaded status for draft rating.

Restriction

  • For multiple usage inputs, every time a set of usage inputs are processed they will be honored as fresh usage inputs and only the rated amount for those set of usage inputs will be forecasted and posted on the Usage Schedule. The old forecasted data on the Usage Schedule will be overwritten by the next forecast run.
Note: You must process ALL the usage inputs of the same asset line item at once. If partial usage inputs are processed then the output data will be incorrect.

Through the usage input list view

You can process multiple usage inputs at once from the UI list view.

  1. Create a list view of the usage inputs.
  2. Click the "select all" checkbox above the usage inputs. For example, if an asset line item has 500 usage inputs, with 100 in Rated status, 150 Draft-Rated, and the remaining yet to be Draft-Rated, you must select all the usage inputs of this asset line item for draft rating.The system processes all the usage inputs that are in Loaded status and ignores the ones in Rated status.
    Warning: As the number of usage inputs increases with time, you must select all the usage inputs for draft rating them.
  3. Click (Draft) Process Usage Input(s) to raise the Process Usage Rating page showing the message "Usage inputs with status as Loaded will be draft computed" and the list of usage inputs to be processed.
  4. Click Process Usage Input.The Usage inputs list view opens showing the rated amount updated in the (Draft) Rated Amount field.
  5. The draft-rated usage inputs remain in the Loaded status, even after processing. The draft amount is updated in the (Draft) Rated Amount field.Check the (Draft) Rated Amount field to learn if the processing is successful. If required, you can edit the data of the draft computed usage inputs and re-submit them for processing.


The (Draft) Rated Quantity and (Draft) Fee Amount fields are updated on the Usage Schedule. The Usage Inputs related lists are updated with the new usage inputs and corresponding (Draft) Rated Amount.

Once you are satisfied with the forecasted values in the above-mentioned fields you can process the usage input. Click Process Usage Input. The forecasted amount is rated and updated in the Rated Amount field. The corresponding billing schedule reflects the rated amount as the fee amount to be billed.

By executing a Batch Job

You can run a batch job to draft rate usage inputs that are in Loaded status.

You can schedule the call from the Schedule Apex button on the Apex Classes page or using the following cron expression.

Apttus_Billing.DraftUsageRatingJob job = new Apttus_Billing.DraftUsageRatingJob();
String cronExpression = ‘0 0 0 ? * * *’;
System.schedule(‘Draft Rating Job’, cronExpression, job);

You get the following results by passing different parameters.

Parameter

Result

Apttus_Billing.DraftUsageRatingJob job = new Apttus_Billing.DraftUsageRatingJob(); Database.executeBatch(job);

If you run the batch job without any parameters, then it processes all draft usage inputs of the org. You will be notified when processing is complete.

Set<Id> usageIds = new Set<Id>();
Set<Id> aliIds = new Set<Id>{'a093m00001ocy2I', 'a093m00001octXV', 'a093m00001nvtW4'};
for(Apttus_Billing__UsageInput__c ui : [Select Id From Apttus_Billing__UsageInput__c Where Apttus_Billing__AssetLineItemId__c IN: aliIds]){
	usageIds.add(ui.Id);
}
Apttus_Billing.DraftUsageRatingJob job = new Apttus_Billing.DraftUsageRatingJob(usageIds, null);
Database.executeBatch(job);

Process selected draft usage inputs. You must pass all the usage input IDs pertaining to one or more asset line items. You will be notified when processing is complete.

Set<Id> aliIds = new Set<Id>{'a093m00001ocy2I', 'a093m00001octXV', 'a093m00001nvtW4'};
Apttus_Billing.DraftUsageRatingJob job = new Apttus_Billing.DraftUsageRatingJob(null, aliIds);
Database.executeBatch(job);

Process draft usage inputs of selected asset line item IDs. It processes all the usage inputs pertaining to the asset line item IDs. You will be notified when processing is complete.

On completion of the batch job, the (Draft) Rated Quantity and (Draft) Fee Amount fields are updated on the usage schedule. The usage inputs related lists are updated with the new usage inputs and corresponding Rated Amounts.

Once you are satisfied with the forecasted values in the above-mentioned fields you can process the usage input. The old forecasted data will be overwritten by the next forecast run.

By calling an API

You can draft rate usage inputs in bulk by calling the draftPendingUsageInput API. This API supports processing 1000 usage inputs in the synchronous mode. The API gives no response about the result of processed or errored-out usage inputs. If the usage inputs are processed in batch mode, an email containing processed usage input information is sent to the user. If the usage inputs are processed synchronously then the user can verify the result by looking into individual usage input records.

There are four different flavors of this API.

Parameter

Result

Apttus_Billing.BillingService.draftPendingUsageInput();

If you do not pass any parameter and call this API, it runs in batch mode and draft rates all the usage inputs present in the system. You will be notified when processing is complete.

Apttus_Billing.BillingService.draftPendingUsageInput(Set<Id> usageInputIds);

This API processes the specified usage inputs in batch mode. You must pass all the usage input IDs pertaining to one or more asset line items. You will be notified when processing is complete.

Apttus_Billing.BillingService.draftPendingUsageInput(Set<Id> usageInputsIds, Boolean processSynchronously);

This API processes the specified usage inputs either in batch mode or synchronously, depending on the flag value. You will get no email notification when the processing is complete.

Apttus_Billing.BillingService.draftPendingUsageInputRelatedToALIs (Set<Id> assetLineItemIds);

This API processes all usage inputs of specified asset line items in batch mode. You will be notified when processing is complete.

The (Draft) Rated Quantity and (Draft) Fee Amount are updated on the Usage Schedule. The Usage Inputs related lists are updated with the new usage inputs and corresponding (Draft) Rated Amount.

Once you are satisfied with the forecasted values in the above-mentioned fields you can process the usage input. You can call the API to Process Usage Input. The forecasted amount is rated and updated in the Rated Amount field. The corresponding billing schedule reflects the rated amount as the fee amount to be billed.

Effect of Asset Amendment on Forecasted Usage Input

The forecasted usage inputs are vulnerable to asset amendments. If you amend the asset line item, the billing schedules and usage schedules are superseded and new billing schedules are created with Pending Billing status. The values in the (Draft) Rated Amount and Rated Amount fields are reset to zero for the usage inputs.

Let us understand this effect with the help of an example.

Example:

Suppose you are a billing administrator of a company selling computer hardware 'Internet Plans’ and you have already invoiced the customer. The details are summarized in the following table:

Start Date

End Date

First Billing Date

Selling Frequency

Billing Frequency

Price Type

List Price

TCV

1/1/2023

12/3/2023

1/1/2023

Yearly

Half Yearly

Usage

USD 100

USD 0.00

Define tire prices as follows:

0-20 = 200

21-40 = 400

Define usage inputs for the dates

6/5/2023 - 20 quantity

7/8/2023 -10 quantity and draft rate them.

Initiate billing, you will get the following results:

Billing will generate the billing schedules as follows:

Billing Schedule ID

Period Start Date

Period End Date

Fee Amount

Ready for Invoice Date

Type

Status

BS-001

1/1/2023

6/31/2023

$0.00

7/1/2023

Contracted

Pending Billing

BS-002

7/1/2023

12/3/2023

$0.00

1/1/2024

Contracted

Pending Billing

The Usage Inputs related lists are updated with the new usage inputs and corresponding (Draft) Rated Amount.

Input id

Asset No.

Status

Quantity

Rated Amount

Uasge Date

Product UOM

(Draft) Rated Amount

IN-00007052

akdsjs

Loaded

20.00

6/5/2023

Each

USD 400.00

IN-00007053

akdsjs

Loaded

10.00

7/8/2023

Each

USD 200.00

The (Draft) Rated Quantity and (Draft) Fee Amount are updated on the Usage Schedule.

Schedule id

Fee Amount

Billing Schedule

Actual Quantity

Period Start Date

Period End Date

Status

Type

(Draft) Rated Quantity

(Draft) Fee Amount

US-00008316

USD 0.00

BS-01311820

0.00

6/1/2023

6/30/2023

Pending Billing

Usage

20.00

USD 400.00

US-00008317

USD 0.00

BS-01311821

0.00

7/1/2023

7/31/2023

Pending Billing

Usage

10.00

USD 200.00

Amend the asset line. You will get the following results:

  • Existing billing schedules are superseded and new billing schedules are created with Pending Billing status.
  • Draft rated Amount of all the existing usage inputs is set to zero.
  • Existing Usage schedule Draft Fee Amount will remain as it is. New schedules that are created will not have any Draft Fee Amount.

Existing billing schedules are superseded and new billing schedules are created with Pending Billing status as shown:

Billing Schedule ID

Period Start Date

Period End Date

Fee Amount

Ready for Invoice Date

Type

Status

Superseded

BS-01311820

1/1/2023

6/31/2023

$0.00

7/1/2023

Contracted

Superseded

Yes

BS-01311821

7/1/2023

12/3/2023

$0.00

1/1/2024

Contracted

Superseded

Yes

BS-01311822

1/1/2023

6/31/2023

$0.00

7/1/2023

Contracted

Pending Billing

BS-01311823

7/1/2023

12/3/2023

$0.00

1/1/2024

Contracted

Pending Billing

Draft rated Amount of all the existing usage inputs is set to zero.

Input id

Asset No.

Status

Quantity

Rated Amount

Uasge Date

Product UOM

(Draft) Rated Amount

IN-00007052

akdsjs

Loaded

20.00

USD 0.00

6/5/2023

Each

USD 0.00

IN-00007053

akdsjs

Loaded

10.00

USD 0.00

7/8/2023

Each

USD 0.00

Existing Usage schedule Draft Fee Amount will remain as it is. New schedules that are created will not have any Draft Fee Amount as shown:

Schedule id

Fee Amount

Billing Schedule

Actual Quantity

Period Start Date

Period End Date

Status

Type

(Draft) Rated Quantity

(Draft) Fee Amount

Superseded

US-00008316

USD 0.00

BS-01311820

0.00

6/1/2023

6/30/2023

Superseded

Usage

20.00

USD 400.00

Yes

US-00008317

USD 0.00

BS-01311821

0.00

7/1/2023

7/31/2023

Superseded

Usage

10.00

USD 200.00

Yes

US-00008318

USD 0.00

BS-01311822

0.00

6/1/2023

6/30/2023

Pending Billing

Usage

US-00008319

USD 0.00

BS-01311823

0.00

7/1/2023

7/31/2023

Pending Billing

Usage

Hence, if you amend the asset line item, the associated usage inputs are reset to zero.