ActionPlanTemplate

Represents the instance of an action plan template.

Parent Type 

This type extends Metadata and inherits its fields.

File Suffix and Directory Location 

ActionPlanTemplate components have the suffix .apt and are stored in the actionPlanTemplates folder.

Version 

Action Plan Template components are available in API version 47.0 and later.

Special Access Rules 

To create or access action plan templates, you must have the Customize Application permission and the IndustriesActionPlans license.

Fields 

actionPlanTemplateItem 

actionPlanTemplateItemDependencies 

actionPlanType 

  • Type: ActionPlanTemplateType (enumeration of type string)

  • Required: No

  • Description: Type of the action plan template.

    Available in API version 63.0 and later.

  • Possible values:

    • Industries
    • Retail
    • ITSM — Available in API version 65.0 and later.
    • PrvdEngmtCompliance
    • KAM

category 

  • Type: string
  • Required: No
  • Introduced: API version 64.0
  • Description: Category for this action plan template.

description 

  • Type: string
  • Required: No
  • Description: The description of the action plan template.

estimatedCompletionDays 

  • Type: int
  • Required: No
  • Introduced: API version 64.0
  • Description: Estimated number of days required to complete the action plan.

fileBasedTemplatePath 

  • Type: string
  • Required: No
  • Introduced: API version 64.0
  • Description: File path for a file-based action plan template.

isAdHocItemCreationEnabled 

  • Type: boolean
  • Required: Yes
  • Introduced: API version 59.0
  • Description: Required. Indicates whether ad hoc item creation is enabled for this action plan template (true) or not (false).

name 

  • Type: string
  • Required: Yes
  • Description: Required. The name of the action plan template.

sourceType 

  • Type: string
  • Required: No
  • Introduced: API version 64.0
  • Description: Source type of the action plan template.

status 

  • Type: string
  • Required: No
  • Introduced: API version 64.0
  • Description: Status of the action plan template.

subcategory 

  • Type: string
  • Required: No
  • Introduced: API version 64.0
  • Description: Subcategory for this action plan template.

targetEntityType 

  • Type: string
  • Required: Yes
  • Description: Required. The parent object this action plan template relates to. Supported parent objects are Account, BusinessMilestone, Campaign, Case, Claim, Contact, Contract, InsurancePolicy, InsurancePolicyCoverage, Lead, Opportunity, PersonLifeEvent, and Visit and custom objects with activities enabled.

uniqueName 

  • Type: string
  • Required: Yes
  • Description: Required. The unique identifier for this action plan template record.

ActionPlanTemplateItem Type 

Represents the instance of an item on an action plan template version.

Fields 

actionPlanTemplateItemValue 

displayOrder 

  • Type: int
  • Required: No
  • Description: The order in which this item is displayed within the action plan template version.

isRequired 

  • Type: boolean
  • Required: No
  • Description: Indicates whether the task created from this template item is required.

itemEntityType 

  • Type: string
  • Required: Yes
  • Introduced: API version 48.0
  • Description: Required. The name of the field on the action plan template item that this value is for.

name 

  • Type: string
  • Required: Yes
  • Description: Required. The name of the action plan template item.

uniqueName 

  • Type: string
  • Required: Yes
  • Description: Required. The unique identifier for this action plan template item record.

ActionPlanTemplateItemDependency Type 

Represents a dependency between action plan template items, defining the sequential relationship and creation timing of items.

Version 

Introduced in API version 59.0.

Fields 

creationType 

  • Type: string
  • Required: Yes
  • Description: Required. Defines how the dependent item is created in the action plan.

name 

  • Type: string
  • Required: Yes
  • Description: Required. Name of the dependency relationship.

previousTemplateItem 

  • Type: ActionPlanTemplateItem
  • Required: Yes
  • Description: Required. Reference to the prerequisite template item that must be completed before the dependent item begins.

templateItem 

  • Type: ActionPlanTemplateItem
  • Required: Yes
  • Description: Required. Reference to the dependent template item that relies on the completion of the previous item.

ActionPlanTemplateItemValue Type 

