To apply custom pricing logic and automate record updates in Media Cloud, create a
procedure plan. Incorporate Pre-Apex and Post-Apex hooks alongside your core pricing procedures
to apply targeted discounts and fees smoothly. Use this automated workflow to eliminate manual
data entry and ensure accurate, consistent pricing execution across your media
plans.
Required Editions
Available in: Lightning Experience
Available in: Enterprise, Performance, and Unlimited editions with Media Cloud-
Advanced
User Permissions Needed
To create procedure plans:
Procedure Plan Access
Salesforce Pricing Design Time User
Before you begin:
Turn on Procedure Plan Orchestration for Pricing in Revenue Cloud Settings.
Turn on Exclude Default and Sales Transaction Type Pricing Procedures in Revenue Cloud
Settings.
Verify that your Apex classes implement the revenue signaling framework.
Create a procedure plan so that Salesforce applies the pre-hook discount and ad
server fee.
From Setup, in the Quick Find box, enter Procedure Plans, and
then select Procedure Plan Definitions.
Click New.
Enter a title and developer name for the procedure plan.
For Process Type, select Revenue Cloud.
For Primary Object, select Quote.
Select the context definition that you configured for the default procedure for the
media plan.
Save the procedure plan.
Create another procedure plan with Order as the primary object.
Configure Sections and Steps
Configure your procedure plan to apply custom pricing logic such as a pre-hook
discount and an ad server fee. Add a Pre-Apex Hook to evaluate conditions such as the quote
name, and then include your existing pricing procedure. Use a Post-Apex Hook to update the
description field on the quote line item automatically.
Open the procedure plan that you created.
Add an Apex Pre Hook section.
Select the Apex class that implements the revenue signaling framework.
Define a condition for when the hook runs.
For example, Quote Name Equals Run Apex Pre Hook.
Configure the hook logic.
For example, apply a 2% discount and a $5 ad server fee.
Add a Pricing Procedure section.
Select the pricing procedure to include in the plan.
Add a Apex Post Hook section.
Select the Apex class for post-processing.
Configure the hook logic.
For example, update the description field on the quote line item.
Save and activate the procedure plan.
Verify the Configuration
To verify your custom pricing logic, run pricing on your media plan and review the calculated adjustments.
Open a media plan with quote line items.
Run pricing on the media plan.
Verify these details on the quote line items.
Salesforce applied the pre-hook discount and ad server fee.
The net unit price reflects the calculated adjustments.
The post-hook description appears on the quote line item.
Did this article solve your issue?
Let us know so we can improve!
Loading
Salesforce Help | Article
Cookie Consent Manager
Cookie Consent Manager
General Information
Required Cookies
Functional Cookies
Advertising Cookies
General Information
We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required Cookies
Always Active
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional Cookies
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising Cookies
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.