Object References

Object References table keeps data which are important for lookups of Promotions, Rebates and Compensations documents.

Those documents generally relate to many customers and many products. Often a single document applies to a group/category of customers and products. Such a group is commonly defined by a value of some attribute (e.g. customer region, product business unit, etc.).

When you need to look up a document, which includes a specific SKU and a specific customer, you would need to make a very complicated filtering to get the proper list of documents because you would need to consider many scenarios, how the customer group and product group was defined on those documents.

To be able to provide you with simple filtering methods, Pricefx needs to store special metadata, called Object References to solve the issue.

Pricefx Groovy API has special methods, which help you do the filtering, for example:

Updating Object Reference Table

The metadata about a document are normally updated only when the document data itself are updated – saved, or submitted.

When there is a change in customer and product attributes master data (e.g. a new customer is added to a product group), the Object References table needs to be updated, so that the lookups of already submitted and approved Contracts, Rebates Agreements, and Compensation Plans work correctly.

The update can be done either from a logic or by the server itself.

Trigger Update from Scheduled Task

The update can be triggered from a Calculation Flow task.

Example of triggering update of Object References from logic:

actionBuilder .addObjRefAction() //❶ .setFilter(filter) .setPartition(partition) .setTypeCode('typeCode')

❶ See more about the addObjRefAction() method.

Trigger Update as Daily Housekeeping Job

You can set this update to run automatically as a daily job on the server as part of housekeeping jobs.

Configuration is done in the server’s pricefx-config file.

Example of Object Reference table update in the pricefx-config server file:

<!-- Setting that will affect daily regeneration object references on already submitted and approved Contracts, Rebates Agreements, and Compensation Plans --> <updateObjRef> <contract>true</contract> <rebate>false</rebate> <compensation>false</compensation> <batchSize>50</batchSize> <!--1--> </updateObjRef>

❶ After processing this number of records (i.e. CT, RBA, CO) transaction will be committed.

Found an issue in documentation? Write to us.