Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Challenge

Do you want to create a unique Campaign item name for your ADServer Adserver that still looks nice on the Offer and your invoice documents, you have the option to ?

Solution

You can use the field "AdServer Name". If this field is already in your layout or even in the Media Config Configuration you can manually make the line item name unique and write anything that helps you identify it later in the Ad ServerAdServer.

Ideally, have your the Administrator should create a workflow flow and field update 7.4.1 Create Workflows to automatically write that generates a unique identifier into in that field which . This identifier is then gets 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.pngImage Added

1. Ad Server Naming Convention

In order to make To ensure that the line item name within in the ad server is unique, you need to come up with create a naming convention that could . This can be achieved by adding the salesforce id Salesforce ID or any other unique identifier to the ad spec name or 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:

  1. Go to Setup --> Create --> Workflow & Approvals --> Workflow and create a workflow which executes when created, and every time it's edited.

  2. As an Object select "Campaign Item"

  3. Criteria could be: Created Date NOT EQUAL TO null

  4. Add a new Workflow Action

  5. Click on "New Field Update"

  6. Enter a "Name" e.g. "Auto-Generate ad server name"

  7. The "Unique Name" will be filled out automatically if you hit enter. In case not, enter a unique name e.g. "Auto_Generate_adserver_name"

  8. Enter a "Description" and explain  e.g. what the use of this field update is

  9. As Field to Update select Campaign Item / Adserver Name

  10. Add a Formula similar to this to concatenate ADvendio fields into a "new" name: (Example)
    and search for “Flows” in the Quick Search

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

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

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

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

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

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

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

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

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

  20. Add the following formula to the new resource:

    Code Block
    {!$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}) & "_"
    &  
    Id
     &
    {!$Record.Id}
  21. Press the button “Check the Syntax”to ensure the formula is valid and save it with the button "Done".

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

  23. ⚠️ Press the "Activate" button to activate the flow.

Info

From now on, when you create new Campaign items, they will receive an auto-generated Ad Server name.