QuickAction

Represents a specified create or update quick action for an object that then becomes available in the Chatter publisher. For example, you can create an action that, on the detail page of an account, allows a user to create a contact related to that account from the Chatter feed on that page. QuickAction can be created on objects that permit custom fields.

The parent objects supported include:

  • Account
  • Campaign
  • Case
  • Contact
  • ContentNote
  • Custom objects
  • Group
  • Lead
  • Opportunity

Parent Type 

This type extends Metadata and inherits its fields.

File Suffix and Directory Location 

QuickAction components have the suffix quickAction and are stored in the quickActions folder.

Version 

Introduced in API version 28.0.

Fields 

actionSubtype 

  • Type: ActionSubtype (enumeration of type string)

  • Required: No

  • Introduced: API version 50.0

  • Description: The subtype of the action.

    The

  • Possible values:

    • Action — This value is available only for actions of type LightningWebComponent.
    • Create — The Quick Action Page defines the field layout of the record creation form. This value is available only for actions of type Flexipage. (This value is available as a Beta in API version 68.0 and later)
    • ScreenAction — This value is available only for actions of type LightningWebComponent.
    • Update — The Quick Action Page defines the field layout of the record update form. This value is available only for actions of type Flexipage. (This value is available as a Beta in API version 68.0 and later)

canvas 

  • Type: string
  • Required: No
  • Introduced: API version 29.0
  • Description: If the custom action invokes a Canvas app, the app name. Returns the fully qualified name of the Canvas app in the format <namespace>__<dev_name>, if the quick action type is Canvas; otherwise, returns null.

description 

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

fieldOverrides 

flexiPage 

  • Type: string

  • Required: No

  • Description: The API name of the Quick Action Page that contains the fields and layout for the action. This field applies only when the quick action type is Flexipage.

    This field is available as a Beta in API version 68.0 and later.

flowDefinition 

  • Type: string
  • Required: No
  • Description: If the custom action invokes a flow, this field represents the API name of the flow. Otherwise, this field is null.

height 

  • Type: int
  • Required: No
  • Description: If a custom action is created, this field represents the height in pixels of the action pane.

icon 

  • Type: string

  • Required: No

  • Description: The icon used to identify the action.

    API version 32.0 and later returns different icons than in earlier API versions.

isProtected 

  • Type: boolean
  • Required: No
  • Description: Indicates whether this component is protected (true) or not (false). Protected components cannot be linked to or referenced by components created in the installing organization.

label 

  • Type: string
  • Required: No
  • Description: Identifies the action and displays to users. Also the default identifier used for the API and managed packages.

lightningComponent 

  • Type: string
  • Required: No
  • Introduced: API version 38.0
  • Description: If the custom action invokes a Lightning component, this field represents the fully qualified name of the component. Otherwise, this field is null.

lightningWebComponent 

  • Type: string
  • Required: No

modalSize 

  • Type: QuickActionModalSize
  • Required: No

optionsCreateFeedItem 

  • Type: boolean
  • Required: Yes
  • Introduced: API version 36.0
  • Description: Required. Indicates whether successful completion of the action creates a feed item (true) or not (false). Applies only to Create Record, Update Record, and Log a Call quick action types.

page 

  • Type: string
  • Required: No
  • Description: If the custom action invokes a Visualforce page, this field identifies the page.

quickActionLayout 

  • Type: QuickActionLayout
  • Required: No
  • Description: The layout of fields on the action.

quickActionParameters 

  • Type: QuickActionParameters[]
  • Required: No
  • Introduced: API version 63.0
  • Description: The input and output of the quick action.

quickActionSendEmailOptions 

