52Use Copy Maps

This chapter contains the following:

You can use two predefined mapping templates for copying an opportunity. The Standard Copy Opportunity Mapping (MOO_COPY_OPTY_MAPPING) is a noneditable template which performs a standard copy of one opportunity to another. The Copy Opportunity Mapping is an editable template that you use as the default mapping file for copying an opportunity.

When you copy opportunities, information such as sales stage, win probability, and status for the opportunity aren't copied to the new opportunity. You may want to include additional information about the opportunity but the necessary attributes aren't contained in the predefined Standard Copy Opportunity Map. To include the information you want, you can add attributes to a copy of the predefined mapping file, called Copy Opportunity Map.

Note: Territory information, such as resource team records aren't copied as the resources are allocated on an on demand basis. Resources that are added manually, as well as those added through opportunity assignment, are copied to the newly created opportunity.

Here's how to include additional attributes or child objects to the editable copy of the predefined Copy Opportunity Map:

  1. Access Application Composer by selecting Application Composer from the Navigator menu.

  2. Select Sales to filter the object search, and select Copy Maps within Advanced Setup.

  3. Expand Copy Opportunity and select Copy Opportunity Map.

    The Edit Copy Map window appears, and you use it to add additional attributes to your copy map.

  4. Select each line in the Entity Mappings section and add records to the Attribute Mappings section. For example, here's an example of the field descriptions in the Attribute Mappings section for each of the attributes you want to add:

    Field Description

    To

    Select the attribute to where the selected entity is copied.

    Referenced View Object

    If this attribute is a foreign key, select the view object joined by this foreign key. The application generates new foreign keys that keep the reference intact.

    Primary Key

    If this attribute is a primary key, select this check box. Instead of copying the value in the From object, the application generates a unique value for this key field for each record in the To object.

    From

    Select the attribute from where the selected entity is copied.

    From Expression

    Optionally, you can enter a Groovy expression to change the value in this attribute. For example, you want to change the value of the From object to some new value in the attribute of the To object. You can also enter a constant to fill this attribute with a constant value in every record of the To object.

  5. Click Save and Close.

Set the Copy Opportunity Mapping Profile Option

You can specify the mapping file name to use when copying an opportunity by setting the Copy Opportunity Mapping profile option. The predefined file is used to copy attributes and child objects when creating a copy of an existing opportunity.

Here's how to access and modify the Copy Opportunity Mapping profile option:

  1. In the Setup and Maintenance work area, go to the following:

    • Offering: Sales

    • Functional Area: Opportunities

    • Task: Manage Opportunity Profile Options

  2. In the Manage Opportunity Profile Options page, enter Copy Opportunity Mapping in the Profile Display Name field.

  3. Click Search.

  4. In the Profile Values section, you can see the predefined mapping called Copy Opportunity Map.

  5. Click Save.

Note: If you want to use the Standard Copy Opportunity Map, change the profile value to Standard Copy Opportunity Map.

Copy maps enable you to create objects by copying existing objects. For example, you can copy responses to create leads and opportunities, or you can copy deal registrations to create opportunities. A mapping file is also available to copy opportunities. You use the copy maps feature to map child objects and attributes in the source object (From object) to objects and attributes in the object you're creating (To object).

Predefined mapping files are available as part of your sales application to enable you to:

  • Map objects and attributes during the creation of an account when converting a lead to an opportunity.

  • Automatically add the primary partner contact to the lead team when a partner contact is added to the lead.

  • Create leads and opportunities from responses

  • Copy opportunities and create opportunities from deal registrations

