Contract Batch Process

Batch Process Calculations - Effective Date

Both Order Management and Inventory Monitoring utilize the effective date concept. The Start Date and End Date fields in the Contract Header determine which contract(s) to apply. This mechanism allows for future- and back-dating of contracts. It also makes the preparation of contracts easier, as they can be loaded into the system at any time (especially useful in offline scenarios). This makes the Order/Inventory itself the determining factor for the applicable contract, based on the Order Date / Inventory Monitoring Date.

Batch Process Implication - Orders placed are applied to every contract which falls inside the effective-date period when achievement totals are calculated. In the example below, if the same product X had targets in Contract A and Contract B, an order placed for X would be counted toward the targets in both Contracts A and B. CRM sums the order totals for all activated Contracts that have the Batch_vod flag enabled during their effective dates.

Use the VEEVA_OM_CONTRACT_BATCH to schedule the batch job. You can customize the batch logic. The Batch job always recalculates all lines, creating new sums for target achievement fields rather than incremental sums.

Data is processed according to the following parameters:

  • On the Contract:
  • The contract type is Sales_vod
  • The contract status is Activated
  • The Batch_vod__c check box has been enabled on the Contract
  • On the Contract partner
  • The partner record is Activated
  • On the Order:
  • The Order status = Submitted
  • The Order is a Master Order (not a delivery order created by splitting)

When the batch job is processed, the date and time of the last batch are recorded in the Last_Batch_Datetime_vod__c field in the Contract_vod object.

Conditions for a batch to sum up an order line and record the results in a Contract Line are as follows:

  • Account associated with an order has a valid Contract Partner record for the order date

Valid definition:

  • Contract Partner status is Activated
  • Order date is between Contract Partner start and end dates

This means orders can be backdated into a period with a valid Contract Partner record and be summed in the batch.

A Contract associated with the valid Contract Partner is also valid.

Valid definition:

  • Contract status is Activated_vod
  • Order date is between contract start and end dates
  • Contract Batch_vod value enabled
  • Contract is type Sales_vod

If these conditions are met, order lines that have the same product as a contract line for the valid contracts are summed for achievement totals. If a contract line has no product, all order line totals on the order are summed to calculate achievement totals. The batch-calculated achievement uses numeric values only, without Currency as a consideration. If order currency does not equal contract currency, achievement calculations are inaccurate.

If a Contract end date needs to be extended, it should automatically extend the dates on the activated Contract Partner records. However, in order to sync the changes to the Contract Partner records to offline platforms, a database refresh is required.

Batch Consideration – Kits

A Kit Header is defined as a product of type Order that has child products of type Kit Item. It is possible to associate a Contract Line with a kit header. Products of type Kit Item cannot be associated to a Contract Line. If a Kit Header is associated to a Contract Line, a user can only define an OM_Quantity_Achieved_vod value.

The batch process will sum up this value for Contract Lines that look up Kit Headers, but will not sum up any other values as List Amount and Net Amount.

Only fixed kits can be assigned a target.

The Remaining fields are formula fields and are not calculated by the batch job. The value can be negative if the target has been exceeded.