---
schema_version: "1"
id: 5862e063a41b48b25f784114309daca6e89323f27ef5ae82b6cec3ec75b5a7c5
title: Prompt
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/meta_prompt.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_prompt.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: a26652d29e0fdd18ac396d58b65aea3f04b946ed1b562b87077a6f3c6dcabbff
description: Represents the metadata related to in-app guidance, which includes prompts and walkthroughs. Help users discover your products and services, adopt your processes, or learn how to use a new feature. Write the content, select the target audience, and specify where and when the in-app guidance appears.
---
# Prompt

Represents the metadata related to in-app guidance, which includes prompts and walkthroughs. Help users discover your products and services, adopt your processes, or learn how to use a new feature. Write the content, select the target audience, and specify where and when the in-app guidance appears.

![Important](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/images/icon_note_important.png)

#### Important

Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations.

## Parent Type

This type extends the [Metadata](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/metadata.htm "The base class for all metadata types. You can’t edit this object. A component is an instance of a metadata type.") metadata type and inherits its fullName field.

## 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](https://help.salesforce.com/s/articleView?id=sales.customhelp_lex_prompt_consider.htm&type=5&language=en_US "HTML (New Window)") and [Permissions for Creating and Accessing In-App Guidance](https://help.salesforce.com/s/articleView?id=sales.customhelp_lex_wt_license.htm&type=5&language=en_US "HTML (New Window)") 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](https://help.salesforce.com/articleView?id=customhelp_iag_packages.htm&language=en_US) in Salesforce Help.