To create a copy map:

  1. Sign in as a user with Application Composer access and verify that you have an active sandbox.

  2. Access Application Composer by selecting Application Composer from the Navigator menu, under the Configuration category.

  3. Select Sales to filter the object search, and under Advanced Setup, select Copy Maps.

  4. Click New, and then enter a unique name for the copy map. You specify the unique name in a profile option after you have completed and saved your copy mapping file.

    The Edit Copy Map window appears and you use it to define the copy map.

  5. In the Application Module Mapping section, enter general information about the mapping as outlined in this table:

    Field Description

    Name

    Enter a name for the mapping file. The name is displayed in the Copy Maps window. You can use the name to locate and search for copy maps that you want to edit or delete.

    Map Group

    Select the required mapping group for the new copy map from the drop-down list.

    To

    Select the application module that you're copying to. For example, if you're copying leads to opportunities, then select the application module that includes leads.

    From

    Select the application module that you're copying from. For example, if you're copying responses to leads, then select the application module that includes responses.

  6. In the Entity Mappings section, add a record for each view object that you're copying by completing these fields:

    Field Description

    To

    Select the new view object that you're copying to.

    From

    Select the existing view object that you're copying from.

    Query Type

    Select one of the three query types: Unique Identifier, Join, or All Records. If you select All Records, then don't enter any information in the remaining fields.

    Query Attribute

    If you selected either Unique Identifier or Join in the Query Type field, then select an attribute to use during runtime. The attribute is used to filter the records that are copied to the new object. For example, if you select LeadId, then during runtime, only the records matching the Lead ID passed to the copy map engine are copied.

    Joined View Object and Joined Attribute

    If you selected Join in the Query Type field, then use these two fields to specify:

    • The view object to which this object is joined

    • The attribute used as the basis of the join

  7. Select each line in the Entity Mappings section, and add records to the Attribute Mappings section for each of the attributes by completing these fields:

    Field Description

    To

    Select the attribute to which the selected entity is copied.

    Referenced View Object

    If this attribute is a foreign key, select the view object joined by this foreign key. The application generates new foreign keys that keep the reference intact.

    Primary Key

    If this attribute is a primary key, select this check box. Instead of copying the value in the From object, the application generates a unique value for this key field in each record in the To object.

    From

    Select the attribute from which the selected entity is copied.

    From Expression

    Optionally, you can enter a Groovy expression to change the value in this attribute. For example, you want to change the value of the From object to some new value in the attribute of the To object. You can also enter a constant to fill this attribute with a constant value in every record of the To object.

  8. Click Save and Close.

  9. Specify the mapping file name in one of these profile options:

    • Use the Direct Lead to Opportunity Mapping profile option to specify the mapping file name created when a direct lead is converted to an opportunity.

    • Use the Copy Opportunity Mapping profile option to specify the mapping file name to use when copying an opportunity. The file is used to copy attributes and child objects when creating a copy of an existing opportunity.

    • Use the Partner Lead to Opportunity Mapping profile option to specify the mapping file name created when a partner lead is converted to an opportunity.

    • Use the Lead to Account Mapping profile option to specify the mapping file name created in Copy Maps. This file maps objects and attributes during the creation of an account when converting a lead to an opportunity.

    • Use the Lead to Contact Mapping profile option to specify the mapping file name created in Copy Maps. This file maps objects and attributes during the creation of a contact when converting a lead to an opportunity.

Copy maps are a declarative way to specify what fields are copied among objects. The functionality for converting a lead to an opportunity uses the predefined Copy Lead To Opportunity Map copy map feature. This worked example shows you how to modify an existing mapping file to create an opportunity from a lead.

Predefined mapping files are available to you as part of your sales application. You can use copy maps to:

  • Map objects and attributes during the creation of an account and the creation of a contact when converting a lead to an opportunity.

  • Create leads and opportunities from responses

  • Copy opportunities and create opportunities from deal registrations

In this example, you want to:

  • Modify the copy lead to opportunity map

  • Add a field to an opportunity

  • Verify your changes

Modify the Copy Lead To Opportunity Map

To modify the Copy Lead to Opportunity Map:

  1. Sign in as a user with Application Composer access and verify that you have an active sandbox.

  2. Access Application Composer by selecting Application Composer from the Navigator menu, under the Configuration category.

  3. Under Advanced Setup, select Copy Maps. The Copy Maps window appears.

  4. Select the Copy Lead To Opportunity Map. The Edit Copy Map window appears.

  5. In the Entity Mappings region, highlight the row that contains From: Sales Lead and To: Opportunity.

  6. In the Attribute Mappings region, select the Add icon to add a new row.

  7. From the To: drop-down list, select Comments.

    This value represents the Comments field in opportunities that contains the value.

  8. In the From Expression field, enter this Groovy expression:

    return "Copy Map executed for Lead: "+nvl(LeadNumber,"");

    The expression uses text and the LeadNumber as the value to set into the opportunity Comments field.

  9. Click Save and Close.

Add a Field to an Opportunity

