Browser version scriptSkip Headers

Oracle® Fusion Applications CRM Extensibility Guide
11g Release 7 (11.1.7)
Part Number E20388-06
Go to Documentation Home
Home
Go to contents  page
Contents
Book<br />List
Book
List
Go to Feedback page
Contact
Us

Go to previous page
Previous
Go to previous page
Next
PDF

14 Oracle Fusion Marketing Extensibility

This chapter contains the following:

Oracle Fusion Marketing Extensibility : Overview

Customizing Sales Campaigns in Oracle Fusion Marketing: Explained

Creating a Sales Lead Validation Rule Using Application Composer : Worked Example

Sales Lead Approval Flow : Worked Example

Extending Simplified Pages for Leads : Explained

Extending Simplified Pages for Leads using Oracle Fusion CRM Application Composer : Worked Example

Oracle Fusion Marketing Extensibility : Overview

Read this chapter to learn about how to extend objects and pages that belong to Oracle Fusion Marketing. In this chapter, you will learn about:

Customizing Sales Campaigns in Oracle Fusion Marketing: Explained

Use the Oracle Fusion CRM Application Composer to create custom fields for the sales campaign object, which you then add for display in the Sales Campaign work area. This topic describes the customization options for sales campaigns. Note that the fields and sections modified apply to mini campaigns as well as sales campaigns. To access the Application Composer, select Application Composer from the Navigator menu, under the Tools category.

Extensibility: Quick Steps

This section provides a brief overview of the steps to customize the sales campaign work area.

Follow these steps:

  1. Navigate to the Application Composer, select Marketing as the Application, expand the Standard Objects tree node, then select Sales Campaign.

  2. Choose the Fields node to create custom fields, or modify standard fields.

  3. Choose the Pages node to show or hide fields, either custom or standard.

  4. Test your work by navigating to the Sales Campaign work area to view your changes.

Understanding Which Oracle Fusion Sales Campaign Pages Are Extensible

You can extend only the region at the top of the Sales Campaign page. The panel will adjust based on how many fields you add. The name of the region changes depending on where you are in the sales campaign flow.

Depending on the sales campaign status, the fields that you add to this region might or might not be editable. The following list shows which regions and pages are extensible, along with some notes for each:


Region and Page

Are the fields editable?

Campaign Summary region on the Create Sales Campaign: Enter Campaign Details page

Yes

Campaign Summary regions on other Sales Campaign pages

Only if the campaign is in Draft status. Otherwise, not editable.

Campaign Details region (displays on Sales Campaign pages for completed campaigns)

No

The following screen shot shows some of the page sections that can be customized. The regions that you can customize are indicated by red boxes.

Screen shot showing the various regions of the Sales
Campaign page that can be customized using Application Composer

Adding or Modifying Object Fields

To add custom fields to the Sales Campaign regions listed above, first create your custom fields by selecting the Fields node under the sales campaign object. Then, select either a standard field to modify, or create a custom field.

Screen shot showing the Sales Campaign Standard Fields
tab in Application Composer

For standard fields, you can modify these options:

Adding Your Changes to the Run Time Application

After you've created custom fields for the sales campaign object, use the Application Composer's configuration pages to add those custom fields to the extensible regions listed above. You access the configuration pages in the Application Composer from the Pages node under the Sales Campaign object.

To access the Pages Overview page:

  1. Select the Marketing application on the main Overview page.

  2. In the object tree, select the Sales Campaign object.

  3. Select the Pages node.

  4. On the Enterprise Pages tab, select the configuration page hyperlink related to the Sales Campaign page that you want to customize.

Screen shot showing the sales campaign pages that you
can customize in Application Composer.

Notes About Sales Campaign Extensibility

The following customization options are not supported for sales campaigns:

The following customization options do not apply to sales campaigns:

Creating a Sales Lead Validation Rule Using Application Composer : Worked Example

Lead management users can change the status of a lead to Qualified, regardless of whether the lead customer is a sales account or has a primary product associated with the lead. However, to enforce compliance with your company's lead management business processes, you might want to create business rules to control when a lead's status can actually be changed to Qualified.

