Logic API
-
Logic Nature: rebateRecordGroup
-
Logic Type: Calculation/Pricing
-
-
Execution Types:
-
Input Generation - to define input fields needed for this group
-
Standard – Calculation is performed based on the underlying Rebate Records. For example, it can aggregate data from associated Rebate Records and provide a summary. This summary can then be used by the manager to approve the records at once.
-
-
Information provided to the logic:
-
api.currentItem() - (Map) the content (fields and their values) of the Rebate Record Group object being calculated. Note, that you cannot change the content of the Rebate Record Group here - for that, use the rebateRecordGroup binding variable.
-
Binding variables
-
groupRebateRecords - List of Rebate Record objects from the group.
-
rebateRecordGroup - (IRebateRecordGroupManager) Object with various methods useful during the processing. For example, you can set values to the fields and attributes (i.e. attribute extensions) of the Rebate Record Group being calculated. Note that the modifications are allowed only during standard execution, not in the Input Generation execution.
-
-
-
Expected logic execution outcome:
-
From Input Generation execution:
-
definitions of the input fields in the logic context, done in the same way as in any other generic/default nature of logics.
-
-
From Standard mode execution:
-
elements results will be stored in the Rebate Record Group object.
-
Warnings and Alerts - will be provided to the user. They are treated as successful finish of the calculation.
-
Exception - when the logic raises an exception, it’s treated as a failure.
-
-
Logic resolution
The proper logic to be used is found in the RebateType field rebateRecordGroupFormulaName.