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.

 

Screenshot 2024-01-04 at 13.17.55.png
field “Adserver Name"

 

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)

Screenshot 2024-01-04 at 15.41.24.png

 

To create a flow for Campaign Item with Adserver Name field update, follow the steps below:

  1. Go to Setup and search for “Flows” in the Quick Search

  2. Press the “New Flow” button and select the flow type as "Record-Triggered Flow"

  3. As a triggering “Object” select “Campaign Item

  4. 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".

  5. In the Flow Builder on your left with select the "Add Element" component and choose "Update Triggering Record".

  6. 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

  7. In the"How to Find Records to Update and Set Their Values" section select "Use the campaign item record that triggered the flow".

  8. In the "Set Filter Conditions" section, select "None - Always update record".

  9. 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)

  10. 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”.

  11. 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}
  12. Press the button “Check the Syntax”to ensure the formula is valid and save it with the button "Done".

  13. Give the flow a name, like “AutoGenerateAdserverNameFlow“ and hit the “Save” button to keep all flow data created

  14. 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.