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
| Input | Type | Description |
|---|---|---|
| activityPlanToTerritories | List<Apex> | Required A collection of Apex crtActvtyPlan.ActivityPlanToTerritories records, where each pair contains a source Activity Plan ID and its associated territory IDs. |
| timePeriodId | String | Required The ID of the time period to assign to each newly created Activity Plan record. |
| activityPlanPrefix | String | Required 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. |
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": []
}
}
]