Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos

CAMPAIGN APPROVAL PROCESS

 

This blog explains how to trigger the campaign Approval process via Actions. Creation of a custom workflow is also included to explain the complete business scenario.

 

Business Scenario

 

Once employee responsible changes the status of Campaign to "Request for Approval", the Campaign approval request would be sent to approver by a workflow; also an email notification will be send to Approver.

Similarly, when Approver approves/ rejects a campaign, the emails notifications would be sent to employee responsible for campaign through workflow based on campaign status change.

Although there is standard workflow existing for Campaign Approval, here is an example of creating a custom workflow as per business specific requirements.

I have divided it in two parts- First part explains the assignment of this workflow to action and second part explains the creation of workflow.

 

 

Part 1: Assignment of Workflow to Action

 

Step 1:

 

Creating Action Profile, Define Actions and assigning the new Campaign Approval Workflow
Action Profile:

To define action profile & action, Navigate through following path:

IMG -> Customer Relationship Management -> Basic Functions -> Actions -> Actions in Marketing planning -> Create actions with wizard

 

Define action profile

 

 

Define Action

 

 

Select processing type as "Workflow"

 

 


Select the Workflow

 

 

 

Step 2:

 

Defining Condition

 

To define conditions, navigate through following path:
IMG -> Customer Relationship Management -> Basic Functions -> Actions -> Actions in Marketing Planning -> Change Actions & Conditions -> Define Conditions

 

Provide Schedule Condition & Start Condition

 

 

Step 3:

 

Assign this new action profile to campaign type.

Follow the navigation path:
IMG -> Customer Relationship Management -> Marketing -> Marketing Planning & Campaign Management -> Basic Data -> Define Types/ Objectives/ Tactics

 

 

 


Part 2: Creating a custom Campaign Approval workflow which is triggered via actions and controlled via user status


In our scenario we have to pick email id from user detail and not from customer detail. For this we developed a custom Business object as follows -


Logic for determining email address of a business partner (From user detail)

As these BP will be maintained as user, so we need to pick the email address from user detail.

  • Create new object ‘ZBUSUSMAIL' and a create new method ‘GetEmail' which will have BP ID/GUID as import parameter and will return back the email attached to the BP. 
  • In this method call function module ‘BP_CENTRALPERSON_GET' to determine the username attached to the BP 
  • Call function module ‘BBP_USER_GET_DETAIL_BBP_USR01' which will return the email address attached to the user.


Workflow: Triggered when status is changed to Request for Approval.

 

Step 1:

 

Go to transaction code SWDD. Create a new workflow.
Workflow Abbreviation: ZMKCPAPPR
Workflow Name: Campaign_Approval

 

Step 2:

 

Add a new step of type ACTIVITY. In this activity create a new TASK say ‘Get Approver'. In this task under tab basic data specify object type - BUS2010020 and method ‘GETPARTNERFUNCTIONS'. This method returns the list of partners associated with the campaign. Specify Partner Function and Partner function Category for Approver and this will return the Approver.

 

Step 3:

 

Add a new step of type ACTIVITY. In this activity create a new TASK say ‘Get Email'.
In this task under tab basic data specify object type - ‘ZBUSUSMAIL' and method ‘GetEmail'. Pass the Approver ID and get the email address of the Approver.

 

Step 4:

 

Add a new step of type ACTIVITY. In this activity create a new TASK say ‘Get Employee Responsible'. In this task under tab basic data specify object type - BUS2010020 and method ‘GETPARTNERFUNCTIONS'. This method returns the list of partners associated with the campaign. Specify Partner and Partner function Category for employee responsible and this will return the Employee responsible.

 

Step 5:

Add a new step of type ACTIVITY. In this activity use TASK say ‘Get Email' above. In this task under tab basic data specify object type - ‘ZBUSUSMAIL' and method ‘GetEmail'. Pass the employee responsible ID [Determined from step 5] and get the email address.

 

Step 6:

 

Add a step of type Send Mail. Send the mail to Approver (determined from step 3) with following text - Please approve the campaign<Campaign Description >

 

Step 7:

 

Add a new step of type Activity. In this activity create a new task say ‘Approve Campaign'. In this task under tab basic data specify object type - BUS2010020 and method ‘EDIT_AYSNC'. Specify the description ‘Please approve the campaign<Campaign Description >. In the Agent assign the user name of Approver (Determined in Step 2).
It will have two outcomes -

Approved - This will be mapped to Event "Approved"
Not Approved - This will be mapped to Event "Locked"

Note - The user status need to be mapped the existing events. This can be achieved via transaction
Code BSVZ.

 

Step 8:


If the Approver has "Approved" the Campaign -

Add a step of type Send Mail. Send the mail to employee responsible (determined from step 5) with following text - Campaign "" has been approved by Approver "" (Determined in Step 2)

 

Step 9:

 

If the Approver has "Not Approved" the Campaign -

Add a step of type Send Mail. Send the mail to employee responsible (determined from step 5) with following text - Campaign "" has been rejected by Approver "" (Determined in Step 2)

7 Comments