Newer Version Available

This content describes an older version of this product. View Latest

PromptVersion

Represents an in-app guidance prompt. Available in API version 46.0 and later.

Use prompts to display announcements, training, or news to users within the app. Choose to add an action button that links to a URL of your choice. Track views and action button clicks.

Supported Calls

create(), delete(), describeSObjects(), query(), retrieve(), update(), upsert()

Special Access Rules

Admins have access to add or edit prompts. For non-admin users, assign the Manage Prompts and Modify Metadata user permission. Everyone can see the In-App Guidance setup page.

Packaging Prompts

See Creating Managed Packages in Salesforce Help for more information.

To create a managed package in a Developer edition org, set an org namespace prefix first. You aren’t able to create a prompt without one.

Unmanaged packages for prompts isn’t supported.

When orgs install prompts from packages, the prompts will be the same publish state as indicated by the IsPublished field. For example, if the package prompt is active, it will also be active when installed by the user.

Fields

Field Details
ActionButtonLabel
Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Label for the action button. Maximum of 25 characters.
ActionButtonLink
Type
url
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
URL for the action button. Maximum of 1,000 characters. You can’t use the GROUP BY option in a SOQL query for this field.
Body
Type
textarea
Properties
Create, Update
Description
Body content of the prompt. For floating prompts, there’s a maximum of 120 characters. For docked prompts, there’s a maximum of 4000 characters.
DelayDays
Type
int
Properties
Create, Filter, Group, Sort, Update
Description
Number of days between occurrences of the prompt.
Description
Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Description of the prompt. Maximum of 255 characters.
DismissButtonLabel
Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Label for the dismiss button. Maximum of 15 characters.
DisplayPosition
Type
picklist
Properties
Create, Filter, Group, Nillable, Restricted picklist, Sort, Update
Description
Indicates the position of the floating prompt on the page. Valid values are:
  • TopLeft
  • TopCenter
  • TopRight
  • BottomLeft
  • BottomCenter
  • BottomRight
DisplayType
Type
picklist
Properties
Create, Filter, Group, Restricted picklist, Sort, Update
Description
Indicates the type of prompt. Valid values are:
  • DockedComposer, which is the docked prompt
  • FloatingPanel, which is the floating prompt
EndDate
Type
date
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Indicates the date to stop showing the prompt.
Header
Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Label for the header of the docked prompt. This is the label contained in the window’s browser bar. Maximum of 36 characters.
IndexWithIsPublished
Type
string
Properties
Filter, idLookup, Nillable, Sort
Description
Used by Salesforce for efficient querying.
IndexWithoutIsPublished
Type
string
Properties
Filter, idLookup, Nillable, Sort
Description
Used by Salesforce for efficient querying.
IsPublished
Type
boolean
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
Indicates if a prompt is active yes or not no.
MasterLabel
Type
string
Properties
Create, Filter, Group, Sort, Update
Description
The master label for the prompt. Maximum of 80 characters.
ParentId
Type
reference
Properties
Create, Filter, Group, Sort, Update
Description
ID of the prompt.
PublishedByUserId
Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The ID of the user who activated the prompt. If the prompt is part of a package, this is the user who installed the package.
PublishedDate
Type
date
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Indicates the date the prompt was activated. If the prompt is part of a package, this is the date when the package was installed.
ShouldDisplayActionButton
Type
boolean
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
Indicates if an action button is included in the prompt yes or not no.
StartDate
Type
date
Properties
Create, Filter, Group, Sort, Update
Description
Indicates the date to start showing the prompt.
TargetAppDeveloperName
Type
string
Properties
Create, Filter, Group, Sort, Update
Description
The app’s developer name where the prompt appears.
TargetAppNamespacePrefix
Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The app’s namespace prefix where the prompt appears. Maximum of 15 characters.
TargetPageKey1
Type
string
Properties
Create, Filter, Group, Sort, Update
Description
Used by Salesforce to identity the prompt page location along with targetPageKey2 and targetPageType.
TargetPageKey2
Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Used by Salesforce to identity the prompt page location along with targetPageKey1 and targetPageType.
TargetPageType
Type
string
Properties
Create, Filter, Group, Sort, Update
Description
The type of page where the prompt appears.
TimesToDisplay
Type
int
Properties
Create, Filter, Group, Sort, Update
Description
Maximum number of times to display the prompt (that is, the number of occurrences). Salesforce detects if the user interacts with (or ignores) the prompt to determine if we should show the prompt again or cancel scheduled recurrences. This may run counter to the number of occurrences scheduled. Maximum value of 30.
Title
Type
string
Properties
Create, Filter, Group, Sort, Update
Description
The label for the title of the prompt. Maximum of 36 characters.
UserAccess
Type
picklist
Properties
Create, Filter, Group, Restricted picklist, Sort, Update
Description
Indicates who can see the prompt. Valid values are:
  • Everyone, which indicates that there’s no restrictions on who can see the prompt
  • Specific Permissions, which indicates that only users with all the specific user permissions specified can see the prompt

Users must have the View Setup and Configuration permission to see prompts only visible with specific permissions. They can see prompts visible to everyone without this user permission.

VersionNumber
Type
int
Properties
Create, Filter, Group, Sort, Update
Description
The number remains 1 since multiple versions aren’t saved in the org.