Represents the value associated with an action plan template item.

Fields 

itemEntityType 

  • Type: string
  • Required: Yes
  • Introduced: API version 48.0
  • Description: Required. The name of the field on the action plan template item that this value is for.

name 

  • Type: string
  • Required: Yes
  • Description: Required. The name of the action plan template item value.

valueFormula 

  • Type: string
  • Required: No
  • Description: The formula for this action plan template item.

valueLiteral 

  • Type: string
  • Required: No
  • Description: The value for this action plan template item.

Declarative Metadata Sample Definition 

The following is an example of an ActionPlanTemplate component.

1<?xml version="1.0" encoding="UTF-8"?>
2<ActionPlanTemplate xmlns="http://soap.sforce.com/2006/04/metadata">
3    <actionPlanTemplateItem>
4        <actionPlanTemplateItemValue>
5            <name>Subject</name>
6            <valueLiteral>APT 01 Account Packaging APTI 01</valueLiteral>
7            <itemEntityType>Task</itemEntityType>
8        </actionPlanTemplateItemValue>
9        <actionPlanTemplateItemValue>
10            <name>Priority</name>
11            <valueLiteral>Normal</valueLiteral>
12            <itemEntityType>Task</itemEntityType>
13        </actionPlanTemplateItemValue>
14        <actionPlanTemplateItemValue>
15            <name>ActivityDate</name>
16            <valueFormula>StartDate + 10</valueFormula>
17            <itemEntityType>Task</itemEntityType>
18        </actionPlanTemplateItemValue>
19        <displayOrder>1</displayOrder>
20        <isRequired>true</isRequired>
21        <itemEntityType>Task</itemEntityType>
22        <name>APT 01 Account Packaging APTI 01</name>
23        <uniqueName>APT_01_Account_Packaging_APTI_01_2827f387_9dbc_11e9_920a_e95716848ddd</uniqueName>
24    </actionPlanTemplateItem>
25    <actionPlanTemplateItem>
26        <actionPlanTemplateItemValue>
27            <name>Subject</name>
28            <valueLiteral>APT 01 Account Packaging APTI 02</valueLiteral>
29            <itemEntityType>Task</itemEntityType>
30        </actionPlanTemplateItemValue>
31        <actionPlanTemplateItemValue>
32            <name>Priority</name>
33            <valueLiteral>Normal</valueLiteral>
34            <itemEntityType>Task</itemEntityType>
35        </actionPlanTemplateItemValue>
36        <actionPlanTemplateItemValue>
37            <name>ActivityDate</name>
38            <valueFormula>StartDate + 10</valueFormula>
39            <itemEntityType>Task</itemEntityType>
40        </actionPlanTemplateItemValue>
41        <displayOrder>1</displayOrder>
42        <isRequired>true</isRequired>
43        <itemEntityType>Task</itemEntityType>
44        <name>APT 01 Account Packaging APTI 02</name>
45        <uniqueName>APT_01_Account_Packaging_APTI_02_3430da7b_9dbc_11e9_920a_b5d3292906c3</uniqueName>
46    </actionPlanTemplateItem>
47    <actionPlanTemplateItem>
48        <actionPlanTemplateItemValue>
49            <name>Subject</name>
50            <valueLiteral>APT 01 Account Packaging APTI 03</valueLiteral>
51            <itemEntityType>Task</itemEntityType>
52        </actionPlanTemplateItemValue>
53        <actionPlanTemplateItemValue>
54            <name>Priority</name>
55            <valueLiteral>Normal</valueLiteral>
56            <itemEntityType>Task</itemEntityType>
57        </actionPlanTemplateItemValue>
58        <actionPlanTemplateItemValue>
59            <name>ActivityDate</name>
60            <valueFormula>StartDate + 10</valueFormula>
61            <itemEntityType>Task</itemEntityType>
62        </actionPlanTemplateItemValue>
63        <displayOrder>1</displayOrder>
64        <isRequired>true</isRequired>
65        <itemEntityType>Task</itemEntityType>
66        <name>APT 01 Account Packaging APTI 03</name>
67        <uniqueName>APT_01_Account_Packaging_APTI_03_2d0363d9_9dbc_11e9_920a_219a003f176d</uniqueName>
68    </actionPlanTemplateItem>
69    <actionPlanTemplateItemDependencies>
70        <name>APT Task Dependency</name>
71        <creationType>OnPreviousItemCompleted</creationType>
72        <previousTemplateItem>
73            <actionPlanTemplateItemValue>
74                <name>Subject</name>
75                    <valueLiteral>APT 01 Account Packaging APTI 01</valueLiteral>
76                    <itemEntityType>Task</itemEntityType>
77                </actionPlanTemplateItemValue>
78                <actionPlanTemplateItemValue>
79                    <name>Priority</name>
80                    <valueLiteral>Normal</valueLiteral>
81                    <itemEntityType>Task</itemEntityType>
82                </actionPlanTemplateItemValue>
83                <actionPlanTemplateItemValue>
84                    <name>ActivityDate</name>
85                    <valueFormula>StartDate + 10</valueFormula>
86                    <itemEntityType>Task</itemEntityType>
87            </actionPlanTemplateItemValue>
88            <displayOrder>1</displayOrder>
89            <isRequired>true</isRequired>
90            <itemEntityType>Task</itemEntityType>
91            <name>APT 01 Account Packaging APTI 01</name>
92            <uniqueName>APT_01_Account_Packaging_APTI_01_2827f387_9dbc_11e9_920a_e95716848ddd</uniqueName>
93        </previousTemplateItem>
94        <templateItem>
95            <actionPlanTemplateItemValue>
96            <name>Subject</name>
97            <valueLiteral>APT 01 Account Packaging APTI 02</valueLiteral>
98            <itemEntityType>Task</itemEntityType>
99            </actionPlanTemplateItemValue>
100            <actionPlanTemplateItemValue>
101                <name>Priority</name>
102                <valueLiteral>Normal</valueLiteral>
103                <itemEntityType>Task</itemEntityType>
104            </actionPlanTemplateItemValue>
105            <actionPlanTemplateItemValue>
106                <name>ActivityDate</name>
107                <valueFormula>StartDate + 10</valueFormula>
108                <itemEntityType>Task</itemEntityType>
109            </actionPlanTemplateItemValue>
110            <displayOrder>1</displayOrder>
111            <isRequired>true</isRequired>
112            <itemEntityType>Task</itemEntityType>
113            <name>APT 01 Account Packaging APTI 02</name>
114            <uniqueName>APT_01_Account_Packaging_APTI_02_3430da7b_9dbc_11e9_920a_b5d3292906c3</uniqueName>
115        </templateItem>
116    </actionPlanTemplateItemDependencies>
117    <description>APT 01 Account Packaging Description</description>
118    <name>APT 01 Account Packaging</name>
119    <targetEntityType>Account</targetEntityType>
120    <actionPlanType>Industries</actionPlanType>
121    <uniqueName>APT_01_Account_Packaging_0c9e8b15_9dbc_11e9_920a_8d6ecf990219</uniqueName>
122    <isAdHocItemCreationEnabled>false</isAdHocItemCreationEnabled>
123    <category>Onboarding</category>
124    <subcategory>OnBoarding Product</subcategory>
125    <estimatedCompletionDays>4</estimatedCompletionDays>
126    <sourceType>Migrated From SandBox</sourceType>
127    <fileBasedTemplatePath>Action Plan Template</fileBasedTemplatePath>
128    <status>Draft</status>
129</ActionPlanTemplate>

The following is an example package.xml that references the previous definition.

1<?xml version="1.0" encoding="UTF-8"?>
2<Package xmlns="http://soap.sforce.com/2006/04/metadata">
3    <types>
4        <members>*</members>
5        <name>ActionPlanTemplate</name>
6    </types>
7    <version>47.0</version>
8</Package>

Wildcard Support in the Manifest File 

This metadata type supports the wildcard character * (asterisk) in the package.xml manifest file. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.