For more information about creating managed packages, see [Create a First-Generation Managed Package](https://developer.salesforce.com/docs/atlas.en-us.pkg1_dev.meta/pkg1_dev/creating_packages.htm).

Unmanaged packages must contain a namespace prefix. For more information, see [Register a Namespace for a First-Generation Managed Packages](https://developer.salesforce.com/docs/atlas.en-us.pkg1_dev.meta/pkg1_dev/register_namespace_prefix.htm) and [What happens to my namespace prefix when I install a package?](https://help.salesforce.com/articleView?id=faq_distribution_installing_what_happens_to_my.htm&language=en_US).

## Fields

| Field Name | Description |
| --- | --- |
| masterLabel | 
Field Type

string

Description

Required. The label. Maximum of 80 characters.



 |
| promptVersions | 

Field Type

[PromptVersion\[\]](#PromptVersion)

Description

A list of in-app guidance entries. Each entry represents a different prompt or walkthrough.



 |

## PromptVersion

A list of in-app guidance entries. Each entry represents a different prompt or walkthrough.

| Field Name | Description |
| --- | --- |
| actionButtonLabel | 
Field Type

string

Description

Label for the action button or link. Maximum of 25 characters. For a walkthrough, specify this value on the last step.



 |
| actionButtonLink | 

Field Type

string

Description

URL for the action button or link. Maximum of 1,000 characters. You can’t use the GROUP BY option in a SOQL query for this field. For a walkthrough, specify this value on the last step.



 |
| body | 

Field Type

string

Description

Required. Body content.

In API version 60.0 and later, enter up to 4,000 characters for all prompt types.

In earlier API versions, enter up to 240 characters for floating prompts and targeted prompts. Enter up to 4,000 characters for docked prompts.

For docked prompts, the maximum characters include HTML markup, not just readable text.





 |
| customApplication | 

Field Type

string

Description

Internal use only. No data is populated for this field.



 |
| delayDays | 

Field Type

int

Description

Required if recurrences are scheduled. Number of days in between occurrences. For a walkthrough, specify this value on the first step.



 |
| description | 

Field Type

string

Description

Description. Maximum of 255 characters.



 |
| dismissButtonLabel | 

Field Type

string

Description

Label for the dismiss button of a floating or targeted prompt. Maximum of 15 characters.



 |
| displayPosition | 

Field Type

PromptDisplayPosition (enumeration of type string)

Description

The position of a floating prompt on the page. Valid values are:

- BottomCenter
- BottomLeft
- BottomRight
- TopCenter
- TopLeft
- TopRight





 |
| displayType | 

Field Type

PromptDisplayType (enumeration of type string)

Description

Required. The type of prompt. Valid values are:

- DockedComposer—A docked prompt
- FloatingPanel—A floating prompt
- Targeted—A targeted prompt. Available in API version 52.0 and later.





 |
| elementRelativePosition | 

Field Type

PromptElementRelativePosition (enumeration of type string)

Description

Indicates the location of a targeted prompt relative to the element. Available in API version 52.0 and later. Valid values are:

- BottomCenter
- BottomLeft
- BottomRight
- LeftBottom
- LeftCenter
- LeftTop
- RightBottom
- RightCenter
- RightTop
- TopCenter
- TopLeft
- TopRight





 |
| endDate | 

Field Type

date

Description

The date to stop showing the in-app guidance. For a walkthrough, specify this value on the first step.



 |
| header | 

Field Type

string

Description

Label for the header of a docked prompt. This value is the label contained in the window’s browser bar. Maximum of 36 characters.



 |
| image | 

Field Type

string

Description

The developer name of the contentAsset that holds the image. You can specify this field or the imageLink field, but not both.



 |
| imageAltText | 

Field Type

string

Description

Indicates the alt text of an image. Required if imageLocation, imageLink, or image is specified.



 |
| imageLink | 

Field Type

string

Description

The URL for a prompt’s image. You can specify this field or the image field, but not both. Available in API version 53.0 and later.



 |
| imageLocation | 

Field Type

picklist

Description

Indicates the location of the image in relation to the body text. Required if image, imageLink, or imageAltText is specified. Valid values are:

- Top
- Bottom
- Right, which is for floating or targeted prompts only
- Left, which is for floating or targeted prompts only





 |
| indexWithIsPublished | 

Field Type

string

Description

Used by Salesforce for efficient querying.



 |
| indexWithoutIsPublished | 

Field Type

string

Description

Used by Salesforce for efficient querying.



 |
| isPublished | 

Field Type

boolean

Description

Indicates whether the in-app guidance is active (true) or not (false).



 |
| masterLabel | 

Field Type

string

Description

Required. The label.



 |
| publishedByUser | 

Field Type

string

Description

Internal use only. No data is populated for this field.



 |
| publishedDate | 

Field Type

date

Description

Indicates the date the in-app guidance was activated. If installed from a package, this value is the date when the package was installed. For walkthroughs, this field can only be specified on the first step.



 |
| referenceElementContext | 

Field Type

textarea

Description

Used by Salesforce to identify the element that the targeted prompt is associated with. Available in API version 52.0 and later.



 |
| shouldDisplayActionButton | 

Field Type

boolean

Description

Indicates whether an action button or link is included (true) or not (false).



 |
| shouldIgnoreGlobalDelay | 

Field Type

boolean

Description

Indicates whether the in-app guidance ignores the global time delay and instead shows on page load (true) or not (false). This field is available in API version 48.0 and later.



 |
| startDate | 

Field Type

date

Description

Indicates the date to start showing the in-app guidance. For a walkthrough, specify this value on the first step.

In API version 48.0 and earlier, this field is required.





 |
| stepNumber | 

Field Type

int

Description

Required for walkthroughs only. Indicates the number of the last step the user viewed or interacted with in a walkthrough. Include up to 10 steps. Numbers must be consecutive without repeated or skipped numbers. Available in API version 49.0 and later.



 |
| targetAppDeveloperName | 

Field Type

string

Description

The app’s developer name where the in-app guidance appears. Deprecated in API version 51.0 and later.



 |
| targetAppNamespacePrefix | 

Field Type

string

Description

The app’s namespace prefix where the in-app guidance appears. This value must match the target app’s NamespacePrefix in the org that the package is being installed into. Maximum of 15 characters. Deprecated in API version 51.0 and later.



 |
| targetPageKey1 | 

Field Type

string

Description

Required. Used by Salesforce to identity the prompt’s page location along with targetPageKey2, targetPageKey3, targetPageKey4, and targetPageType.



 |
| targetPageKey2 | 

Field Type

string

Description

Used by Salesforce to identity the prompt’s page location along with targetPageKey1, targetPageKey3, targetPageKey4, and targetPageType.



 |
| targetPageKey3 | 

Field Type

string

Description

Used by Salesforce to identify the prompt’s page location along with targetPageKey1, targetPageKey2, targetPageKey4, and targetPageType.



 |
| targetPageKey4 | 

Field Type

string

Description

Used by Salesforce to identify the prompt’s page location along with targetPageKey1, targetPageKey2, targetPageKey3, and targetPageType. This field is available in API version 53.0 and later.



 |
| targetPageType | 

Field Type

string

Description

Required. Used by Salesforce to identity the page location along with targetPageKey1, targetPageKey2, targetPageKey3, and targetPageKey4.



 |
| targetRecordType | 

Field Type

string

Description

Used by Salesforce to determine if in-app guidance is specific to a record type. This field is available in API version 53.0 and later.



 |
| themeColor | 

Field Type

PromptThemeColor (enumeration of type string)

Description

Indicates which custom theme color is applied to the in-app guidance. Required if themeSaturation is specified. For a walkthrough, specify this value on the first step. Valid values are:

- Theme1, which is derived from the current brand color
- Theme2, which is derived from the current page background color
- Theme3, which is derived from the current global header color
- Theme4, which is derived from the current app theme color





 |
| themeSaturation | 

Field Type

PromptThemeSaturation (enumeration of type string)

Description

Indicates which color value, or saturation, is applied to the in-app guidance that has a custom theme color. Required if themeColor is specified. For a walkthrough, specify this value on the first step. Valid values are:

- Dark
- Light





 |
| timesToDisplay | 

Field Type

int

Description

Required if recurrences are scheduled. The maximum number of times to show the in-app guidance. Salesforce detects whether the user interacts with the in-app guidance, then determines whether to show the in-app guidance again or cancel scheduled recurrences. Maximum value of 30. For a walkthrough, specify this value on the first step.



 |
| title | 

Field Type

string

Description

Required. The label for the title. Maximum of 36 characters.



 |
| uiFormulaRule | 

Field Type

[UiFormulaRule\[\]](#UiFormulaRule)

Description

A set of one or more permission filters that define the conditions under which the in-app guidance displays on the page.

If the rule evaluates to true, the in-app guidance displays on the page. If false, it doesn't display. If this field is null, the in-app guidance displays by default.





 |
| userAccess | 

Field Type

PromptUserAccess (enumeration of type string)

Description

Indicates which permissions can see the in-app guidance. Valid values are:

- Everyone, which indicates that there’s no permission restrictions
- SpecificPermissions, which indicates that only users with all the specific user permissions specified can see the in-app guidance

In API version 48.0 and earlier, this field is required.





 |
| userProfileAccess | 

Field Type

PromptUserProfileAccess (enumeration of type string)

Description

Indicates which profiles can see the in-app guidance. This field is available in API version 48.0 and later. Valid values are:

- Everyone, which indicates that there are no profile restrictions
- SpecificProfiles, which indicates that users with any of the specified user profiles can see the in-app guidance





 |
| versionNumber | 

Field Type

int

Description

Required. The number remains 1 since multiple versions aren’t saved in the org.



 |
| videoLink | 

Field Type

string

Description

The embed URL for a video in a docked prompt. Maximum of 1,000 characters. You can specify this field or the image field, but not both. This field is available in API version 48.0 and later. See [Considerations for Creating In-App Guidance](https://help.salesforce.com/s/articleView?id=sales.customhelp_lex_prompt_consider.htm&type=5&language=en_US "HTML (New Window)").



 |

## 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 | 
Field Type

string

Description

Specifies the AND filter condition.



 |
| criteria | 

Field Type

[UiFormulaCriterion\[\]](#UiFormulaCriterion)

Description

List of one or more filters that, when evaluated, determine visibility.



 |

## UiFormulaCriterion

A single filter that, when evaluated, helps define visibility on a Lightning Experience page.

| Field Name | Description |
| --- | --- |
| leftValue | 
Field Type

string

Description

Required. The field used for filtering. Only standard and custom permissions can be included. You can use these expressions in the leftValue field when setting filters for visibility.

- {!$Permission.CustomPermission.permissionName}—Use this expression to control visibility based on the custom permissions of the user viewing the Lightning page. Supported for app, Home, and record pages only.
- {!$Permission.StandardPermission.permissionName}—Use this expression to control visibility based on the standard permissions of the user viewing the Lightning page. Supported for app, Home, and record pages only.
- {!ENCODED:{!ID:$User.Profile.Key}}—Use this expression to control visibility based on the custom or standard profile of the user viewing the Lightning page. Available in API Version 48.0 and later.





 |
| operator | 

Field Type

string

Description

Required. Defines the operator used to filter the data. Valid value is EQUAL.



 |
| rightValue | 

Field Type

string

Description

Specifies if you want to evaluate the visibility for permissions or the name of the profile.

- For permissions, use true.
- For profiles, use the name of the profile. Available in API Version 48.0 and later. For example, Standardor custom\_regionalsales.





 |

## Declarative Metadata Sample Definition

The following is an example of a Prompt component.

<?xml version="1.0" encoding="UTF-8"?>
<Prompt xmlns="http://soap.sforce.com/2006/04/metadata">
    <masterLabel\>Prompt Label</masterLabel\>
    <promptVersions\>
        <actionButtonLabel\>Learn How</actionButtonLabel\>
        <actionButtonLink\>https://trailhead.salesforce.com/en/content/learn/modules/scrum-and-kanban-at-salesforce/learn-about-kanban</actionButtonLink\>
        <body\>Explore how the Path and the Kanban view can help you track, manage, and update your records.</body\>
        <delayDays\>1</delayDays\>
        <description\>Kanban floating prompt</description\>
        <dismissButtonLabel\>OK</dismissButtonLabel\>
        <displayPosition\>TopLeft</displayPosition\>
        <displayType\>FloatingPanel</displayType\>
        <endDate\>2019-03-11</endDate\>
        <isPublished\>true</isPublished\>
        <masterLabel\>Prompt Label</masterLabel\>
        <publishedDate\>2019-03-11</publishedDate\>
        <shouldDisplayActionButton\>false</shouldDisplayActionButton\>
        <shouldIgnoreGlobalDelay\>false</shouldIgnoreGlobalDelay\>
        <startDate\>2019-03-11</startDate\>
        <targetAppDeveloperName\>LightningSales</targetAppDeveloperName\>
        <targetAppNamespacePrefix\>standard</targetAppNamespacePrefix\>
        <timesToDisplay\>3</timesToDisplay\>
        <title\>Get on the Path to Success</title\>
        <userAccess\>SpecificPermissions</userAccess\>
        <userProfileAccess\>SpecificProfiles</userProfileAccess\>
        <versionNumber\>1</versionNumber\>
        <videolink\>https://www.youtube.com/embed/Ko-gcObzTVo</videolink\>
        <uiFormulaRule\>
            <booleanFilter\>(1 AND 2 AND 3) AND (4 OR 5)</booleanFilter\>
            <criteria\>
                <leftValue\>{!$Permission.StandardPermission.ActivitiesAccess}</leftValue\>
                <operator\>EQUAL</operator\>
                <rightValue\>TRUE</rightValue\>
            </criteria\>
            <criteria\>
                <leftValue\>{!$Permission.StandardPermission.ContentWorkspaces}</leftValue\>
                <operator\>EQUAL</operator\>
                <rightValue\>TRUE</rightValue\>
            </criteria\>
            <criteria\>
                <leftValue\>{!$Permission.CustomPermission.MyCustomPerm}</leftValue\>
                <operator\>EQUAL</operator\>
                <rightValue\>TRUE</rightValue\>
            </criteria\>
            <criteria\>
                <leftValue\>{!ENCODED:{!ID:$User.Profile.Key}}</leftValue\>
                <operator\>EQUAL</operator\>
                <rightValue\>Standard</rightValue\>
            </criteria\>
            <criteria\>
                <leftValue\>{!ENCODED:{!ID:$User.Profile.Key}}</leftValue\>
                <operator\>EQUAL</operator\>
                <rightValue\>custom\_mysysadmin</rightValue\>
            </criteria\>
        </uiFormulaRule\>
    </promptVersions\>
</Prompt\>

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

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types\>
        <members\>\*</members\>
        <name\>Prompt</name\>
    </types\>
    <version\>46.0</version\>
</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](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/file_based_zip_file.htm "The deploy() and retrieve() calls are used to deploy and retrieve a .zip file. Within the .zip file is a project manifest (package.xml) that lists what to retrieve or deploy, and one or more XML components that are organized into folders.").