standardLabel 

  • Type: QuickActionLabel (enumeration of type string)
  • Required: No
  • Description: Specifies the standard label to use for the action.
  • Possible values:
    • AddRecord
    • AddMember
    • ChangeDueDate
    • ChangePriority
    • ChangeStatus
    • CreateNew
    • CreateNewRecordType — (For example, a label with something like “Create New Idea”)
    • Defer
    • EditDescription
    • EnrollInProgram — (Available in API versions 46.0 and later only if the org has Health Cloud enabled)
    • Escalate
    • EscalateToRecord
    • Forward — (Available in API version 42.0 and later)
    • LogACall
    • LogANote
    • ModifyAppointment — (Available in API version 47.0 and later)
    • New — (A new record)
    • NewChild — (A new child record)
    • NewChildRecordType
    • NewRecordType — (For example, a label with something like “New Idea”)
    • OfferFeedback
    • PatientDetails — (Available in API version 57.0 and later if the org has Health Cloud enabled)
    • PerformCount — (Available in API version 63.0 and later.)
    • Quick — (A quick record)
    • QuickRecordType
    • RelocateAsset — (Available in API version 63.0 and later)
    • ReplaceAsset — (Available in API version 63.0 and later)
    • Reply — (Available in API version 42.0 and later)
    • ReplyAll — (Available in API version 42.0 and later)
    • RequestFeedback
    • SendEmail — (This value is available in API version 31.0 and later.)
    • Update

successMessage 

  • Type: string
  • Required: No
  • Introduced: API version 36.0
  • Description: The message that displays to the user upon successful completion of the action.

targetObject 

  • Type: string

  • Required: No

  • Description: The object for which the action is created and performed.

    For example, you can create an action that, on the detail page of an account, allows a user to create a contact related to that account from the Chatter feed on that page. QuickAction can be created on objects that permit custom fields. In this case, Contact is the targetObject.

targetParentField 

  • Type: string
  • Required: No
  • Description: The parent object type of the action. Links the target object to the parent object. For example, use Account if the target object is Contact and the parent object is Account.

targetRecordType 

  • Type: string

  • Required: No

  • Description: Specifies which record type to create. Valid values are:

    • Business Account
    • Person Account
    • Master

type 

  • Type: QuickActionType (enumeration of type string)
  • Required: Yes
  • Description: Required. The type of quick action.
  • Possible values:
    • Canvas
    • Create
    • Flexipage — (This value is available as a Beta in API version 68.0 and later)
    • Flow — (This value is available as a Beta in API version 41.0 and later)
    • LightningComponent — (This value is available in API version 38.0 and later.)
    • LightningWebComponent
    • LogACall
    • Post
    • SendEmail — (This value is available in API version 31.0 and later.)
    • SocialPost
    • Update
    • VisualforcePage

width 

  • Type: int
  • Required: No
  • Description: If a custom action is created, this field represents the width in pixels of the action pane.

FieldOverride Type 

Represents the field names and their respective formulas and literal values that comprise predefined value settings for a QuickAction. If a field on an action has both a predefined value and a default value set, the action uses the predefined value, not the default value. A formula value takes precedence over a literal value if both are defined.

Fields 

field 

  • Type: string
  • Required: Yes
  • Description: Required. The name of the field to allow predefined values on.

formula 

  • Type: string
  • Required: No
  • Description: Specifies the formula to use when setting a field’s predefined value. Supported for single-select picklists as of API version 43.0.

literalValue 

  • Type: string
  • Required: No
  • Description: Supported for picklists only. Specifies the literal value of the field defined from values in the picklist. Corresponds to the Specific Value field in the predefined value UI.

QuickActionLayout Type 

The layout of fields on the action. There’s no hard limit to the number of fields you can add to an action layout. However, for optimum usability, we recommend a maximum of eight fields. Adding more than 20 fields can severely affect user efficiency.

Fields 

layoutSectionStyle 

  • Type: LayoutSectionStyle (enumeration of type string)
  • Required: Yes
  • Description: Required. The type of layout structure used.
  • Possible values:
    • TwoColumnsTopToBottom
    • TwoColumnsLeftToRight
    • OneColumn
    • CustomLinks

quickActionLayoutColumns 

QuickActionLayoutColumn Type 

