53Extend Opportunities and Related Objects

This chapter contains the following:

Overview of Extending Sales and Opportunity Management Objects

Read this chapter to learn how to extend sales and opportunity management objects and pages.

In this chapter, you learn about:

  • Each sales and opportunity management object, and how to extend those objects using Application Composer

  • How to modify sales and opportunity management objects using Page Composer

Extend Pages for Opportunities

Using Application Composer, you can change many items that appear in the pages for opportunities.

Use Application Composer to configure these pages:

  • Opportunities landing page

  • Create Opportunity page

  • Edit Opportunity page

  • Products table in the Edit Opportunity page

  • These subtabs within the Edit Opportunity page:

    • Activities

    • Contacts

    • Deal Registrations

    • Leads

    • Notes

    • Partners

    • Team

For example, you can:

  • Hide or show standard fields.

  • Hide or show standard actions and buttons.

  • Add user-defined fields of all types.

  • Set fields as required.

  • Set field default values.

  • Reorder columns.

  • Change column labels.

  • Add user-defined actions and buttons.

High-Level Steps to Modify Opportunity Pages

Here are the high-level steps to make changes to the opportunity UI pages:

  1. Activate a sandbox.

  2. Navigate to the Application Composer.

  3. Expand the Opportunity object tree.

  4. In the Opportunity tree, click the Pages link.

  5. Ensure that the Application Pages tab is active.

  6. In the region that corresponds to the page you're modifying, duplicate the standard layout and edit the resulting layout. For example, in the Details Page Layout region, duplicate the standard layout and then edit the resulting layout. See the Configuring Opportunity Pages section in this topic for details about which regions in the Application Pages tab correspond to which opportunity pages.

  7. In the new user-defined layout row, the Active check box will be automatically checked, indicating that the new user-defined layout is active.

    Note: Since you have duplicated the standard layout, two layouts now display. When the application finds more than one layout, it evaluates each layout at runtime, starting with the first layout in the table. If all conditions are met for the layout, then it's displayed. If not, then the next layout is evaluated, and so on.
  8. Save your changes.

  9. Publish the sandbox.

Configure Opportunity Pages

This table shows the opportunity pages or subtabs that can be modified, along with the navigation steps to the areas where you make the modifications.

All of these navigation steps assume the use of the Application Pages tab.

Opportunity Page Navigation

Landing (list) page

  1. Expand the Opportunity object.

  2. Click the Pages link.

  3. In the Landing Page Layouts region, duplicate the standard layout and edit the resulting layout.

Create Opportunity Page

  1. Expand the Opportunity object.

  2. Click the Pages link.

  3. In the Creation Page Layouts region, duplicate the standard layout and edit the resulting layout.

Edit Opportunity Page, Summary region

  1. Expand the Opportunity object.

  2. Click the Pages link.

  3. In the Details Page Layouts region, duplicate the standard layout and edit the resulting layout.

  4. Ensure the Summary subtab is active.

  5. Edit the Summary region.

Edit Opportunity Page, Products table

Optionally, first add user-defined fields to the Opportunity Revenue object.

  1. Expand the Opportunity object.

  2. Click the Pages link.

  3. In the Details Page Layouts region, duplicate the standard layout and edit the resulting layout.

  4. Edit the Edit Revenue Table region.

Edit Opportunity Page, Contacts subtab

Optionally, first add user-defined fields to the Opportunity Contact object.

  1. Expand the Opportunity object.

  2. Click the Pages link.

  3. In the Details Page Layouts region, duplicate the standard layout and edit the resulting layout.

  4. Click the Contacts subtab.

  5. Edit the Contacts subtab.

Edit Opportunity Page, Team subtab, Team view

Optionally, first add user-defined fields to the Opportunity Team Member object.

  1. Expand the Opportunity object.

  2. Click the Pages link.

  3. In the Details Page Layouts region, duplicate the standard layout and edit the resulting layout.

  4. Click the Team subtab.

  5. Edit the Fuse Opportunity Team region.

Edit Opportunity Page, Team subtab, Territories view

Optionally, first add user-defined fields to the Sales Territory object.

  1. Expand the Opportunity object.

  2. Click the Pages link.

  3. In the Details Page Layouts region, duplicate the standard layout and edit the resulting layout.

  4. Click the Team subtab.

  5. Edit the Territories region.

Edit Opportunity Page, Partners subtab

Optionally, first add user-defined fields to the Opportunity Partner object.

  1. Expand the Opportunity object.

  2. Click the Pages link.

  3. In the Details Page Layouts region, duplicate the standard layout and edit the resulting layout.

  4. Click the Partners subtab.

  5. Edit the Partners subtab.

Edit Opportunity Page, Deal Registrations subtab

