7.2.22 Setup of the Campaign Builder


2.149 and up

The Campaign Builder feature is currently in an open beta status. If you like to take a look into this feature feel free to do so. We are looking forward to your feedback as well as enhancement ideas. Please contact our Customer Success Management team or support@advendio.com to share feedback with us.

Accessing the Campaign Builder

The Campaign Builder can be accessed by two different ways:

  • via Media Search

  • via Campaign Item Related List.

The two options can be set up without major effort by an admin. Please follow the steps below.

In order to navigate to the Campaign Builder from the Media Search please go to the Administration settings and enable in the section “Media Search” the checkbox Redirect to Campaign Builder.

Please take note that the Campaign Builder currently needs to be opened via the ADvendio Campaign item Related List and not via the standard Salesforce Related List due to technical restrictions.

Existing Campaign Items can be opened and edited via the Campaign Item Related List. To show the Action Button that allows editing items in the Campaign Builder, the following feature settings has to be edited:

  • Feature Setting Name: ActionButtons

  • Feature Name: CampaignItemRelatedList

Please include in the Value field of the Feature Setting the following record inside of the json structure. You can define the label of the button however you like. Depending on where you would like to show it you can also move it around in the value list:

1 2 3 4 5 6 7 8 9 10 11 12 13 { "title":"Change Items", "label":"Change Items", "componentDefinition":{ "componentDef":"ADvendio:campaignBuilderWrapper", "attributes":{ "mode":"edititems", "recordId":"$mcId$", "campaignItemIds":"$recordIds$" } }, "type":"lwc" }

 Here is a full example of the setting where the Campaign Builder button is second:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 { "Buttons":[ { "title":"Add Items", "label":"Add Items", "action":"/apex/ADvendio__SelectSearch?Id=$mcId$", "type":"vf" }, { "title":"Change Items", "label":"Change Items", "componentDefinition":{ "componentDef":"ADvendio:campaignBuilderWrapper", "attributes":{ "mode":"edititems", "recordId":"$mcId$", "campaignItemIds":"$recordIds$" } }, "type":"lwc" }, { "title":"Edit Items", "label":"Edit Items", "action":"/apex/ADvendio__MediaConfiguration?id=$mcId$&selected=$recordIds$", "type":"vf" }, { "title":"Optimize Items", "label":"Optimize Items", "action":"/apex/ADvendio__NavigateToOptimizer?id=$mcId$&selected=$recordIds$", "type":"vf" }, { "title":"Delete Items", "label":"Delete Items", "action":"/apex/ADvendio__DeleteCampaignItems?id=$mcId$&selectedIds=$recordIds$", "type":"vf" }, { "title":"Sort Items", "label":"Sort Items", "action":"/apex/ADvendio__SortCampaignItems?Id=$mcId$", "type":"vf" }, { "title":"Show Recommendations", "label":"Show Recommendations", "action":"/apex/ADvendio__ProductRecomm?id=$mcId$", "type":"vf" }, { "title":"Check Availability", "label":"Check Availability", "action":"/apex/ADvendio__CheckAvailabilityCi?id=$mcId$&selectedIds=$recordIds$", "type":"vf" }, { "title":"Submit to AdServer", "label":"Submit to AdServer", "action":"/apex/ADvendio__SubmitToAdServer?id=$mcId$&selectedIds=$recordIds$", "type":"vf" }, { "title":"Creative Upload", "label":"Creative Upload", "action":"/apex/ADvendio__CreativeUploadCi?id=$mcId$&selectedIds=$recordIds$", "type":"vf" }, { "title":"Update Ad-Status in AdServer", "label":"Update Ad-Status in AdServer", "action":"/apex/ADvendio__UpdateAdServerAdStatus?id=$mcId$&selectedIds=$recordIds$", "type":"vf" }, { "title":"Get Delivered Clicks/Impressions", "label":"Get Delivered Clicks/Impressions", "action":"/apex/ADvendio__DeliveredClicksAndImpressionsImport?id=$mcId$&selectedIds=$recordIds$", "type":"vf" } ] }

