Loading
PHP Vulnerability Monitoring Read More
Media Cloud
Design of Flows Run Before Saving Ad Placement Configuration in Media Plan

Design of Flows Run Before Saving Ad Placement Configuration in Media Plan

Admins can configure any type of flow to execute a business process when media planners and sales reps make changes to the configuration of ad placements in media plans and try to save their changes. If the requirement is to run a process that's actionable on media planners or sales reps, admins can configure a screen flow or an autolaunched flow. If the business process has to run behind-the-scenes and doesn't require an immediate action from media planners or sales reps, configure a scheduled flow.

Required Editions

Available in: Lightning Experience
Available in: Enterprise, Performance, and Unlimited editions with Media Cloud - Advanced

Considerations

Admins can only configure a flow to execute a business process that's related to changes in these tabs of the Line Item Configuration panel in media plans:

  • Line Item
  • Delivery
  • Attribute
  • Ad Spaces and Creatives
  • Bundle Items

Admins can't execute a flow for changes made by media planners and sales reps on a custom tab that the admins have added to the Line Item Configuration panel.

Flow Requirements

For a flow to execute in context of an ad placement and a Line Item Configuration panel tab, the admin must ensure that these resources are available in the flow:

Resource Type Resource Configuration Purpose
Variable
  • API Name: Id
  • Data Type: Text
  • Available for input: Selected
The input variable stores the ID of the ad quote line for which the flow is executed.
  • API Name: TabKey
  • Data Type: Text
  • Available for input: Selected

The input variable stores the unique key of the Line Item Configuration panel tab for which the flow is executed.

The possible values that passed onto the flow are

  • lineitemdetails
  • creatives
  • attributes
  • bundles
  • delivery

These values uniquely identify the tab for which the media planner or sales rep tried to make changes. Depending on how the admin wants to design their flows, the admin can use the value in the flow to identify for the next possible elements to execute in the flow.

  • API Name: Data
  • Data Type: Text
  • Available for input: Selected
The input variable stores information about the changes that the media planner or sales rep has made on a tab before trying to save the changes.
  • API Name: Response_IsSuccess
  • Data Type: Boolean
  • Available for output: Selected

This output variable indicates to the underlying logic of a media plan about whether the ad placement changes must be saved or not.

If the flow passes on true as the value, then the changes are saved.

Apart from these required parameters, admins can also add two optional resources that can display warning or error toast messages on the media plan if there are any issues with the changes made to the ad placement:

Resource Type Resource Configuration Purpose
Variable
  • API Name: Response_Errors
  • Data Type: Text
  • Allow multiple values (collection): Selected
  • Available for output: Selected
The output variable stores the message that's displayed on an error toast on the media plan.
  • API Name: Response_Warning
  • Data Type: Text
  • Allow multiple values (collection): Selected
  • Available for output: Selected
The output variable stores the message that's displayed on a warning toast on the media plan.
Tip
Tip Use these optional parameters for flows that are executed as soon as a media planner or a sales reps try to save their changes.
Example
Example The admin can configure a flow to check whether the media planner or sales rep has added a discount that's more than $20 or 30%. The flow use the TabKey variable to check whether the flow is executed for the Line Items tab and then use the Data variable in succeeding elements to find out whether the discount changes are beyond the set threshold. If the flow finds that the discount changes are within the threshold, then the flow can set the value of the Response_IsSuccess variable to true. If the discount changes are beyond the threshold, then the flow can set the value of the Response_IsSuccess variable to false and display a screen component on the media plan to inform the media planners or sales reps about the possible next steps.

Ad Availability View Configuration Record

To execute a flow when media planners and sales reps try to save changes on a tab of the Line Item Configuration panel for an ad placement, admins must add this Ad Availability View Configuration record with these required values:

  • Configuration Key: side-panel-pre-save-flow
  • Configuration Value: The API name of the flow to execute
  • Is Active: Selected

To learn about how to create an Ad Availability View Configuration record, see Configure a Pricing Model of Your Choice (Example).

 
Loading
Salesforce Help | Article