Optionally, first add user-defined fields to the Opportunity Deal object.

  1. Expand the Opportunity object.

  2. Click the Pages link.

  3. In the Details Page Layouts region, duplicate the standard layout and edit the resulting layout.

  4. Click the Deal Registrations subtab.

  5. Edit the Deal Registrations subtab.

Edit Opportunity Page, Activities subtab

You must use the Activity object in Application Composer to extend this subtab.

  1. Navigate to the Activity object.

  2. Click Pages and ensure the Application Pages tab is active.

  3. In the Embedded Activity Summary Layout region at the bottom of the page, duplicate the standard layout and edit the resulting layout.

Edit Opportunity Page, Notes subtab

You must use the Notes object in Application Composer to extend this subtab.

  1. Navigate to the Notes object.

  2. Click Pages and ensure the Application Pages tab is active.

  3. Duplicate the standard layout and edit the resulting layout.

The Notes list page isn't extensible.

Edit Opportunity Page, Leads subtab

Optionally, first add user-defined fields to the Sales Lead object.

  1. Expand the Opportunity object.

  2. Click the Pages link.

  3. In the Details Page Layouts region, duplicate the standard layout and edit the resulting layout.

  4. Click the Leads subtab.

  5. Edit the Fuse Lead Overview table.

These Assessments subtab isn't configurable.

Example of Extending Pages for Opportunities Using Application Composer

This example demonstrates how you can modify pages for Opportunities using Application Composer.

Extending Pages for Opportunities Using Application Composer

  1. Navigate to the Application Composer Overview page.

  2. In the object tree, select a standard object that includes a set of pages, such as Opportunity.

  3. Select the Pages node.

  4. Select the Application Pages tab.

  5. Use the links on the tab to navigate to the object's configuration pages, where you can modify the pages that are available for the selected object. You can show or hide fields, rearrange fields, and add your own fields.

  6. For example, if you want to add the field 'Budget Amount' to the Create Opportunity page, select a layout in the Creation Page Layouts region. Click the Edit icon or select Actions > Edit Layout

  7. In the Edit Application Page Creation page, select the Edit icon in the Opportunity Create region

  8. In the Configure Detail Form region of the Opportunity Create page, move the Budget Amount field from the Available Fields to the Selected Fields list.

  9. Click Save and Close.

Make Changes to Competitors Pages

Competitors pages are available from the Navigator by selecting the Competitors menu item. You can use Application Composer to change look of the these pages.

Competitors Pages and Navigation

Here are the extensible pages and regions for the Sales Competitor object, along with the navigation to the configuration pages.

Competitors Page Competitors Region Navigation

Competitors Overview page

Competitors list region

  1. Select the Sales Competitor object.

  2. Click the Pages link.

  3. Click the Desktop Pages tab.

  4. Click the Edit Summary Table link.

Create Competitor page

Details region

  1. Select the Sales Competitor object.

  2. Click the Pages link.

  3. Click the Desktop Pages tab.

  4. Click the Edit Creation Page link.

Edit Competitor page

Details region

  1. Select the Sales Competitor object.

  2. Click the Pages link.

  3. Click the Desktop Pages tab.

  4. Click the Edit Summary Form link.

For more details about adding fields, see the topics on adding fields using Application Composer.

Create New Competitor Fields

If you want to put more fields on Competitors competitor pages, then you first create them. Here's an example of how to do that:

  1. Navigate to Configuration > Application Composer.

  2. In the Objects tree, under Standard Objects, expand the object tree for the object you're modifying. For example, expand the Sales Competitor tree.

  3. Click the Fields node for the object.

  4. Click the Custom tab.

  5. Click the Create icon, or select Create from the Actions menu.

  6. Select the type of field you're creating. For example, select Text as the type for a text entry field.

  7. Click OK.

  8. In the Appearance area, enter a Display Label for the new field. Set other optional attributes as desired.

  9. In the Name area, enter an internal name for the field. The application prepopulates one based on your entry in the Display Label field, but you can override the default value. Ensure there's no space in an internal name.

  10. Optionally, in the Constraints area, enter additional parameters for the field. For example, make the field a required field.

  11. Optionally, in the Default Value region, enter a default value for the field.

  12. Click Save and Close.

Modify Competitors Pages

Now that you have added your fields, here's how add them to the Competitors pages or regions.

  1. Navigate to Configuration > Application Composer.

  2. In the Objects tree, under Standard Objects, expand the Sales Competitor object tree.

  3. Click the Pages node for the Sales Competitor object.

  4. All competitor pages are located under the Desktop Pages tab. Click the Desktop Pages tab.

  5. Click the page you want to change and make the changes. See the Competitors Pages and Navigation section above for more information on which pages are extensible.

  6. Save your changes.

