SAP Home Learn Build Integrate Model Operate Extend with AI ConnectTutorial navigator Knowledge Graph API Devtoberfest Developer Advocates App Space

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
⤢ Open full site

xP&A CX Marketing Planning - Allocate Activity Costs Across Multiple Periods

This tutorial will show you how to extend the activity spend logic in order to allocate activity costs across multiple periods in a date range specified by a start and end date.

Overview

🎓 advanced 60 min. SAP Analytics CloudAdvancedSAP Integration Suite

You will learn

  • how to extend all of the involved components for the marketing campaign planning in order to allocate activity costs across multiple periods
  • how to add additional properties to SAP Analytics Cloud dimensions
  • how to change user interface elements in SAP Analytics Cloud stories
  • how to change script functions in SAP Analytics Cloud stories
  • how to adapt data actions SAP Analytics Cloud SAC
Simon Kranig S Simon Kranig August 7, 2024
Created by November 9, 2023
Contributors

Prerequisites

Prerequisites

Steps

Intro

In the default content for marketing campaign planning, when planning a marketing activity, the marketing activity spend is allocated to a particular period only which is derived from the user input entered in the invoice date field. This is how the activity form looks by default:

ActivityFormBefore
ActivityFormBefore

The activity spend is then allocated according to the individual products revenues chosen during activity creation.

ActivityAllocationBefore
ActivityAllocationBefore

This tutorial will enable you to extend the concept to allocate marketing activity spend to a time period based on a start and end date provided by the user. The updated form will look like this:

ActivityFormAfter
ActivityFormAfter

The activity spend is then split/allocated according to the prorated product revenues for each product according to the number of days of each involved period within the chosen time interval.

ActivityAllocationAfter
ActivityAllocationAfter

To achieve this you will need to go though all components of the content:

  • Data model (attributes of marketing activity time dimension)
  • UI (Story and Scripting)
  • Data action (adjust to do the prorating and allocation across a time interval)

So let us get started.

Step 1 Update dimension properties of marketing activity dimension

Have a look at the properties of the dimension Marketing Activity (SAP_MKT_CampaignActivity). To store the start and end date for an activity entered by the user we will need to extend the properties for the marketing activity dimension.

Open the marketing planning model Marketing Planning (SAP_MKT_IM_MarketingPlanning), searching for it in the file browser of SAP Analytics Cloud.

OpenStory
OpenStory

In the dimension on the left-hand side, click on the entry for Marketing Campaign Activity (SAP_MKT_CampaignActivity) to open the dimension details on the right-hand side.

OpenActivityDimension
OpenActivityDimension

On the right-hand side in the Properties list, click on the “+” to add two new properties.

IdDescriptionTypeLength
StartDateStart DateText10
EndDateEnd DateText10

Enter the needed values and click on Create to close the property editor

AddStartDate
AddStartDate

Repeat the same to add the property EndDate.

Once you are done, click the Save icon to save the model.

SaveDataModel
SaveDataModel

Now you have two properties to store the start and end date for the marketing activity.

AddedTwoProperties
AddedTwoProperties

Step 2 Update data action for maintaining an activity
+
Step 3 Update data action for recalculation of all activities (optional)
+
Step 4 Update activity input form to extend with additional field for end date
+
Step 5 Update the initialization of the marketing activity pop-up
+
Step 6 Update the save operation of the marketing activity pop-up
+
Step 7 Final Remarks
+

Resources

Discussion

Share feedback on this tutorial or join the conversation in SAP Community.

Submit detailed feedback Discuss in Community
Steps
Step 1 of 7
1. Update dimension properties of marketing activity dimension 2. Update data action for maintaining an activity 3. Update data action for recalculation of all activities (optional) 4. Update activity input form to extend with additional field for end date 5. Update the initialization of the marketing activity pop-up 6. Update the save operation of the marketing activity pop-up 7. Final Remarks

Learn more →