What is the Opportunity Product Mirror Object?
The Opportunity Product Mirror object (OpportunityLineItemMirror__c) is a synchronized copy of the standard Salesforce object Opportunity Product (OpportunityLineItem). Use this mirror object as an alternative when you want to use Opportunity Product as your source object.
You cannot use the data held in the Opportunity Product object directly due to a limitation on the use of Salesforce lookups.
The Opportunity Product Mirror object contains a copy of all the fields in the Salesforce object. It also has the following additional fields:
- A lookup to the Opportunity
- A lookup to the Product
- A text field to hold the Opportunity Product record ID
- Lookups to the Revenue Management actuals and forecast recognition templates.
There is no link from the Opportunity to the Opportunity Product Mirror.
If you want to use this feature, you must:
- Select the Revenue Management Settings, Enable Opportunity Product Mirror custom setting.
- Set up the scheduled Apex Job, OpportunityProductMirrorBatchScheduler.
- Create a primary recognition settings record for the Opportunity.
- Create a Level 2 recognition settings record and actuals recognition template for the Opportunity Product Mirror (and a forecast recognition template if used).
- Add a lookup from the Opportunity Product to the actuals recognition template (and a lookup to the forecast recognition template if used).
When you add a new opportunity product line to an opportunity, attach the actuals recognition template that you want to apply to the mirror record to include it in revenue recognition (also attach the forecast recognition template if used). A new mirror record is created for opportunity product lines that have recognition templates attached and are active as defined in the recognition setting. If you update an existing opportunity product line that has a recognition template attached, the corresponding mirror record is updated.
All fields that have an exact equivalent on the Opportunity Product Mirror (that is, have the same name and field type) will be copied from the Opportunity Product, even if they are not included in the recognition setting. This includes formula fields on the Opportunity Product Mirror. If a field is on the Opportunity Product Mirror as part of the managed package but is a standard field on the Opportunity Product you don't need to make any change (for example, for Product there is already a field ffrr__Product2__c on the Opportunity Product Mirror which matches Product2 on the Opportunity Product).