7.3.3 Adserver Name for Campaign items
Challenge
Do you want to create a unique Campaign item name for your Adserver that still looks nice on the Offer and your invoice documents?
Solution
You can use the field "AdServer Name". If this field is already in your layout or the Media Configuration you can manually make the line item name unique and write anything that helps you identify it later in the AdServer.
Ideally, the Administrator should create a flow and field update that generates a unique identifier in that field. This identifier is then transmitted to the Adserver instead of the Campaign item name.
Below you will find steps to set up a flow for updating Campaign items with the "Adserver Name" field.
1. Ad Server Naming Convention
To ensure that the line item name in the ad server is unique, you need to create a naming convention. This can be achieved by adding the Salesforce ID or any other unique identifier to the ad spec nameor a numbering system.
2. Set up a Flow with Field Update (optional)
To create a flow for Campaign Item with Adserver Name field update, follow the steps below:
Go to Setup and search for “Flows” in the Quick Search
Press the “New Flow” button and select the flow type as "Record-Triggered Flow"
As a triggering “Object” select “Campaign Item“
For the "Trigger The Flow When" option, select "A record is created", for the “Condition Requirements”, select "None", for "Optimize the Flow for:", choose the option "Actions and Related Record".
In the Flow Builder on your left with select the "Add Element" component and choose "Update Triggering Record".
The new window will open, in the “Label” field give it a name (without spaces) e.g "AutoGenerateAdserverName", and “API Name” will be provided automatically
In the"How to Find Records to Update and Set Their Values" section select "Use the campaign item record that triggered the flow".
In the "Set Filter Conditions" section, select "None - Always update record".
When setting field values for Campain Item, under the section “Set Field Values for the Campaign Item Record“ in the “Field” select “Adserver Name”(ADvendio__AdserverName__c)
In the “Value” section, select “New Resource”. In the new window choose “Formula” for “Resource Type”. Give the “API Name” a name as e.g. “AdServerName“ and select “Text” for “Data Type”.
Add the following formula to the new resource:
{!$Record.ADvendio__Ad_Price__r.ADvendio__Ad_Spec__r.Name} & "_" & {!$Record.ADvendio__Media_Campaign__r.ADvendio__Account__r.Name} & "_" & TEXT({!$Record.ADvendio__from_Date__c}) & "_" & {!$Record.Id}
Press the button “Check the Syntax”to ensure the formula is valid and save it with the button "Done".
Give the flow a name, like “AutoGenerateAdserverNameFlow“ and hit the “Save” button to keep all flow data created
Press the "Activate" button to activate the flow.
From now on, when you create new Campaign items, they will receive an auto-generated Ad Server name.