Prompt defines Salesforce In-App Guidance: prompts and walkthroughs that explain features, guide users through processes, and link to resources in Lightning Experience or Experience Cloud sites. It controls the guidance content, audience, page location, activation, and schedule. It is not a generative AI prompt template.
Prompt is the deployable component. Its promptVersions collection contains nested PromptVersion definitions, not independently deployable components. Despite the collection's name, the required versionNumber remains 1 because the org does not retain multiple saved versions.
Key Elements
Except for the outer masterLabel and the promptVersions collection itself, the elements below belong inside promptVersions.
| Element | What the Element Controls |
|---|---|
masterLabel |
Required label at both the component and nested definition levels. The component-level label has an 80-character maximum. |
promptVersions, versionNumber
|
Contains the nested guidance definitions. Each definition requires versionNumber, which remains 1. |
isPublished, publishedDate
|
isPublished controls whether guidance is active. publishedDate records activation, or installation when the guidance comes from a package. |
startDate, endDate, delayDays, timesToDisplay
|
Set the display period and recurrence schedule. Scheduled recurrences require both delayDays and timesToDisplay. The latter is a maximum, capped at 30. |
shouldIgnoreGlobalDelay |
When true, bypasses the global time delay and shows eligible guidance on page load. It does not bypass other eligibility conditions. |
userAccess, userProfileAccess
|
Separate permission and profile restrictions. Permission values are Everyone and SpecificPermissions; profile values are Everyone and SpecificProfiles. |
uiFormulaRule |
Defines visibility criteria through booleanFilter and criteria. Each criterion uses leftValue, operator, and rightValue. The documented operator is EQUAL. |
targetPageType, targetPageKey1, targetPageKey2, targetPageKey3, targetPageKey4, targetRecordType
|
Identify the page location together. targetPageType and targetPageKey1 are required. targetRecordType further restricts guidance to a record type. |
displayType, displayPosition, referenceElementContext, elementRelativePosition
|
displayType is required and accepts DockedComposer, FloatingPanel, or Targeted. The other fields apply to the corresponding placement mode. |
stepNumber |
Required for walkthroughs. Supports up to 10 steps, numbered consecutively without duplicates or gaps. |
body, title, header
|
body and title are required. The body allows 4,000 characters; docked prompt HTML markup counts toward that limit. title and the docked prompt's header each allow 36 characters. |
image, imageLink, imageAltText, imageLocation
|
Select an image by asset developer name or URL, but not both. Alternative text and location have interdependent requirements. Locations are Top, Bottom, Left, and Right; left and right placement is limited to floating or targeted prompts. |
videoLink |
Video embed URL for a docked prompt, with a 1,000-character maximum. Cannot coexist with image. |
themeColor, themeSaturation
|
Must be supplied together. Color values are Theme1, Theme2, Theme3, and Theme4; saturation values are Dark and Light. |
shouldDisplayActionButton, actionButtonLabel, actionButtonLink
|
The boolean controls whether an action button or link is included. The label allows 25 characters and the URL allows 1,000 characters. For walkthroughs, place the label and link on the last step. |
Behavior and Constraints
Activation does not guarantee display
isPublished=true makes guidance active, but does not guarantee that a particular user sees it. Page targeting, audience restrictions, dates, recurrence settings, and the user's prior interaction can still affect display.
startDate and endDate bound the display period. For scheduled recurrences, delayDays specifies the interval in days and timesToDisplay specifies the maximum number of displays. Salesforce detects user interaction and decides whether to show the guidance again or cancel scheduled recurrences. A value of 30 therefore does not promise 30 displays.
shouldIgnoreGlobalDelay=true bypasses the global time delay so eligible guidance can appear on page load. It does not override activation, page targeting, audience restrictions, or scheduling. A missing display cannot always be diagnosed from metadata alone because the definition does not establish the user's interaction history.
Permission and profile filters work differently
-
userAccess=Everyoneadds no permission restriction.SpecificPermissionsrequires the user to have all specified user permissions. -
userProfileAccess=Everyoneadds no profile restriction.SpecificProfilespermits users with any of the specified profiles.
uiFormulaRule supplies visibility criteria. A true result permits display; a false result prevents it. A null rule leaves this filter unrestricted rather than overriding the other display conditions.
Within uiFormulaRule.criteria, use operator=EQUAL with these documented expression forms:
Expression in leftValue
|
Required comparison |
|---|---|
{!$Permission.CustomPermission.permissionName} |
Checks a custom permission. Set rightValue to true. |
{!$Permission.StandardPermission.permissionName} |
Checks a standard permission. Set rightValue to true. |
{!ENCODED:{!ID:$User.Profile.Key}} |
Checks a profile. Set rightValue to the profile name, not a record ID. |
The permission expressions are supported on app, Home, and record pages. booleanFilter combines the criteria. Preserve the distinction between all selected permissions and any selected profile when building its groups, such as (1 AND 2) AND (3 OR 4).
These settings only target guidance visibility. They do not grant permissions or access to underlying data. Creating, managing, and viewing guidance also depend on Salesforce's In-App Guidance permission requirements for the relevant experience.
Walkthrough settings belong on particular steps
A walkthrough requires stepNumber and supports up to 10 steps. Step numbers must be consecutive, with no repeated or skipped numbers.
- Specify
startDate,endDate,delayDays,timesToDisplay,themeColor, andthemeSaturationon the first step. -
publishedDatecan only be specified on the first step. - Specify
actionButtonLabelandactionButtonLinkon the last step.
shouldDisplayActionButton determines whether the action is included. Populating a label or URL does not, by itself, enable the action.
Page targeting and placement are separate
Salesforce interprets targetPageType and the four page keys together as a combined page locator. The keys are not interchangeable standalone page names. targetRecordType adds record-type-specific targeting.
-
FloatingPanelusesdisplayPositionto position the prompt on the page. Salesforce's documentation listsBottomCenter,BottomLeft,BottomRight,TopCenter,TopLeft, andTopRight. -
TargetedusesreferenceElementContextto identify the associated page element andelementRelativePositionto position the prompt around that element. -
DockedComposersupports docked content, including a video embed URL throughvideoLink.
For targeted prompts, elementRelativePosition accepts BottomCenter, BottomLeft, BottomRight, LeftBottom, LeftCenter, LeftTop, RightBottom, RightCenter, RightTop, TopCenter, TopLeft, and TopRight.
customApplication is internal-only and unpopulated. Do not interpret it as populated application-targeting configuration.
Images, video, and themes have paired constraints
image identifies a ContentAsset by developer name, not record ID. Alternatively, imageLink supplies an image URL. These two fields are mutually exclusive.
-
imageAltTextis required whenimage,imageLink, orimageLocationis supplied. -
imageLocationis required whenimage,imageLink, orimageAltTextis supplied. -
LeftandRightimage placement is only for floating or targeted prompts.TopandBottomare also available. -
videoLinkis an embed URL for a docked prompt and cannot coexist withimage.
themeColor and themeSaturation require each other. Theme1 derives from the current brand color, Theme2 from the page background, Theme3 from the global header, and Theme4 from the app theme. Dark and Light select saturation. The same theme selection can therefore look different in another org or application context.
Deployment and Retrieval
Prompt components use the .prompt suffix and reside in the prompts folder. The type inherits fullName from Metadata. In a package.xml manifest, use Prompt as the type name; wildcard membership with * is supported.
Deploy and retrieve the parent Prompt component, including its nested promptVersions. Do not treat a nested PromptVersion as a separate deployment member or increment versionNumber to preserve a revision history.
When checking a definition for deployment, distinguish required fields from conditional combinations. A walkthrough needs consecutive step numbers and correctly placed first-step and last-step settings. Recurrences need both scheduling fields; images need their companion fields; and custom themes need both color and saturation.
In-app guidance can be included in managed packages. Salesforce provides instructions for creating a first-generation managed package.
Unmanaged packages containing in-app guidance must contain a namespace prefix. See Salesforce's namespace registration instructions.
For guidance installed from a package, publishedDate records the package installation date. Do not interpret it as the original author's activation date when comparing retrieved definitions.
Relationships
Dependencies vary with the configured content, page locator, and audience filters. The relationships below are conditional: a page key only references a tab when it identifies a tab-based location, and a visibility criterion's value has a different meaning for profile and permission filters.
References
-
ContentAsset:promptVersions.image, using the asset's developer name. -
CustomTab:promptVersions.targetPageKey1,promptVersions.targetPageKey2,promptVersions.targetPageKey3, andpromptVersions.targetPageKey4, where the combined locator identifies a tab-based location. -
RecordType:promptVersions.targetRecordType. -
Profile:promptVersions.uiFormulaRule.criteria.rightValue, when the criterion filters by profile. The value is a profile name. -
CustomPermission:promptVersions.uiFormulaRule.criteria.leftValue, through the custom permission expression. For permission criteria,rightValueistrue, not a permission name. -
CustomApplication:promptVersions.customApplicationis an internal-only schema connection; the field is unpopulated and is not usable application-targeting configuration.
Referenced By
-
Translations:namecan identify aPrompt. This incoming translation relationship is separate from the nested guidance definitions.
Documentation Inconsistencies
The exposed displayPosition enumeration includes MiddleCenter, MiddleLeft, and MiddleRight, while Salesforce's Prompt documentation lists only the top and bottom positions. This discrepancy does not establish that the additional middle-position values are invalid.
Common Questions
Why is my active in-app guidance prompt not showing?
isPublished=true only establishes activation. Page targeting, permission and profile filters, visibility criteria, dates, recurrence settings, and prior user interaction can still prevent display. shouldIgnoreGlobalDelay=true only bypasses the global delay.
Can I deploy PromptVersion separately from Prompt?
No. PromptVersion definitions are nested inside the deployable Prompt component's promptVersions collection. Their required versionNumber remains 1; it is not a saved revision counter.
Does timesToDisplay guarantee that a prompt appears that many times?
No. It is a maximum, capped at 30. Salesforce uses user interaction to determine whether to show the guidance again or cancel scheduled recurrences. Scheduled recurrences also require delayDays.
Should the image field contain a Salesforce record ID?
No. image contains a ContentAsset developer name. Use imageLink for an image URL instead, but do not populate both. Supply the required alternative text and image location.
How many steps can an in-app guidance walkthrough contain?
A walkthrough supports up to 10 steps with consecutive stepNumber values and no duplicates or gaps. Put scheduling and theme settings on the first step, and the action button label and link on the last step. publishedDate can only be specified on the first step.