The Comments field isn't displayed by default on the Opportunities UI. Use Application Composer to add the Comments field to the opportunity header region as follows:

  1. From Application Composer, expand and select Objects, Standard Objects, and then Opportunity.

  2. Click Pages and then select the Application Pages tab.

  3. On the Details Page Layouts section, edit any custom layout. If none exists, then duplicate the standard layout and edit the resulting custom layout.

  4. Edit the Summary region.

  5. Select the Comments field from the list in the Available Fields region and move it to the Selected Fields region.

    Details Layout: Default Layout: Edit Summary window

  6. Click Save and Close.

  7. Verify that the Summary region list contains the Comments field.

  8. Click Done.

Verify Your Changes

  1. Navigate to the Application Composer UI with the same user access and sandbox details used to complete the Modify Lead to Opportunity Copy Map task.

  2. Navigate to Leads and click Create Lead.

  3. Enter Autumn Lead as the Name and select Pinnacle Technologies as the Account. Accept all other defaults values for the remaining fields.

  4. From the Actions drop-down list, select Convert to Opportunity.

  5. Click the Opportunities icon.

  6. Locate the newly created opportunity. It must have the same name as the lead that was originally created.

    Examine the value in the Comments field. It contains the expected text, plus the lead number which originated this opportunity. Here's a screenshot that shows an example of the Edit Opportunity page with the Comments field populated with the lead number.

    Sample screen to show the lead number which originated
the opportunity

This topic describes how to update the copy map to copy over the Lead contact value into the opportunity's Customer field.

Updating the Copy Map to Copy the Lead Contact Value

In this step, you update the copy map to copy over the Lead contact value into the opportunity Customer field. Copy maps are a declarative way to specify what fields are copied among objects. The functionality for converting a lead to an opportunity uses the predefined Copy Lead To Opportunity Map copy map feature.

  1. Expand Advanced Setup and click Copy Maps (in left pane of the Application Composer).

  2. Click Copy Lead to Opportunity Map.

  3. Under the Attribute Mappings section, in the row for TargetPartyId, select PrimaryContactId from the drop-down list in the From column.

  4. Click Save and Close.

This topic outlines the one-to-one mapping of the attributes between the lead and opportunity applications. When converting leads to opportunities, lead attributes, such as sales account, products, revenue amount, lead contacts, and other attributes, are mapped to the newly created opportunity.

You convert a lead to an opportunity when the lead is qualified and is ready for further processing along the sales cycle. The following sections outline:

  • General lead attributes mapped to opportunities

  • Partner lead-specific attributes mapped to opportunities

  • Lead contact attributes mapped to opportunity contact attributes

  • Lead product attributes mapped to opportunity revenue line attributes

  • Profile options that specify the mapping file name for user-defined mapping files

General Lead Attributes Mapped to Opportunities

This table lists the general lead attributes that are mapped to the corresponding opportunity attributes:

General Lead Attribute Opportunity Attribute

Budget Amount

Budget Amount

Budget Status

Budget check box

Customer

Target Party

Currency

Currency

Description

Description

Estimated Close Date

Estimated Close Date

Expiration Date

Expiration Date

Lead Number

Lead Number

Name

This attribute value is the Lead Name and the current date and time, which generates a unique opportunity name.

Name

Owner

Indicates the user who starts the conversion.

Owner of opportunity

Primary Contact

Key Contact

Source Code

If a campaign or any other source creates a lead in which source code is used, then this attribute value is mapped.

Source

Partner Lead Attributes Mapped to Opportunities

This table lists the partner lead attributes that are mapped to the corresponding opportunity attributes:

Partner Lead Attribute Opportunity Attribute

Deal Approved By

For direct leads, this attribute is set to the user who starts the conversion.

Owner of opportunity

Deal Approved By Resource Organization

Resource Organization

Partner

Partner

Partner Type

Partner Type

Partner Program

Partner Program

Registration Type

Registration Type

Registration Number

Registration Number

Lead Contact Attributes Mapped to Opportunity Contact Attributes

To map lead contact attributes to opportunity contact attributes, the following relationships must apply between the contact and the customer:

  • The relationship end date is later than the current date.

  • The relationship start date is earlier than the current date.

  • The relationship status is active.

This table lists the lead contacts attributes that are mapped to the corresponding opportunity contacts attributes:

