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.

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.