As a result one or many items can be edited via the Campaign item Related List and the Campaign Builder.

Item Configuration Setting

The setup of the Campaign Builder is currently not covered by a UI. We are working on this. Please take not that the setup might require some technical understanding and the use of a json formatter, such as this one: JSON Formatter & Validator

The object “Item Configuration Settings” keeps all configuration needed to run the Campaign Builder and is also allowing to define certain fields and their state to be shown based on conditions.

Please take note that the setting will need to be created manually if there is no record existing in your org yet.

App Launcher > Item Configuration Settings > New record

Tabs and Columns: [{"name":"Period","columns":[{"fieldpath":"ADvendio__from_Date__c"},{"fieldpath":"ADvendio__until_Date__c"},{"fieldpath":"ADvendio__LineDescription__c"}]},{"name":"Pricing","columns":[{"fieldpath":"ADvendio__Quantity__c"},{"fieldpath":"ADvendio__Frequency__c"},{"fieldpath":"ADvendio__Sales_Price__c"},{"fieldpath":"ADvendio__SurchargeSalesPrice__c"},{"fieldpath":"ADvendio__SurchargeSalesPricePct__c"},{"fieldpath":"ADvendio__Amount_B3__c"}]},{"name":"Surcharges","columns":[{"fieldpath":"advendio__amount_b3__c"},{"fieldpath":"advendio__surchargeb3__c"},{"fieldpath":"advendio__surchargeb3abs__c"},{"fieldpath":"advendio__amount_b2__c"},{"fieldpath":"advendio__surchargeb2__c"},{"fieldpath":"advendio__surchargeb2abs__c"},{"fieldpath":"advendio__amount__c"}]},{"name":"Discounts","columns":[{"fieldpath":"ADvendio__Quantity_Discount_custom__c"},{"fieldpath":"ADvendio__RateDiscount1AbsCustom__c"},{"fieldpath":"advendio__rate_discount_2_custom__c"},{"fieldpath":"advendio__ratediscount2abscustom__c"},{"fieldpath":"advendio__rate_discount_3_custom__c"},{"fieldpath":"advendio__ratediscount3abscustom__c"},{"fieldpath":"advendio__rate_discount_4_name__c"},{"fieldpath":"advendio__rate_discount_4__c"},{"fieldpath":"advendio__ratediscount4abscustom__c"},{"fieldpath":"advendio__amount_net__c"}]},{"name":"Targeting","columns":[{"fieldpath":"targeting"}]}]

Static Columns: ["name","advendio__billing_category__c"]

Actions: [{"value":"copy","label":"Copy","isSubitemAction":false,"isItemAction":true},{"value":"delete","label":"Delete","isSubitemAction":false,"isItemAction":true}]

Tab Rules: [{"readonlyFields":["advendio__sales_price__c"],"name":"Make Sales Price read only","logicalConnector":"AND","conditions":[{"value":"true","operator":"==","fieldpath":"user.isactive"}]},{"name":"Print products hide fields","logicalConnector":"AND","hiddenFields":["targeting"],"conditions":[{"value":"Print","operator":"==","fieldpath":"ADvendio__Ad_Price__r.ADvendio__Ad_Spec__r.ADvendio__Ad_Type__r.RecordType.DeveloperName"},{"value":"ADvendio","operator":"==","fieldpath":"ADvendio__Ad_Price__r.ADvendio__Ad_Spec__r.ADvendio__Ad_Type__r.RecordType.NamespacePrefix"}]},{"name":"Make targeting hidden in package headers","logicalConnector":"AND","hiddenFields":["targeting"],"conditions":[{"value":"Packet","operator":"==","fieldpath":"ADvendio__Ad_Price__r.ADvendio__Ad_Spec__r.RecordType.DeveloperName"},{"value":"ADvendio","operator":"==","fieldpath":"ADvendio__Ad_Price__r.ADvendio__Ad_Spec__r.ADvendio__Ad_Type__r.RecordType.NamespacePrefix"}]}]