Lead Contact Attribute Opportunity Contact Attribute

Contact

Contact

Contact Role

Contact Role

Primary

Primary

Lead Product Attributes Mapped to Opportunity Revenue Line Attributes

This table lists the lead product attributes that are mapped to the corresponding opportunity revenue line attributes:

Lead Product Attribute Opportunity Revenue Line Attribute

Amount

Revenue Amount

Approver

Resource Party

Currency

Currency for the Revenue Amount

Inventory Item

Inventory Item

Organization

Inventory Organization

Product Group

Product Group

Quantity

Quantity

Unit of Measure

Unit of Measure

Unit Price

Unit Price

Profile Options for Mapping File Names

As an administrator, you can specify your own mapping file name to use for mapping objects and attributes during the lead-to-opportunity conversion process. For example, you can create user-defined lead attributes in Application Composer, Copy Maps, and can then add these attributes to the existing ready-to-use mapping files. You must save the user-defined mapping file using a unique file name and then specify the saved mapping file name in one of these profile options:

  • Use the Direct Lead to Opportunity Mapping profile option to specify the mapping file name created when a direct lead is converted to an opportunity.

  • Use the Partner Lead to Opportunity Mapping profile option to specify the mapping file name created when a partner lead is converted to an opportunity.

If a lead is linked to a marketing campaign through a campaign response, then the association to the campaign must be maintained in your lead to opportunity conversion process. This allows the opportunities to be linked with campaigns, and the respective opportunity revenue to be attributed to its linked campaign.

Modify the predefined copy map template, Copy Lead to Opportunity Map, to add a campaign entity mapping and campaign attributes. For information about how to modify a copy map, see the Example of Modifying the Lead to Opportunity Copy Map topic.

  1. Add an entity mapping between OpportunityCampaignVO and Campaign Member with LeadId as the unique identifier.

  2. Add the following attribute mappings as shown in the screenshot.

    • CampaignId

    • OptyCampaignId

    • OptyId

    • RevenuePercentage

    Entity mapping screenshot for campaigns

Use the Lead Convert and Mass Lead Convert layout pages in Application Composer if you want to expose user-defined and standard fields in your lead to opportunity conversion process. You must then configure the predefined copy map template, Copy Lead to Opportunity Map, to map the fields. Use the Manage Sales Lead Administrator Profile Values task to ensure that the configured copy map to be your default copy map which maps lead attributes to opportunity attributes during lead conversion.

Modify the Lead Convert Pages

You duplicate the standard lead convert and mass lead convert page layouts and modify the default layouts. Edit the default page layouts to expose standard and user-defined fields so that their values can be copied to opportunity during lead conversion.

Note: These predefined standard fields exist for both the Mass Lead Convert Layouts and Lead Convert Layouts:
  • Opportunity Name

  • Owner

  • Primary Contact

  • Account

Here are the steps to modify the lead convert pages:

  1. Sign in as a user with Application Composer access and verify that you have an active sandbox.

  2. Access Application Composer by selecting Application Composer from the Navigator menu, under the Configuration category.

  3. From Application Composer, expand and select Objects, Standard Objects, and then Sales Leads.

  4. Click Pages and then select the Application Pages tab.

  5. On the Mass Lead Convert Layouts and Lead Convert Layouts sections, edit any user-defined layout. If no user-defined layouts exist, then duplicate the standard layouts and edit the resulting user-defined layouts, as required.

  6. Click Save and Close.

  7. Verify your user-defined field changes and click Done.

  8. Edit the copy map to map the user-defined fields between the lead and opportunity.

    See the topic Example of Modifying the Lead to Opportunity Copy Map for more information.

  9. Set the modified copy map as your default copy map.

    See the topic Enable a User-Defined Copy Lead To Opportunity Map Value in the Implementing Sales guide.

The Copy Maps feature lets you create objects by copying existing objects. After you specify the lead-to-opportunity copy map template in a profile option, you can copy notes, attachments, and activities from a lead record to an opportunity record during the lead-to-opportunity conversion.

These sections describe how to access the Direct Lead to Opportunity Mapping profile option and how you can specify your own user-defined mapping files.

Set Your Copy Lead To Opportunity Map Value

