The Product Property at the Quote Position
General
The availability check and reservation of ad positions in the quote process takes place via a Product Property without calculation of the type Table. Although the product property is an object from appero quote, it is precisely here that the connection between the two products - appero quote and MediaVelox - takes place. That is why the structure of the product property is so precisely specified.
On the quote line item itself, the property is treated like any other: The content and value of the product property is written in the form of a JSON string to the "Specification" sf42_quotefx__SF42_QuoLI_Specification__c
field.
When the quote is synchronized with the opportunity, this string is transferred 1:1 to the "Specification JSON" sf42_quotefx__SF42_QuoLI_Specification_Export__c
field on the OpportunityLineItem.
In order for OpportunityLineItem.trigger
and Opportunity.trigger
to take effect and the associated dispo books to be generated, the correct structure of the JSON string is important.
Normally, of course, the JSON string is written automatically by appero quote. The following representation serves on the one hand for a better understanding and on the other hand as a guide if the opportunity products are generated outside of appero quote and bookings are to be derived from them.
Structure of the JSON string
Bookings for a fixed publication date
For fixed publication date bookings, in addition to the pure booking information, the string also contains information about the display of the table in the quote editor. Here is an example:
[
{
"type": "Table",
"propertyId": "a080E000006tLrXQAU",
"name": "Print AdSales Table Developer Magazine",
"value": "a0M0E000008imhsUAA",
"dispoValue": [
{
"adPosCatalogId": "a0M0E000008imhsUAA",
"reserved": "1",
"rotation": "1",
"blockValues": [
{
"adPosCatalogId": "a0M0E000008imhtUAA",
"blocked": "2"
},
]
}
],
"dataToDisplay": {
"columnLabels": [
"Ausgabe",
"Thema",
"Datum",
"Anzeigenschluss",
"Annahmeschluss",
"Platzierung"
],
"displayedRowList": [
{
"Ausgabe": {
"columnValue": "Developer Magazine.01.",
"columnType": "String",
"fieldName": "f42_dispo__IssueName__c"
},
"Thema": {
"columnValue": null,
"columnType": "String",
"fieldName": "f42_dispo__TeaserText__c"
},
"Datum": {
"columnValue": "2023-01-03",
"columnType": "Date",
"fieldName": "f42_dispo__PublicationDate__c"
},
"Anzeigenschluss": {
"columnValue": "2023-12-30",
"columnType": "Date",
"fieldName": "f42_dispo__ClosingDate__c"
},
"Annahmeschluss": {
"columnValue": "2023-12-28",
"columnType": "Date",
"fieldName": "f42_dispo__SubmissionDeadline__c"
},
"Platzierung": {
"columnValue": "1/1 page",
"columnType": "String",
"fieldName": "Name"
}
}
]
},
"fieldNames": [
"f42_dispo__Issue__r.f42_dispo__IssueName__c",
"f42_dispo__Issue__r.f42_dispo__TeaserText__c",
"f42_dispo__Issue__r.f42_dispo__PublicationDate__c",
"f42_dispo__Issue__r.f42_dispo__ClosingDate__c",
"f42_dispo__Issue__r.f42_dispo__SubmissionDeadline__c",
"f42_dispo__AdPosition__r.Name"
]
}
]
Section by section, the string is composed of the following information:
JSON | Meaning | Note |
---|---|---|
| each product property is enclosed as a whole with a square bracket |
|
| Property type: Table | Refers to the |
| ID of the respective product property |
|
| Name of the product property, as it is also displayed in the quote | Refers to the |
| The ID of the availability selected in the property and to which the reservation is credited. | Refers to the object If several outputs are reserved, the further IDs are listed comma-separated. |
| The following section contains the exact booking information. |
|
| The ID of the availability that was selected in the property and to which the reservation is credited.Identical to the entry under "value". | Refers to the object If multiple outputs are selected in the property, this following section is repeated per output/availability. |
| Quantity indication, how much was reserved - per issue | Fixed publication date dispo books have only quantity 1, i.e. the number of dispo books to be created corresponds to the quantity entered under "reserved". |
| By default, "1" is entered here; if rotation is used, this value would already be preassigned at the product and transferred here | |
| If there are blocking rules associated with the reserved ad positions, the availability to be blocked is displayed in this section | Refers to the object |
| A reservation can trigger more than one block entry. The number is stored in this section. | Entry depends on the |
| This information completes the relevant posting information for creating the dispo books |
|
| The following section deals with the display of the table in the Product Details dialog |
|
| Display of column headers | You can define the labels yourself in the product property. |
| Representation of the output to which the reservation is made, column by column, according to the scheme:
| You define which columns are displayed in the table in the product property. However, with MediaVelox we recommend sticking to the given sample query. If more than one output is reserved, the entry at this point is naturally longer. |
| The last section lists again all API names of the fields used in the Object Query. |
|
| The last square bracket closes the JSON |
|
Time period bookings
Time period bookings differ from fixed publication dates bookings in that they contain the further dimension "volume" per issue. In addition, the booking date does not coincide with the publication date of the issue, but a free period can be defined.
Since the representation of the property - the timeline - cannot be configured by the user, but comes from the MediaVelox package, the JSON turns out accordingly shorter:
[
{
"type": "Table",
"propertyId": "a080E000006tLrWQAU",
"name": "Digital AdSales Developer Community",
"value": "a0M0E000008imigUAA,100,2023-04-02,2023-04-12",
"dispoValue": [
{
"adPosCatalogId": "a0M0E000008imigUAA",
"startDate": "2023-04-02",
"endDate": "2023-04-12",
"volume": "100",
"reserved": "1",
"rotation": "0",
"VolumeType": "",
"blockValues": [
{
"adPosCatalogId": "a0M0E000008imieUAA",
"blocked": "100"
}
]
}
]
}
]
Section by section, the example is composed of the following information:
JSON | Meaning | Note |
---|---|---|
| each product property is enclosed as a whole with a square bracket |
|
| Property type: Table | Refers to the |
| ID of the respective product property |
|
| Name of the product property, as it is also displayed in the quote | Refers to the |
| In addition to the ID of the availability to which the reservation refers, the reserved volume (100) and the booking period entered in the quote (02.04.23-12.04.23) are also indicated under "Value", separated by commas. | Refers to the object If several outputs are reserved, the individual sections are listed separately with pipe. |
| The following section contains the exact booking information individually. |
|
| The ID of the availability that was selected in the property and to which the reservation is credited. Identical to the entry under "value". | Refers to the object If the posting spans multiple issues, this following part of the JSON is repeated per associated AdPosCatalog. |
| The start and end date as the user sets it in the prodThe volume entered in the quoteuct property. | If the booking extends over several issues, only the period matching the respective availability is entered here. |
| The volume entered in the quote | If the booking extends over several issues, the proportional volume per availability is entered here. |
| The entry under "reserved" is always 1 for time period based ad positions. |
|
| Rotation does not play a role in time period based bookings, therefore the entry is always 0 |
|
| currently not in use |
|
| If there are blocking rules associated with the reserved ad positions, the availability to be blocked is displayed in this section |
|
| the volume to be blocked | is calculated according to the percentage specification in the |
| closing brackets |
|