---
schema_version: "1"
id: 172470debc0b6c38c63c76a0b9912db901ba039077e11a466e896e57fe17aa8e
title: Clone and Customize the Prebuilt Context Definition for Collections and Recovery
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/collections_customize_context_definition_for_segment.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.collections_customize_context_definition_for_segment.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: c4bbbbdb148944db5184b2e5674651ff17bcbdec49ec83425c899ca047848616
description: To pass the context of a Collection Plan record to related Business Rules Engine components to determine the collection plan segment, clone and customize the prebuilt context definition, CollectionPlanSegmentContext.
products:
  - Industry Solutions
  - Cross Cloud
release: "264"
---
# Clone and Customize the Prebuilt Context Definition for Collections and Recovery

To pass the context of a Collection Plan record to related Business Rules Engine components to determine the collection plan segment, clone and customize the prebuilt context definition, CollectionPlanSegmentContext.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <a href="https://help.salesforce.com/s/articleView?id=ind.collections_editions_permissions.htm&amp;release=264.0.0&amp;type=5" title="Review the supported products, editions, and permissions for Collections. Then learn how your product handles permissions and how to assign them.">View product and edition availability.</a></td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col>
          <col>
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d8312e68">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d8312e68 ">To clone and customize context definitions:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d8312e68 ">Context Service Admin</td>

          </tr>
        </tbody>
      </table>

1. From Setup, in the Quick Find box, find and select **Context Definitions**.
2. Click the dropdown arrow next to the CollectionPlanSegmentContext context definition, and then select **Clone**.
3. Enter a name and save the definition.
    
    The predefined node and its fields are cloned.
4. Edit the custom context definition that you cloned.
    1. Click the **Custom Definitions** tab.
    2. Click the dropdown arrow next to the cloned context definition, and click **Edit**.
    3. If necessary, modify the context definition details, and then click **Next**.
5. If necessary, modify the predefined attributes under the Collection node.
    1. Click **Add Attributes**.
    2. Specify the attribute details such as attribute name, type, data type, display name, and description.
    3. Click **Next**.
    4. Under the Collection node, add or modify context tags, if necessary.
    5. Save your changes.
6. To persist data by transferring extracted data from cache to collection plan record fields, map the cloned context definition's node and its fields to the Collection Plan object fields.
    1. Click the cloned context definition.
    2. Click **Map Data**.
    3. On the Mapping Intent Details tile, select at least one Mapping Intent operation.
    4. To begin the mapping, click **Map**.
        
        You’re directed to Context Mapping’s builder page to begin mapping your nodes and attributes. You can map the Collection Plan fields to the predefined and user-defined fields.
    5. Map the context definition's node with the Collection Plan object, and map the node attributes with the collection plan fields.
    6. [Add the context mapping](https://help.salesforce.com/s/articleView?id=ind.context_service_add_context_mapping.htm&type=5&language=en_US)
7. Save your changes.
8. To activate your context definition, click the dropdown arrow next to the context definition that you cloned and customized, and select **Activate**.