Pricefx Classic UI is no longer supported. It has been replaced by Pricefx Unity UI.

 

How to Configure Payout Records


Aim of this articleExplains how to configure Payout Records. Payout Records definition is part of the Rebate calculation logic. Decide which attributes you want to have in your Payout Records and, in the logic, map payout record attributes to the corresponding original rebate record attributes.
Related sections

Payout Records (Reference Manual)

Steps:

  1. In the Advanced Configuration Options, create an entry with the name payoutRecordsConfiguration. Make the following settings:

    • Visibility and editability by record type and business roles:
      1. Set up business roles if you want to limit visibility/editability to only some groups of users.
      2. Add a type2BusinessRoles entry in the configuration value, mapping record type(s) to the business role(s) that a user is required to have (a user only needs to have one of the roles listed).

    • Define the set of statuses and allowed transitions:
      1. Define the set of status in the validToFromStateTransitions entry.
      2. Define valid status transitions by mapping each status to the set of statuses it can be transitioned from. In the example above a record can move from Pending to Approved and Denied and from Approved to Paid.

        Example
        {
        "validToFromStateTransitions": {
        "Approved": [ "Pending" ],
        "Denied": [ "Pending" ],
        "Paid": [ "Approved" ]
        },
        
        "businessRolesConfig": {
        "RebateAdmin" : {
        "types" : ["Accrual"],
        "canEdit" : true
        },
        
        "FinancialAdmin" : {
        "types" : ["Summary"],
        "canDelete" : true
        }
        },
        
        "editableFields" : ["payoutDate", "endDate", "status", "attribute1", "attribute10"]
        }
    • It is important to note that these limitations do not apply to the Rebate Record. Visibility of records is applied to the Payout Record data grid in the UI, while status transition control is applied to Mass-Edit of the record.
  2. Add Payout Record generation code to your Rebate calculation logic.

    def rr = ...  // get a rebate record from which to initialize some payout record attributes from
    def customer = rr.attribute1
    def accrual = rr.attribute3
    // breakdown the accruals by store (while for ex. the rebate record level's accrual is on customer level)
    for (def store : stores) {
    	def storeAccrual = .....  // some breakdown calculation
    	payoutRecords.add("Accrual", store, [attribute1: customer, attribute2: storeAccrual , attribute3: rr.attribute5] )
    }
    payoutRecords.add("Summary", "Total", [attribute1: customer, attribute2: accrual] )
    

    See also the API documentation for the complete list of available methods.
    (warning) Note that the 'payoutRecords' binding is only available from a Rebate Record calculation context, i.e., the logic that calculates rebate records in a Rebate Record Calculation task (one default task is created automatically for every Rebates implementation).

  3. Go to Rebates > Rebate Calculations and edit the default calculation task or create a new one. The logic with the Payout Record generation code must be selected in the Logic drop-down list on the Calculation tab. 

  4. Run the Rebate Calculation task.
  5. Once the calculation is finished, the Payout Records are available on the Rebates > Payout Records page. It is a single page with a data grid, filterable and with mass-edit capability.

Found an issue in documentation? Write to us.

Â