Create a Copy 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.