Duplicate Display Names for Fields

When you configure Competitors pages, in the Available Fields list, some field display names appear to be duplicates. For example, you may see two fields for Primary Competitor. The names you see in the list are display names only; each has an underlying name, which is its actual name. To see the underlying name of the field, hover your mouse pointer over the field name. The hover text displays the actual name of the field.

Example of Modifying Your Object to Validate Assessments

Use this example to learn how to modify your account, lead, contact, or opportunity to validate that a specified assessment template is completed, using Groovy scripts in Application Composer.

In this example, you're a sales administrator and you want to ensure that sales representatives complete the assessment template Discount Eligibility before they set an opportunity to Won.

Validating Assessment Using Scripting

To ensure that sales representatives always fill in the Discount Eligibility Assessment template before closing an opportunity:
  1. Sign in as a sales administrator.

  2. Create and activate a sandbox.

  3. Navigate to Application Composer.

  4. From the Applications list, select Sales.

  5. Expand Standard Objects, and then expand Opportunity.

  6. Click Server Scripts.

  7. On the Server Scripts Opportunity page, select Triggers.

  8. In the Object Triggers region, click the Add a new Trigger icon.

  9. On the Create Object Trigger page, select Before Update in Database from the Trigger list.

  10. Enter a trigger name.

  11. Enter the following script in the Trigger Definition region.

    def optyStatusCode = getAttribute('StatusCode')
    if (optyStatusCode == 'WON') {
          
      def id = getAttribute('OptyId')
      def vo = newView('AssessmentVO')
      def vc = vo.createViewCriteria()
      def vcr = vc.createRow()
      def vci = vcr.ensureCriteriaItem('AssessedObjectId')
      vci.setOperator('=')
      vci.setValue(id)
      vc.add(vcr)
      vo.appendViewCriteria(vc)
      vo.executeQuery()
      def completedMandatoryAsmnt = false;
      
      if (vo.getEstimatedRowCount() > 0) {
        vo.reset()
        while (vo.hasNext()) {
          def row = vo.next()
          if (row != null) {
            def tempName = row.getAttribute('TemplateName')    
           
            if (tempName == 'Discount Eligibility') {
                def status = row.getAttribute('StatusCode')  
                println("Asmnt Status is " + status)
                if(status != 'COMPLETED') {     
                    throw new oracle.jbo.ValidationException('Please complete the Mandatory Discount Eligibility Assessment before changing status to WON')
                } else {
                    completedMandatoryAsmnt = true;
                    break;
                }
             }
           }
         }
      }
      if (completedMandatoryAsmnt == false) {
          throw new oracle.jbo.ValidationException('Please create and complete Mandatory Discount Eligibility Assessment before changing status to WON')
      }  
    }
    

  12. Click Save and Close.

    The trigger script displays a message whenever a sales representative changes the opportunity status to Won. This message ensures that the sales representative fills in the Discount Eligibility assessment template before changing the status to Won.

Hide and Reorder Opportunity Fields Using Page Composer

You can hide fields, make fields required, and change the order of fields in the edit opportunity page, for specific job roles. You use Page Composer to do the modifications.

Prerequisites

Before you begin, consider the following setup requirements or prerequisites:

  • This procedure applies only to the desktop UI.

  • You must have the job role of a setup user or Sales Administrator to do this task.

  • You must know how to create and publish sandboxes following your organization's established processes. As a best practice, your organization might want you to first make changes in a sandbox before rolling the changes out to all users with the Sales Representative job role by publishing the sandbox.

Starting Page Composer

First, start Page Composer's design mode to be able to make the changes:

  1. Sign in to the application as a user with the Sales Administrator job role. Or, sign in as a setup user.

  2. From the Navigator, select Opportunities.

  3. Find an opportunity and edit it.

  4. In the global region, expand the Settings and Actions menu which is available next to your user name. Then select Edit Pages, under the Administration subheading

    The Edit Pages dialog appears.

  5. In the Edit Pages dialog box, select the Edit option for the Job Role layer.

  6. In the Value column next to Job Role, select Sales Representative from the list.

  7. Click OK.

    The page opens in Page Composer design mode.

  8. Next, toggle Page Composer to Direct Selection mode: Click the Select icon in the global region.

    Direct Selection mode is now invoked, allowing you to make field-level changes.

Hiding a Field and Changing the Order of a Field

