Versions Compared

Key

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

...

...

...

...

...

...

Set up Campaign Item Revenue Splits (Forecasts)

Forecasts (Sales/Site Goals & ) and Revenue Splits allow you to plan and track sales goals goals (forecasted revenue) per sales representative and compare them to real revenue as well as split this attained revenue (to calculate commissions) on the media campaign level between the involved sales team members. You can match the revenue against your sales goals per sales rep representative by Period, Site, Media and if applicable for each publication date depending on your needs.: 4.10 Sales and Site Goals (Budgeting and Forecasting).

Page Tree
root7.2.5 Setup Sales Goals or Site Goals

Important
Warning
title
Info

The general feature is called Forecasts and it has two record types assigned to it: Site and Sales Goals.

Warning

Important:

Please make sure that you decide what you like to report on before setting up your goals and splits.

  • Set Forecasts 

    • with or without SITE

    • with or without Advertiser and Agency

  • Do not mix SITE and Advertiser in one record. Make sure you choose either or, otherwise your Visual Force Page might not display the data correctly.

  • Either split Campaign Items or Revenue Schedules (Version 2.81 and higher). The latter has the advantage to split revenue calculated by delivery data not "plan" data, important mostly for digital sales.

If you change this at a later phase you will receive conflicting and wrong data.

ℹ️ Recommendation: Test this in your Sandbox and/or ask your ADvendio Consultant beforehand.

Overview

Table of Contents

1 Manage Record Types 

ADvendio offers two record types which you need to enable for your user profiles on the forecast Forecasts and Campaign Item Revenue Split objects if you like to use BOTH. 

  1. Sales Goals (default)

  2. Site Goals (disabled in the ADvendio package)

ℹ️ Publisher Goals

...

were deprecated in version 2.101

...

.

2 Configure the Visualforce Page

Set up the  the  7.2.5.2 Configure the Revenue Forecast VisualForce Page by modifying the correct feature settings.

3 Allow Manual Forecasts

...

Alternatively, to entering enter the data on the VFP, you can use the standard Salesforce layout. You also have the option to upload the data via a data loader or a similar import tool. To access the regular Salesforce page, please open the Setup and use the Object Manager to navigate to the Forecast object and change the New and Edit Button on the Forecast object:Image Removed

...

Edit and change back to Standard Salesforce instead of the Visual Force Page RevenueForecast:Image Removed

...

3 Apex: Create Campaign Item Revenue Split Records

The Apex job creates Campaign Item Revenue Splits records for each Media Campaign Team Member and Publication Date per Campaign Item. If there does not exist any Media Campaign Team Member, only one record is being created per Publication Date and Campaign Item.

The revenue is being split according to the following rules:

  • Each line item or the sum of all revenue schedules is split according to the percentage in the Team Member entry.

  • If there is no team member entry within the media campaign, a record without a sales representative will have to be created with 100% share.

  • A record is being created for each publication date.

3.1 Schedule the APEX Job CampaignItemRevenueSplit

An apex job creates the new records at the Campaign Item level and enters the amount from relevant campaign items into the revenue split object.Image Removed

...

Schedule an Apex job to generate Campaign Item Revenue Split records:

  1. Navigate to Setup > Develop > Apex Classes and click the button Schedule Apex.

  2. Enter a Job Name.

  3. Select the Apex Class CampaignItemRevenueSplit.

  4. Select the Frequency (Weekly, Monthly) as well as the start and end time.

  5. Click the button Save.

The exact start time will depend on the job queue activity.

3.2 When to re-run the APEX Job

  1. If you wish to start the Campaign Item Revenue Split please take care of Amount,

...

  1.  Quantity and any Discount fields that you use in your Org. 

  2. Please start the job again for all relevant items or even all items if you change any of the following fields in the mentioned objects

    1. the PageEquivalency on an existing Ad type 

    2. First Name or Last Name

...

    1. of an

...

    1. Existing User on Media Campaign Team Member or Forecast

    2. Date fields on an existing Publication Date

    3. Account Name on an existing Account in the Advertiser Agency Relation

    4. Amount Field on an existing Feature Setting Amount To Split 

Otherwise, the Campaign Item Revenue Split record will show old values.

3.3 Build your own scheduler for the APEX Jobs

You can also use these jobs in your own scheduler in APEX.

Here is an example for of a call of the batch which ignores the Fiscal Year filter and updates all forecasts:

Info

//

The

following

starts

the

creation

of

the

CIRS

and,

after

that

is

done,

the

rollup

will

be

automatically

started.

ADvendio.CampaignItemRevenueSplit

cirs

=

new

ADvendio.CampaignItemRevenueSplit(0);
cirs.rollUpCurrentFiscalYearFilterIsEnabled

=

false;
Database.executeBatch(cirs,

200);

//

The

following

starts

the

creation

of

the

CIRS

only

for

one/or

more

Media

Campaign.

Just

list

the

IDs.

ADvendio.CampaignItemRevenueSplit.execute(new

List<Id>{'a1F2G00000FJKqVUAX'});

4 Modify Amount

In addition to changing the visual force visualforce page for the forecast wizard, you can edit the follow following settings:

4.1 Split campaign Items by booked quantity

The standard amount field for splitting is the N2, API field ADvendio__Amount_net_net__c, but you can change this. Please navigate to App Launcher → Feature Settings and edit the record called "AmountToSplit" (Feature Name is RevenueForecast). You are able to define in the field Value other possible amount fields (API Name). "AmountToSplit" will be ignored if "RevenueScheduleAmountToSplit" exists.Image Removed

...

Feature Setting Name 

AmountToSplit 

Feature Name 

RevenueForecast 

Value 

The API name of field of object Campaign Item 

4.2 Split campaign items by revenue schedule

...

fields

To change from splitting each line campaign item (default) to splitting the total amount of all revenue schedule records add a feature setting with the following values below.

Feature Setting Name 

RevenueScheduleAmountToSplit 

Feature Name 

RevenueForecast 

Value 

The API name of field of object RevenueSchedule 

...


...

Info

"AmountToSplit" will be ignored if "RevenueScheduleAmountToSplit" exists.

5 Automize and Optimize the system

If you like to save yourself from manually running the apex job after changing certain objects (see above "When to re-run the APEX job") it is also possible to set up Lightning Flows that starts start a process to watch which changes have been done and automatically start the job if needed. You can request those flows for free by sending an email to support@advendio.com or by asking one of your ADvendio consultants. Either roll those out yourself or have this done as a paid service by an ADvendio Consultant.

...