To do this, use the Oracle Fusion CRM Application Composer to create validation rules to enforce certain criteria before allowing a sales lead status to be changed to Qualified.

In this example, you will use the Application Composer to create a validation rule that ensures a primary product and sell-to address exist, before a lead's status can be changed to Qualified.

Create a validation rule for Sell-to Address

  1. Go to Navigator, Application Composer.
  2. From the Application field, select Marketing.
  3. From the Objects View, select Standard Objects, Sales Lead, Server Scripts.
  4. Click the Object Functions tab, and then click the Add a New Object Function icon to go to the Create Object Function screen.
  5. In the Function Name field, enter the following name without spaces: isSellToExists In the Returns field, select Boolean.
  6. In the Function Body area enter the following: if(null != CustomerId){ def partySites = newView('Address'); def criteria = partySites.createViewCriteria(); def criteriaRow = criteria.createRow(); criteria.insertRow(criteriaRow); def criteriaItem = criteriaRow.ensureCriteriaItem('PartyId'); criteriaItem.setValue(CustomerId) partySites.appendViewCriteria(criteria) partySites.executeQuery(); while(partySites?.hasNext()) { def partySite = partySites.next(); def partySiteUses = partySite?.getAttribute('PartySiteUse'); while (partySiteUses?.hasNext()) { def partySiteUse = partySiteUses.next(); if ('SELL_TO' == partySiteUse?.getAttribute('SiteUseType')) { return true; } } } } return false;
  7. Click Validate.
  8. Click Save and Close.

Create a rule for enforcing the Primary Product association for the sales lead

Next, you want to create a rule for enforcing the primary product association for the sales lead as follows:

  1. Click the Add a New Object Function icon to go to the Create Object Function screen.
  2. In the Function Name field, enter the following name without spaces: isPrimaryProductAssigned. In the Returns field, select Boolean.
  3. In the Function Body area enter the following: if((null != PrimaryInventoryOrgId && null != PrimaryInventoryItemId) || null != PrimaryProductGroupId) return true; else return false;
  4. Click Validate.
  5. Click Save and Close to return to theServer Scripts Sales Lead screen.

Create a validation rule to check for Lead qualification

  1. Click the Validation Rules tab and from the Object Rules area, click the Add a new validation rule icon.
  2. In the Create Object Validation Rule screen, go to the Rule Name field and enter the following rule name without spaces: qualifyLead
  3. In the rule definition area , enter the following: if(isAttributeChanged('StatusCode') && getAttribute('StatusCode') == 'QUALIFIED') return (isPrimaryProductAssigned() && isSellToExists()); else return true;
  4. Go to the Error Message section and enter the following message text: Primary Product and Sell to Address are required for qualifying a Lead.
  5. Click Save and Close to complete the task of using the Application Composer to create validation rules for the primary product and sell-to address fields when setting the lead to qualified.

Test the rule

  1. Go to Navigator, Lead Qualification, Edit Lead page.
  2. From the Actions menu, select Qualify.

    If the Primary Product andSell to Address fields contain no data, you should receive the following error message text:

    Primary Product and Sell to Address are required for qualifying a Lead.

Sales Lead Approval Flow : Worked Example

This worked example shows you how to use object workflows and business processes to create and trigger an approval process.

In this example, you are a sales administrator and your management has asked you to create a workflow to automate the approval process as follows:

  1. The approval process should be triggered when a sales representative creates a sales lead with a deal amount greater than $100000.

  2. When the approval process is triggered, the sales manager of that representative should automatically receive a request for approving the deal.

As a sales administrator, you will also test this approval process.

Step 1: Create a Field to Track the Approval Status

