---
schema_version: "1"
id: 42968b0d46b75bf34e8f99ef1a08974ea77755b3c6af2df977ace2c69846b636
title: Clone Activity Plan And Territories Action
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/life_sciences_dev_guide/ls_actions_clone_actvty_plan_territories.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.life_sciences_dev_guide.meta/life_sciences_dev_guide/ls_actions_clone_actvty_plan_territories.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: b5659c00728d4e050ca12c6c1e5463f58ff1a60af3bec75e8c724d06844c115e
description: Clones Activity Plan records and associates them with specified territories.
---
# Clone Activity Plan And Territories Action

Clones Activity Plan records and associates them with specified territories.

This action is available in API version 67.0 and later.

## Supported REST HTTP Methods

**URI**: /services/data/vXX.X/actions/standard/cloneActvtyPlanTerritories

Where XX.X is the latest API version.

**Formats**: JSON, XML

**HTTP Methods**: POST

**Authentication**: Authorization: Bearer TOKEN

Where TOKEN is your OAuth access token.

## Inputs

<table class="featureTable sort_table" summary="">



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d490228e98">Input</th>

              <th class="featureTableHeader  " id="d490228e101">Type</th>

              <th class="featureTableHeader  " id="d490228e104">Description</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d490228e98" data-title="Input"><span class="keyword parmname">activityPlanToTerritories</span></td>

              <td class="entry" headers="d490228e101" data-title="Type">List&lt;Apex&gt;</td>

              <td class="entry" headers="d490228e104" data-title="Description">Required<p class="p">A collection of Apex <samp class="codeph apex_code">crtActvtyPlan.ActivityPlanToTerritories</samp> records, where each pair contains a source Activity Plan ID and its associated territory IDs.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d490228e98" data-title="Input"><span class="keyword parmname">timePeriodId</span></td>

              <td class="entry" headers="d490228e101" data-title="Type">String</td>

              <td class="entry" headers="d490228e104" data-title="Description">Required<p class="p">The ID of the time period to assign to each newly created Activity Plan record.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d490228e98" data-title="Input"><span class="keyword parmname">activityPlanPrefix</span></td>

              <td class="entry" headers="d490228e101" data-title="Type">String</td>

              <td class="entry" headers="d490228e104" data-title="Description">Required<p class="p">The base name prefix for the new Activity Plan records. The territory name is appended to this prefix to form the final Activity Plan name.</p>
              </td>

            </tr>

          </tbody>

        </table>

## Outputs

| Output | Type | Description |
| --- | --- | --- |
| clonedActivityPlanIds | List<String> | A list of IDs for the Activity Plan records created during the clone operation. |

## Example

Sample Request

{
          "inputs": \[
          {
          "activityPlanToTerritories": \[
          {
          "activityPlanId": "1APxx0000004C92GAE",
          "territoryIds": \[
          "0TTxx0000001A23GBF",
          "0TTxx0000001A24GBF"
          \]
          }
          \],
          "timePeriodId": "0TPxx0000003B11GAE",
          "activityPlanPrefix": "FY26\_Territory\_Plan"
          }
          \]
          }
        

Sample Response

\[
          {
          "actionResult": {
          "outputValues": {
          "clonedActivityPlanIds": \[
          "1APxx0000004C95GAE",
          "1APxx0000004C96GAE"
          \]
          },
          "isSuccess": true,
          "errors": \[\]
          }
          }
          \]