To hide the Worst Case field and change the order of the Attachments and Partners fields, use the following steps:

  1. With Page Composer in Direct Selection mode, in the Additional Details region of the edit opportunity page, hover over the Worst Case field.

    A colored box appears around the field and its label.

  2. Click inside the box around the Worst Case field.

    A dialog box opens with two options: Edit Component and Edit Parent Component.

  3. Select the Edit Parent Component option.

    The Component Properties: panelFormLayout window opens.

  4. In the Component Properties: panelFormLayout window, clear the check box next to the Worst Case field.

    The following figure shows the Component Properties dialog box with Worst Case selected.

    The figure shows the Component Properties: Worst-Case
field.

  5. Select the down arrow to the right of the Attachments field to move it below the Partners field.

    The order of the two fields changes.

  6. Click OK.

Making a Field Read-Only

To make the Win Probability field read-only, use the following steps:

  1. While still in Page Composer Direct Selection mode, hover over and then click the Win Probability (%) label.

    A dialog box opens with two options: Edit Component and Edit Parent Component.

  2. Select the Edit Component option.

    The Component Properties: Win Probability (%) window opens.

  3. In the Component Properties: Win Probability (%) window, select the Read only check box.

    The field becomes read-only, as shown in the following figure.

    This figure shows the Win Probability - Read Only check
box in the Component Properties window.

  4. Click OK.

Making a Field Required and Not Sortable

To make the Quantity column in the Revenue Items table required and not able to be sorted, use the following steps:

  1. With Page Composer still in Direct Selection mode, in the Revenue Items region, hover over the Quantity column and click its header.

    A dialog box opens two options: Edit Component and Edit Parent Component.

  2. Select the Edit Component option.

  3. Select the Show Required check box to make it a required field.

  4. Clear the Sortable check box to make the column appear as not sortable.

    The following figure shows the Change Property dialog box with the Show Required and Sortable check boxes.

    The figure shows selecting the field as Not-Sortable
and Required.

  5. Click OK.

Saving Your Changes

When you're ready to commit your modification changes to the main line, perform these steps:

  1. Click the Close button in the global region to sign out of Page Composer editor.

  2. On the Sandboxes page, click the name of the sandbox you want to publish, and click Publish.

Verifying Your Changes

Verify your modifications by using the following steps:

  1. When you're done with your changes, click Close in the header to sign out of Page Composer.

  2. Sign out of the application.

  3. Sign as a user with the Sales Representative role.

  4. Navigate to the opportunity record that you edited, and verify the following:

    • The Additional Details region is expanded by default.

    • The Worst Case field isn't visible.

    • The Win Probability (%) field is read-only.

    • The Attachments field is below the Partners field.

    • The Quantity column is marked as required with an asterisk, and can't be sorted.

Configure Default Search on Standard Subtabs for Opportunities

You can add default search criteria to standard subtabs for opportunities so that your salespeople can more easily find the subtab data that's relevant to their daily activities. When a user opens the subtab at runtime, the records displayed are automatically filtered using the search criteria you added. Users can change the default search value, but they can't change the default search field. They can, however, further refine their search by adding additional search fields and values at runtime.

Adding a default search filter to a subtab is optional. If you skip this step, then no search fields are automatically added to the subtab, but users can still see the search region and perform their desired search.

Use this procedure to add a default search filter field, operator, and value for the Leads subtab search on the Edit Opportunity page.

Note: When adding a default search filter to standard subtabs, the search filter applies to all existing details page layouts with this subtab. Let's say you add a search filter to the Lead subtab on an Opportunity details page layout. This means that the same search filter is added to the Lead subtab on an Account details page layout.
  1. Sign in as a sales administrator or as a setup user.

  2. Activate a sandbox.

  3. Navigate to Application Composer.

  4. In the navigation tree, expand Standard Objects, expand Opportunity , and click Pages.

  5. Ensure that the Application Pages tab is selected.

  6. In the Details Page Layouts region, duplicate the standard layout by highlighting the standard layout and clicking the Duplicate icon.

  7. Type a new layout name and click Save and Edit.

    The Details Layout page appears.

  8. In the Subtabs Region, highlight Leads and click the pencil icon.

  9. From the Configure Detail Form page region, go to the Configure Summary Table: Search Region.

  10. Select the default search filter you want to apply to the Leads subtab.

    You can select from a list of both standard and custom Lead fields. Note that you can't pick dynamic choice list fields, set ID-based fixed choice list fields, and any fields that aren't searchable.

    For example, you want to create a search filter to search for all qualified leads for an opportunity. Select Status from the drop-down list and select Equals as the operator and then select the Qualified check box.

  11. Click Done and ensure that the layout status for your Leads subtab layout is set to Active.

  12. Test the changes: Navigate to Sales > Opportunities as a user with access to the opportunity pages, for example, as a salesperson. Edit an opportunity and confirm that the data that displays on the Leads subtab includes only qualified leads.

  13. Publish the sandbox.