Prompt
Parent Type
File Suffix and Directory Location
Prompt components have the suffix prompt and are stored in the prompts folder.
Version
Prompt components are available in API version 46.0 and later.
Special Access Rules
To add, edit, manage, and view prompts and walkthroughs in Lightning Experience or in Experience Cloud sites, see Considerations for Creating In-App Guidance and Permissions for Creating and Accessing In-App Guidance in Salesforce Help for permissions.
Prompts and Walkthroughs in Managed Packages
For considerations about including in-app guidance in a managed package, see Guidelines for In-App Guidance in Managed Packages in Salesforce Help.
For more information about creating managed packages, see Create a First-Generation Managed Package.
Unmanaged packages must contain a namespace prefix. For more information, see Register a Namespace for a First-Generation Managed Packages and What happens to my namespace prefix when I install a package?.
Fields
| Field Name | Description |
|---|---|
| masterLabel |
|
| promptVersions |
|
PromptVersion
A list of in-app guidance entries. Each entry represents a different prompt or walkthrough.
| Field Name | Description |
|---|---|
| actionButtonLabel |
|
| actionButtonLink |
|
| body |
|
| customApplication |
|
| delayDays |
|
| description |
|
| dismissButtonLabel |
|
| displayPosition |
|
| displayType |
|
| elementRelativePosition |
|
| endDate |
|
| header |
|
| image |
|
| imageAltText |
|
| imageLink |
|
| imageLocation |
|
| indexWithIsPublished |
|
| indexWithoutIsPublished |
|
| isPublished |
|
| masterLabel |
|
| publishedByUser |
|
| publishedDate |
|
| referenceElementContext |
|
| shouldDisplayActionButton |
|
| shouldIgnoreGlobalDelay |
|
| startDate |
|
| stepNumber |
|
| targetAppDeveloperName |
|
| targetAppNamespacePrefix |
|
| targetPageKey1 |
|
| targetPageKey2 |
|
| targetPageKey3 |
|
| targetPageKey4 |
|
| targetPageType |
|
| targetRecordType |
|
| themeColor |
|
| themeSaturation |
|
| timesToDisplay |
|
| title |
|
| uiFormulaRule |
|
| userAccess |
|
| userProfileAccess |
|
| versionNumber |
|
| videoLink |
|
UiFormulaRule
A set of one or more filters that define the conditions under which a prompt displays on a Lightning Experience page.
| Field Name | Description |
|---|---|
| booleanFilter |
|
| criteria |
|
UiFormulaCriterion
A single filter that, when evaluated, helps define visibility on a Lightning Experience page.
| Field Name | Description |
|---|---|
| leftValue |
|
| operator |
|
| rightValue |
|
Declarative Metadata Sample Definition
The following is an example of a Prompt component.
1<?xml version="1.0" encoding="UTF-8"?>
2<Prompt xmlns="http://soap.sforce.com/2006/04/metadata">
3 <masterLabel>Prompt Label</masterLabel>
4 <promptVersions>
5 <actionButtonLabel>Learn How</actionButtonLabel>
6 <actionButtonLink>https://trailhead.salesforce.com/en/content/learn/modules/scrum-and-kanban-at-salesforce/learn-about-kanban</actionButtonLink>
7 <body>Explore how the Path and the Kanban view can help you track, manage, and update your records.</body>
8 <delayDays>1</delayDays>
9 <description>Kanban floating prompt</description>
10 <dismissButtonLabel>OK</dismissButtonLabel>
11 <displayPosition>TopLeft</displayPosition>
12 <displayType>FloatingPanel</displayType>
13 <endDate>2019-03-11</endDate>
14 <isPublished>true</isPublished>
15 <masterLabel>Prompt Label</masterLabel>
16 <publishedDate>2019-03-11</publishedDate>
17 <shouldDisplayActionButton>false</shouldDisplayActionButton>
18 <shouldIgnoreGlobalDelay>false</shouldIgnoreGlobalDelay>
19 <startDate>2019-03-11</startDate>
20 <targetAppDeveloperName>LightningSales</targetAppDeveloperName>
21 <targetAppNamespacePrefix>standard</targetAppNamespacePrefix>
22 <timesToDisplay>3</timesToDisplay>
23 <title>Get on the Path to Success</title>
24 <userAccess>SpecificPermissions</userAccess>
25 <userProfileAccess>SpecificProfiles</userProfileAccess>
26 <versionNumber>1</versionNumber>
27 <videolink>https://www.youtube.com/embed/Ko-gcObzTVo</videolink>
28 <uiFormulaRule>
29 <booleanFilter>(1 AND 2 AND 3) AND (4 OR 5)</booleanFilter>
30 <criteria>
31 <leftValue>{!$Permission.StandardPermission.ActivitiesAccess}</leftValue>
32 <operator>EQUAL</operator>
33 <rightValue>TRUE</rightValue>
34 </criteria>
35 <criteria>
36 <leftValue>{!$Permission.StandardPermission.ContentWorkspaces}</leftValue>
37 <operator>EQUAL</operator>
38 <rightValue>TRUE</rightValue>
39 </criteria>
40 <criteria>
41 <leftValue>{!$Permission.CustomPermission.MyCustomPerm}</leftValue>
42 <operator>EQUAL</operator>
43 <rightValue>TRUE</rightValue>
44 </criteria>
45 <criteria>
46 <leftValue>{!ENCODED:{!ID:$User.Profile.Key}}</leftValue>
47 <operator>EQUAL</operator>
48 <rightValue>Standard</rightValue>
49 </criteria>
50 <criteria>
51 <leftValue>{!ENCODED:{!ID:$User.Profile.Key}}</leftValue>
52 <operator>EQUAL</operator>
53 <rightValue>custom_mysysadmin</rightValue>
54 </criteria>
55 </uiFormulaRule>
56 </promptVersions>
57</Prompt>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>Prompt</name>
6 </types>
7 <version>46.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.