...
The central field in the Ad Position Placement option is the formula field Availability- f42_dispo__countAvailable__c
API Field Name | Fomula | Formula Content |
---|---|---|
f42_dispo__countAvailable__c | if( f42_dispo__Publication__r.f42_dispo__isDigital__c = TRUE, | Physical limit of an availability:
|
Note |
---|
The posted / reserved / blocked bookings are entered using rollup summaries for the Ad Position Placement object.
|
...
Reservations in MVX are made in the quotation process via the Product Property for the availability check /wiki/spaces/OFB/pages/1708327327.
The value of Product Property, in this case the Booking information, is written as a JSON String in the Specification Export field (SF42_QuoLI_Specification_Export__c) on the Position Object (sf42_quotefx__SF42_GenLineItem__c).
→ Here the IDs contain the corresponding availability, number of reservations, corresponding blocked positions.When synchronizing the quote line items to the opportunity (creating opportunity products), the JSON string is written 1:1 to the opportunity line item in field sf42_quotefx__SF42_QuoLI_Specification_Export__c
...
The central trigger for MVX
Responds to OpportunityLineItem creation from appero quote and creates new Booking entries for MediaVelox using the JSON specification sf42_quotefx__SF42_QuoLI_Specification_Export__c
If there are already Booking entries in the opportunity, these are not updated, but deleted and rewritten.
Creates new Blocked Position entries if the Booking triggers such a rule.
Dispobook.trigger
...
Temporal validity of Dispobook entries
If a Booking entry (f42_dispo__DispoBook__c) is no longer valid, the data record is set to "archived" using a checkbox. Archived bookings are no longer counted towards availability.
Also here a formula field is in the center:
API Field Name | Formula | Formula Content |
---|---|---|
f42_dispo__Calculated_Archive__c | if( |
FixedPublicationDate', f42_dispo__Issue__r.f42_dispo__ClosingDate__c < TODAY(),f42_dispo__Issue__r.f42_dispo__PublicationDateUntil__c < TODAY() ), | A Booking is set to archived if:
|
Offer validity expired
|
Archived bookings are no longer counted against availability. However, since rollup summaries cannot be applied to calculation fields, the value of the field f42_dispo__Calculated_Archive__c is written with the help of a simple checkbox using a trigger:
...
Writes the value of the field f42_dispo__Calculated_Archive__c into the checkbox field
f42_dispo__archivesarchive__c.Updates associated Blocked Position entries.
Updates the document dispatch belonging to a Booking (no voucher copy is created for cancelled Booking), for f42_dispo__MVX_ProofOfDeliveryRule__c, Record Type Based on Dispo Books.
...
Blocked Positions f42_dispo__DispoBlockedItems__c are also marked as archived using a calculation field:
API Field Name | Formula | Formula Content |
---|---|---|
f42_dispo__Calculated_Archive__c
| f42_dispo__DispoBookEntry__r.f42_dispo__Calculated_Archive__c | The field f42_dispo__Calculated_Archive__c in the Blocked Position uses a formula to transfer the value from the triggering Booking entry. |
The DispoBlockedItems.trigger writes the value of the calculation field into the checkbox field f42_dispo__archive__c at the Blocked Position.
...
Writes new Booking and deletes existing ones when the opportunity is won and the booking status changes to confirmed.Deletes Booking if the opportunity is lost
The same proceed also for the corresponding Blocked Position
...