You can specify the mapping file name to use when copying an opportunity by setting the Direct Lead to Opportunity Mapping profile option. Use the predefined file to specify the mapping file name created when you convert your lead to an opportunity.

Here's how to access and modify the value set for the mapping file name in the Direct Lead to Opportunity Mapping profile option:

  1. In the Setup and Maintenance work area, go to:

    • Offering: Sales

    • Functional Area: Leads

    • Task: Manage Sales Lead Administrator Profile Values

  2. On the Manage Sales Lead Administrator Profile Values page, enter Direct Lead to Opportunity Mapping in the Profile Display Name field.

    Note: For partner leads, use the Partner Lead to Opportunity Mapping profile option.
  3. Click Search.

  4. In the Profile Values section, the predefined mapping, called Copy Lead To Opportunity Map , appears in the Profile Value field.

  5. Remove the Copy Lead To Opportunity Map value and enter the value for your user-defined mapping file, for example My Copy Lead To Opportunity Map.

    Note: Use the Standard Reference Copy Lead To Opportunity Map to keep any attachment reference during the lead to opportunity conversion.
  6. Click Save and Close.

See the topic Modify Lead Convert and Mass Lead Convert Pages for more information.

Profile Options for Copy Maps

As an administrator, you can specify your own copy maps to use for mapping objects and attributes during the lead to opportunity conversion process. For example, you can create user-defined lead and opportunity attributes in Application Composer and can then add these attributes to the copy maps. Oracle recommends that you duplicate an existing copy map and make the changes in the copy. You must save the user-defined copy map using a unique name and then specify the name of the saved copy map in one of these profile options:

Profile Option Display Name Description

Direct Lead to Opportunity Mapping

Specify the mapping file name created in Application Composer > Copy Maps. This file is used to map objects and attributes when a direct lead is converted to an opportunity. The predefined value is Copy Lead to Opportunity.

Lead to Account Mapping

Specify the mapping file name created in Application Composer, Copy Maps. This file is used to map objects and attributes during the creation of an account when converting a lead to an opportunity.

Lead to Contact Mapping

Specify the mapping file name created in Application Composer, Copy Maps. This file is used to map objects and attributes during the creation of a contact when converting a lead to an opportunity.

Partner Lead to Opportunity Mapping

Specify the mapping file name created in Application Composer, Copy Maps. This file is used to map objects and attributes when a partner Lead is converted to an Opportunity. The predefined value is Copy Lead to Opportunity.

See the topic Example of Modifying the Lead to Opportunity Copy Map for more information.

Copy maps enable you to create objects by copying existing objects. For example, you can use predefined mapping files to copy lead attributes stored on a lead to the account or contact created during lead conversion. You use the copy maps feature to map child objects and attributes in the source object (From object) to objects and attributes in the object you're creating (To object).

Copy a Lead to Account Map

Here's how to copy a lead to an account map:

  1. Ensure that you're working in an active sandbox.

  2. Click Navigator > Configuration > Application Composer.

  3. Select Sales to filter the object search, and under Advanced Setup, select Copy Maps.

  4. On the Copy Maps page, select the Copy Lead to Account > Standard Copy Lead to Account Map.

  5. Create a copy of the map and enter relevant account mappings on the Edit Copy Map page.

  6. Click Save and Close.

  7. Specify the mapping file name in the following profile option:

    • Use the Lead to Account Mapping (MKL_LEAD_TO_ACCOUNT_MAPPING_NAME) profile option to specify the mapping file name created in Copy Maps. This file maps objects and attributes during the creation of an account when converting a lead to an opportunity.

Copy a Lead to Contact Map

Here's how to copy a lead to a contact map:

  1. Ensure that you're working in an active sandbox.

  2. Click Navigator > Configuration > Application Composer.

  3. Select Sales to filter the object search, and under Advanced Setup, select Copy Maps.

  4. On the Copy Maps page, select the Copy Lead to Contact > Standard Copy Lead to Contact Map.

  5. Create a copy of the map and enter relevant account mappings on the Edit Copy Map page.

  6. Click Save and Close.

  7. Specify the mapping file name in the following profile option:

    • Use the Lead to Contact Mapping (MKL_LEAD_TO_CONTACT_MAPPING_NAME) profile option to specify the mapping file name created in Copy Maps. This file maps objects and attributes during the creation of a contact when converting a lead to an opportunity.