In this step, you will create a field to track the status of the approval and add this field to the desired pages.

  1. Sign in to Oracle Fusion Applications as an administrator.

  2. Create a sandbox and activate it.

    Sandboxes in Oracle Fusion Applications provide robust out-of-the-box functionality to help isolate and control customization efforts without impacting other users' configuration or production environment, or both. For more information on sandboxes, see Sandboxes: Explained topic.

  3. Navigate to Application Composer.

    The Sales Lead object belongs to marketing application; therefore, select Marketing from the Application drop down.

  4. In the left pane, open the Standard Objects tree.

  5. Select the Sales Lead object.

  6. Select the Fields node.

  7. In the Custom tab, click Create under the Action menu.

    A Select Field Type popup appears.

  8. Select Text in the popup.

  9. Click OK.

    This opens a Create Text Field page.

  10. In the Appearance region, enter the Display Label as Large Deal Approval.

  11. Click Save and Close.

  12. In the left pane, select the Pages node of the Sales Lead object.

  13. Under Enterprise Pages tab, click Create Lead.

  14. In the Create Lead page, move the Large Deal Approval field from the Available Fields box to the Selected Fields box.

  15. Click Save and Close.

    You have now added the custom approval field to the create lead page.

  16. Under Enterprise Pages tab, click Show Details.

  17. In the Show Details page, move the Large Deal Approval field from the Available Fields box to the Selected Fields box.

  18. Click Save and Close.

    You have now added the custom approval field to the show details page.

    At this point, you are working within your sandbox. You have created a custom field and have added that field to two pages.

    Note

    Configurations done within a sandbox for object workflows and business processes are not available to the mainline application unless published.

  19. Publish your sandbox to make these changes available for use in the mainline application.

Step 2: Publish the Sandbox and Verify the Added Field

In this step, you will publish your sandbox and verify that the Large Deal Approval field has been added to the Create Lead and Show Details pages.

When publishing a sandbox, the included application customizations overwrite the mainline application's existing configuration. For more information on creating and managing sandboxes, and the considerations involved when working with sandboxes, see Sandboxes: Explained topic and its related topics.

To publish the sandbox and verify the addition of the fields:

  1. Under the Administration menu, select Manage Sandboxes....

  2. Select your sandbox and click Publish.

  3. Click the Navigator menu at the top.

  4. Click Lead Qualification under Sales.

  5. Click Create Lead.

  6. Verify that Large Deal Approval field has been added to the Create Lead page.

  7. Click Cancel. You will be creating a deal later in this example.

Step 3: Create and Deploy a Business Process

In this step, you will create a business process (also called project) in Oracle Business Process Composer using the seeded template and deploy it.

To create and deploy a process using Oracle Business Process Composer:

  1. Navigate to the Application Composer using the main menu of Oracle Fusion Applications.

  2. From the Overview page of the Application Composer:

    1. Select the Business Processes option.

    2. On the Business Processes page, click Create under the Actions menu.

    3. Enter the Name as Sales Lead Approval in the popup.

    4. Click OK.

      If a popup blocker is enabled on your browser, the business process composer may not open after you click OK, and your browser may get locked. As a workaround, use the browser back button to go back to the Business Processes option in the application composer, and click Edit for the business process that you were creating.

      This opens the Oracle Business Process Composer in a separate Window.

      Shows the seeded template ExtnBusinessProcess with
the basic CrmCommonSerialApprovalProcess flow.

    This process is based on seeded template ExtnBusinessProcess, which uses the basic CrmCommonSerialApprovalProcess flow.

  3. Click Deploy Project using the main menu.

    Main menu in business process composer

  4. In the Deploy Project popup enter the following information:


    Field

    Value

    Revision ID

    Provide an identifiable ID.

    Deployer Username

    Your sign in name for Oracle Fusion Applications.

    Password

    Your password for Oracle Fusion Applications.

    Mark composite revision as default

    Select this option.

    For more information about the options in this popup and deploying business processes, refer "Deploying a BPM Project" in Oracle Fusion Middleware Business Process Composer User's Guide for Oracle Business Process Management on Oracle Technology Network, at http://www.oracle.com/technetwork/indexes/documentation/index.html.

  5. Click Deploy.

    A confirmation message appears when your project has been deployed successfully.

  6. Close the Oracle Business Process Composer.

  7. Verify whether the project has been deployed successfully.

    1. On the overview page of the application composer, select the Business Processes option.

    2. On the Business Processes page, verify that a green check-mark appears under the Deployed column for the project you created.