Page Size: 40

The following information can be set in the Item Configuration Settings:

  • Tabs and Columns: to set up which tabs and which fields per tab will be shown.

  • Static Columns: to define which fields should be shown as a part of every tab in the beginning.

  • Actions: to define which actions should be offered per row.

  • Tab Rules: to define certain fields and their state to be shown based on conditions.

  • Page Size: to define a pagination being used to handle big campaigns with a better overview. The number defines how many items will be shown per page (packages count as 1 item).

Tabs and Columns

The block below shows a short example of a possible tab and column setup value. The names define the tab names and the columns contain the field names to the relevant fields you would like to show. Please make sure to add the "fieldpath" in front of every field you would like to add and take also note that the API name needs to be added for the fields. To add our new targeting component to the setup you can simply enter the name “targeting” behind the fieldpath.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 [ { "name":"Tab 1", "columns":[ { "fieldpath":"ADvendio__from_Date__c" }, { "fieldpath":"ADvendio__until_Date__c" }, { "fieldpath":"ADvendio__Quantity__c" } ] }, { "name":"Tab 2", "columns":[ { "fieldpath":"targeting" } ] } ]

Static Columns

These define which static columns you would like to show as a part of every tab in the beginning.

The block below shows a short example of a possible static column value. You can add more fields by adding a comma after the last field and setting the API name framed in quotes.

1 ["Name","ADvendio__Billing_Category__c"]


The actions are relevant to offer your user some quick options while working with Campaign items. Currently we support actions to copy items and to delete items.

Please find an example setup in the block below. You can change the boolean values (true or false) if you want to hide certain action on row level or if you want to show certain actions on Package component level.

1 2 3 4 5 6 7 8 9 10 11 12 13 [ { "label": "Delete", "value": "delete", "isItemAction": true, "isSubitemAction": false }, { "label": "Copy", "value": "copy", "isItemAction": true, "isSubitemAction": false } ]

Page Size

Defines the amount of records to be shown on a page. Package Items are considered as one record regardless the amount of components. Please enter a number depending on your needs.

Tab Rules

The Tab Rules define if certain fields should be hidden under conditions or if certain fields should be shown as read only or required under certain conditions.

The conditions will be connected with the logical Connector AND or OR.

A Tab Rule contains the following information:

  • name

  • conditions

  • readonlyFields

  • hiddenFields

  • requiredFields

  • logicalConnector

  • allFieldsReadonly

  • applyRuleInChildItem












Field to evaluate

If it is a field from Campaign Item


If it is a field from current User, add the user. prefix




By now, it only accepts equal operator “==”




Value to match




Reserved or internal use


 Currently the Campaign Builder manages some Tab Rules fixed in background, not available to be edited by the user to cover logic for linear packages.

Tab Rules Example

In the following example we have one rule:

Hide Sales Price

with logicalConnector AND:

when the condition is met:

user.isactive == true

hide the following field:


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 [ { "name": "Hide Sales Price", "logicalConnector": "AND", "conditions": [ { "fieldpath": "user.isactive", "operator": "==", "value": "true" } ], "hiddenFields": [ "advendio__sales_price__c" ] } ]

 You can start the field path for the conditions either from the user object as in the example above or from the campaign item with the first relevant field, e.g. "advendio__ad_price__r.advendio__ad_spec__r.advendio__distribution__c" .

Error Handling in Item Configuration Setting

When there is an error in one of the field values due to a wrong JSON you will get an error while saving. Errors are shown with the message: “Please check the json structure.”. If this is happening please check if the values you entered are valid following an online JSON formatter as mentioned above.