A column defined for a QuickActionLayout.

Fields 

quickActionLayoutItems 

QuickActionLayoutItem Type 

A row item comprised of fields and defined for a QuickActionLayoutColumn.

Fields 

emptySpace 

  • Type: boolean
  • Required: No
  • Description: Controls if this layout item is a blank space (true) or not (false).

field 

  • Type: string
  • Required: No
  • Description: Represents a specific field in QuickActionLayoutItem.

uiBehavior 

  • Type: UiBehavior (enumeration of type string)
  • Required: No
  • Description: Specifies user input behavior for specific fields in QuickActionLayoutItem.
  • Possible values:
    • Edit
    • Required
    • Readonly

QuickActionParameter Type 

Represents the input and output of the associated quick action.

Version 

Introduced in API version 63.0.

Fields 

name 

  • Type: string
  • Required: Yes
  • Description: Required. Name of the parameter.

type 

  • Type: QuickActionParameterType (enumeration of type string)
  • Required: Yes
  • Description: Required. Input is the only valid value.
  • Possible values:
    • Input
    • Output

value 

  • Type: string
  • Required: No
  • Description: Represents the value associated with the given parameter name.

QuickActionParameters Type 

Fields 

name 

  • Type: string
  • Required: Yes

type 

  • Type: QuickActionParameterType (enumeration of type string)
  • Required: Yes

value 

  • Type: string
  • Required: No

QuickActionSendEmailOptions Type 

Fields 

defaultEmailTemplateName 

  • Type: string
  • Required: No

ignoreDefaultEmailTemplateSubject 

  • Type: boolean
  • Required: Yes

Declarative Metadata Sample Definition 

The following is an example of a QuickAction component:

1<?xml version="1.0" encoding="UTF-8"?>
2<QuickAction xmlns="http://soap.sforce.com/2006/04/metadata">
3    <description>testActionDefinitionTypesCreateTask</description>
4    <label>testActionDefinitionTypesCreateTask</label>
5    <optionsCreateFeedItem>true</optionsCreateFeedItem>
6    <quickActionLayout>
7        <layoutSectionStyle>TwoColumnsLeftToRight</layoutSectionStyle>
8        <quickActionLayoutColumns>
9            <quickActionLayoutItems>
10                <emptySpace>false</emptySpace>
11                <field>OwnerId</field>
12                <uiBehavior>Required</uiBehavior>
13            </quickActionLayoutItems>
14            <quickActionLayoutItems>
15                <emptySpace>false</emptySpace>
16                <field>WhoId</field>
17                <uiBehavior>Edit</uiBehavior>
18            </quickActionLayoutItems>
19            <quickActionLayoutItems>
20                <emptySpace>false</emptySpace>
21                <field>WhatId</field>
22                <uiBehavior>Edit</uiBehavior>
23            </quickActionLayoutItems>
24            <quickActionLayoutItems>
25                <emptySpace>false</emptySpace>
26                <field>ActivityDate</field>
27                <uiBehavior>Edit</uiBehavior>
28            </quickActionLayoutItems>
29            <quickActionLayoutItems>
30                <emptySpace>false</emptySpace>
31                <field>Subject</field>
32                <uiBehavior>Edit</uiBehavior>
33            </quickActionLayoutItems>
34            <quickActionLayoutItems>
35                <emptySpace>false</emptySpace>
36                <field>Status</field>
37                <uiBehavior>Required</uiBehavior>
38            </quickActionLayoutItems>
39            <quickActionLayoutItems>
40                <emptySpace>false</emptySpace>
41                <field>Priority</field>
42                <uiBehavior>Required</uiBehavior>
43            </quickActionLayoutItems>
44        </quickActionLayoutColumns>
45        <quickActionLayoutColumns/>
46    </quickActionLayout>
47    <successMessage>This is a success message</successMessage>
48    <targetObject>Task</targetObject>
49    <targetParentField>What</targetParentField>
50    <type>Create</type>
51</QuickAction>

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.