You have now deployed a project with the name Sales Lead Approval. You will now configure an object workflow to call this process.

Step 4: Configure Object Workflow to Trigger Approval Process

In this step, you will configure an object workflow with a desired trigger condition, and define the input parameters to pass to the Sales Lead Approval process when the object workflow is triggered.

To configure an object workflow:

  1. From the Overview page of the application composer, select Object Workflows.

  2. Select Create from the Actions menu.

  3. On the Create Object Workflows Page, select the Sales Lead object.

  4. In the Name field, enter Deal amount more than USD 10000..

  5. Select When a record is created event point.

    Click on the Groovy Builder icon.

    In the groovy builder, enter the following event condition:

    if(DealAmount>10000 && CurrencyCode=='USD') return true;

  6. Click OK.

  7. In the Actions region, select Business Process Flow and configure the event action as follows:

    1. On the Create Action: Business Process Flow page, enter Sales Lead Approval in the Name field.

    2. In the Project Name field, search and select Sales Lead Approval project that you deployed.

      This figure shows how you search and select a deployed business process. You can also create or edit a business process using this popup.

      Search and Select Business Process Flow

    3. Click OK.

    4. In the Inputs region, specify the input parameters that you want to pass to the deployed approval flow using the Select Default Value button. You can also type-in these parameters. .

      You must mark these values as Literal so as to pass the actual name.


      Name

      Default Value

      approvers

      'SALES_MANAGER'

      heldEntityStatusField

      'LargeDealApproval_c'

      Note

      You can map only approvers and heldEntityStatusField values.

  8. After inserting the input parameters, click Save to save the business process event action.

  9. Click Save to save the object workflow.

You have now configured the object workflow to trigger the approval flow.

Step 5: Trigger and Test the Approval Process

In this step, you will first trigger the workflow and test whether the approval process runs fine.
  1. Sign in to Oracle Fusion Applications using SALES_REPRESENTATIVE role.

  2. Click the Navigator menu at the top.

  3. Click Lead Qualification under Sales.

  4. Click Create Lead.

  5. Enter the Name as New Deal.

  6. Create a lead with a Deal Size of 120000 USD.

  7. Click Save.

    This action triggers the object workflow, because the deal size you have just entered is greater than 10000 USD.

    To verify whether the workflow has been triggered, you may check the status in the approval field.

  8. Edit New Deal lead.

    Note the status in the Large Deal Approval field, which has been set to APPROVALPENDING by default.

    You are currently signed in with a sales representative role. You must first sign out and then sign in as a sales manager to approve the request.

  9. Sign out of Oracle Fusion Applications.

  10. Sign in to Oracle Fusion Applications using SALES_MANAGER role.

    A new task or request appears on the Home page under the Worklist region.

  11. Approve the request.

    At this point, you are signed in as a sales manager. You must first sign out and then sign in as a sales representative to verify whether the status in the Large Deal Approval field has changed.

  12. Sign out of Oracle Fusion Applications.

  13. Sign in to Oracle Fusion Applications with a SALES_REPRESENTATIVE role.

  14. Navigate to Lead Qualification.

  15. Edit New Deal.

  16. Verify that the status in the Large Deal Approval has been set to APPROVED.

    You have now verified that the approval process was successfully triggered via object workflows.

Extending Simplified Pages for Leads : Explained

Using Oracle Fusion CRM Application Composer, you can change many items that appear on the simplified set of pages that are available for leads.

The pages that are available for extensibility using Application Composer are listed below, and are described in this topic.

Note

Use the Sales Lead Version 2 object in Application Composer, available with the Marketing application, to extend the simplified set of pages that are available for leads.

Leads Overview Table

You can extend the following items in the Leads overview table:

This is a snapshot of the Leads Summary page

Note that you cannot make changes to these components on the page:

Create Lead Page

You can extend the following items on the Create Lead page:

This is a snapshot of the Create Lead page

Note that you cannot add custom buttons and actions to this page.

Edit Lead Page (Summary Page)

These regions on the Edit Lead page (Summary page) are extensible:

This is a snapshot of the Edit Lead page

You can extend the following items on the Edit Lead page (Summary page):

Note that you cannot make changes to these components on the page:

You cannot create new subtabs.

Extending Simplified Pages for Leads using Oracle Fusion CRM Application Composer : Worked Example

You can extend simplified pages using Oracle Fusion CRM Application Composer. You must make your changes in a sandbox, so you can test them first.

This example demonstrates how you can extend the lead object by:

Create the Strategic Deal Check Box and Add the Groovy Script Validation Check

Follow these steps to create the Strategic Deal check box and add the validation check:

  1. Navigate to Application Composer and select Marketing from the Application list. Select Lead from the Objects panel.

    This figure shows the Sales Lead Overview page in Application Composer.

    Sales Lead Overview page

  2. Under the Lead object, select the Fields link.

    This figure shows the Sales Lead Overview page with the Fields object selected for a Lead.

    Sales Lead Overview page with the Fields object
selected for a Lead.

  3. Click the New button and, in the Select Field Type window, select Checkbox.

    This figure shows the Select Field Type window with the Checkbox option selected.

    Select Field Type window, with check box selected.

  4. In the Create Checkbox Field page, enter "Strategic Deal" as the Display Name. Leave the rest of the fields with their default values.

    This figure shows the Create Checkbox Field page.

    Create Checkbox Field page

  5. Click Save and Close.
  6. Now augment this check box with a Groovy script. When the user attempts to save a record with the check box selected, then the script checks if the deal size is greater than 1000. If the deal size is less than 1000, then the script displays an error and the lead is not saved.

    Here is the Groovy logic that you can use:

    def retVal
    if (StrategicDeal_c == 'Y')
    {
     if (DealAmount >= 1000)
     {
       retVal = true
     }
     else 
     {
       retVal = false
     }   
    }
    
    if (StrategicDeal_c
     == null || StrategicDeal_c
     == 'N')
    {
     retVal = true
    }
       return(retVal)
    
  7. In the Objects panel, select Server Scripts under the Sales Lead object.

    This figure shows the Server Scripts object selected for a lead.

    Server Scripts object selected for a lead.

  8. In the Server Scripts Lead page, select the Validation Rules tab and click the New button to create a new object rule.

    This figure shows the Validation Rules tab in the Server Scripts Lead page.

    Validation Rules tab in the Server Scripts Lead
page

  9. In the Create Object Validation Rule page, enter the rule name as "Eval" and enter a simple error message in the Error Message text region.

    This figure shows the Create Object Validation Rule page.

    Create Object Validation Rule page

  10. Cut and paste the script that you have written to validate the condition.
  11. Now you need to add this field to the simplified pages. In Application Composer, select the Pages link under the Sales Lead object and then select the Simplified Pages tab.

    This figure shows the Simplified Pages tab.

    Simplified Pages tab

  12. In the Details Page, click Edit Lead.
  13. In the Edit Details Page Summary Form, select the Strategic Deal field in the Available Fields list and double click on this field to move it to the Selected Fields list.

    This figure shows the Edit Details Page Summary Form page.

    Edit Details Page Summary Form page

  14. Save and close Application Composer.
  15. Sign into the application again and drill into a lead.
  16. Check if the Strategic Deal check box appears.

    This figure shows the Edit Lead Summary page with the Strategic Deal check box selected.

    Edit Lead Summary page with the Strategic Deal
check box selected.

  17. Enter a value less than 1000 in theDeal Size field.
  18. Select the Strategic Deal check box and click Save and Close..
  19. You should receive the error message that you entered in Step 9 because the deal size violates the validation rule.
  20. Reenter a value greater than 1000 in the Deal Size field and save.

    You have successfully extended a simplified page and added Groovy logic.