---
schema_version: "1"
id: 25fa9f4a589191ef7497331aafda4edb5d78ab079036f21dd3ccbf87a3fad369
title: ActionLinkGroupTemplate
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/meta_actionlinkgrouptemplate.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_actionlinkgrouptemplate.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: c68f926c872c54812b1ea245dedf329a04ba2d47017b3d6d8884c7368e41bd6d
description: Represents the action link group template. Action link templates let you reuse action link definitions and package and distribute action links. An action link is a button on a feed element. Clicking on an action link can take a user to another Web page, initiate a file download, or invoke an API call to an external server or Salesforce. Use action links to integrate Salesforce and third-party services into the feed. Every action link belongs to an action link group and action links within the group are mutually exclusive.
---
# ActionLinkGroupTemplate

Represents the action link group template. Action link templates let you reuse action link definitions and package and distribute action links. An action link is a button on a feed element. Clicking on an action link can take a user to another Web page, initiate a file download, or invoke an API call to an external server or Salesforce. Use action links to integrate Salesforce and third-party services into the feed. Every action link belongs to an action link group and action links within the group are mutually exclusive.

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

ActionLinkGroupTemplate components have the suffix .actionLinkGroupTemplate and are stored in the actionLinkGroupTemplates folder.

## Version

ActionLinkGroupTemplate components are available in API version 33.0 and later.

## Fields

<table class="featureTable sort_table" summary="">



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d74375e98">Field Name</th>

              <th class="featureTableHeader  " id="d74375e101">Field Type</th>

              <th class="featureTableHeader  " id="d74375e104">Description</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d74375e98" data-title="Field Name"><span class="keyword parmname">actionLinkTemplates</span></td>

              <td class="entry" headers="d74375e101" data-title="Field Type">
                <a class="xref" href="#actionLinkTemplate">ActionLinkTemplate</a>[]
              </td>

              <td class="entry" headers="d74375e104" data-title="Description">Action link templates that are associated with the action link group
                template.</td>

            </tr>

            <tr>
              <td class="entry" headers="d74375e98" data-title="Field Name"><span class="keyword parmname">category</span></td>

              <td class="entry" headers="d74375e101" data-title="Field Type">PlatformAction​GroupCategory (<a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_objects_intro.htm#enumeration_title">enumeration</a> of type
                string)</td>

              <td class="entry" headers="d74375e104" data-title="Description">Required. The location of the action link group within the feed element. Values are:<ul class="ul bulletList">
                  <li class="li">
                    <samp class="codeph nolang">Primary</samp>—The action link group is
                    displayed in the body of the feed element.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">Overflow</samp>—The action link group is
                    displayed in the overflow menu of the feed element.
                  </li>

                </ul>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d74375e98" data-title="Field Name"><span class="keyword parmname">executionsAllowed</span></td>

              <td class="entry" headers="d74375e101" data-title="Field Type">ActionLink​ExecutionsAllowed (<a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_objects_intro.htm#enumeration_title">enumeration</a> of type
                string)</td>

              <td class="entry" headers="d74375e104" data-title="Description">Required. The number of times an action link can be executed. Values are:<ul class="ul bulletList">
                  <li class="li">
                    <samp class="codeph nolang">Once</samp>—An action link can be
                    executed only once across all users.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">OncePerUser</samp>—An action link can be
                    executed only once for each user.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">Unlimited</samp>—An action link can be
                    executed an unlimited number of times by each user. If the action link’s
                    <samp class="codeph nolang">actionType</samp> is <samp class="codeph nolang">Api</samp> or <samp class="codeph nolang">ApiAsync</samp>, you
                    can’t use this value.
                  </li>

                </ul>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d74375e98" data-title="Field Name"><span class="keyword parmname">hoursUntilExpiration</span></td>

              <td class="entry" headers="d74375e101" data-title="Field Type">int</td>

              <td class="entry" headers="d74375e104" data-title="Description">Required. The number of hours from when the action link group is created until
                it's removed from associated feed elements and can no longer be executed. The
                maximum value is 8,760.</td>

            </tr>

            <tr>
              <td class="entry" headers="d74375e98" data-title="Field Name"><span class="keyword parmname">isPublished</span></td>

              <td class="entry" headers="d74375e101" data-title="Field Type">boolean</td>

              <td class="entry" headers="d74375e104" data-title="Description">Required. If <samp class="codeph nolang">true</samp>, the action link group
                template is published. Action link group templates shouldn’t be published until at
                least one action link template is associated with it.</td>

            </tr>

            <tr>
              <td class="entry" headers="d74375e98" data-title="Field Name"><span class="keyword parmname">name</span></td>

              <td class="entry" headers="d74375e101" data-title="Field Type">string</td>

              <td class="entry" headers="d74375e104" data-title="Description">Required. The name of the action link group template to use in code.</td>

            </tr>

          </tbody>

        </table>

## ActionLinkTemplate

ActionLinkTemplate components are used to create multiple action links that share properties.

<table class="featureTable sort_table" summary="">



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d74375e268">Field Name</th>

              <th class="featureTableHeader  " id="d74375e271">Field Type</th>

              <th class="featureTableHeader  " id="d74375e274">Description</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d74375e268" data-title="Field Name"><span class="keyword parmname">actionUrl</span></td>

              <td class="entry" headers="d74375e271" data-title="Field Type">string</td>

              <td class="entry" headers="d74375e274" data-title="Description">Required. The action link URL. For example, a <samp class="codeph nolang">Ui</samp> action link URL is a Web page. A <samp class="codeph nolang">Download</samp> action link URL is a link to the file to download. <samp class="codeph nolang">Ui</samp> and <samp class="codeph nolang">Download</samp>
                action link URLs are provided to clients. An <samp class="codeph nolang">Api</samp> or <samp class="codeph nolang">ApiAsync</samp> action link URL is
                a REST resource. <samp class="codeph nolang">Api</samp> and <samp class="codeph nolang">ApiAsync</samp> action link URLs aren’t provided to clients.
                Links to Salesforce can be relative. All other links must be absolute and start with
                <samp class="codeph nolang">https://</samp>.
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d74375e268" data-title="Field Name"><span class="keyword parmname">headers</span></td>

              <td class="entry" headers="d74375e271" data-title="Field Type">string</td>

              <td class="entry" headers="d74375e274" data-title="Description">Template for the HTTP headers sent when corresponding action links are invoked.
                This field can be used only for <samp class="codeph nolang">Api</samp> and <samp class="codeph nolang">ApiAsync</samp> action links. This field can contain context
                variables and binding variables in the form <samp class="codeph apex_code">{!Bindings.<var class="keyword varname">key</var>}</samp>.</td>

            </tr>

            <tr>
              <td class="entry" headers="d74375e268" data-title="Field Name"><span class="keyword parmname">isConfirmationRequired</span></td>

              <td class="entry" headers="d74375e271" data-title="Field Type">boolean</td>

              <td class="entry" headers="d74375e274" data-title="Description">Required. If <samp class="codeph nolang">true</samp>, a confirmation dialog
                appears before the action is executed.</td>

            </tr>

            <tr>
              <td class="entry" headers="d74375e268" data-title="Field Name"><span class="keyword parmname">isGroupDefault</span></td>

              <td class="entry" headers="d74375e271" data-title="Field Type">boolean</td>

              <td class="entry" headers="d74375e274" data-title="Description">Required. If <samp class="codeph nolang">true</samp>, action links derived
                from this template are the default or primary action in their action groups. There
                can be only one default action per action group.</td>

            </tr>

            <tr>
              <td class="entry" headers="d74375e268" data-title="Field Name"><span class="keyword parmname">label</span></td>

              <td class="entry" headers="d74375e271" data-title="Field Type">string</td>

              <td class="entry" headers="d74375e274" data-title="Description">A custom label to display on the action link button. If none of the
                <span class="keyword parmname">LabelKey</span> values make sense for an action link, use a custom
                label. Set the <span class="keyword parmname">LabelKey</span> field to <samp class="codeph nolang">None</samp> and enter a label name in the <span class="keyword parmname">Label</span>
                field.
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d74375e268" data-title="Field Name"><span class="keyword parmname">labelKey</span></td>

              <td class="entry" headers="d74375e271" data-title="Field Type">string</td>

              <td class="entry" headers="d74375e274" data-title="Description">Required. Key for the set of labels to display for these action link states:
                new, pending, success, failed. For example, the Approve set contains these labels:
                Approve, Pending, Approved, Failed. For a complete list of keys and labels, see
                <a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.264.0.chatterapi.meta/chatterapi/connect_appendices_action_links_labels.htm" target="_blank" title="HTML (New Window)">Action Link Labels</a> in
                the <cite class="cite">Connect REST API Developer Guide</cite>.
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d74375e268" data-title="Field Name"><span class="keyword parmname">linkType</span></td>

              <td class="entry" headers="d74375e271" data-title="Field Type">ActionLinkType (<a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_objects_intro.htm#enumeration_title">enumeration</a> of type
                string)</td>

              <td class="entry" headers="d74375e274" data-title="Description">Required. The type of action link. One of these values:<ul class="ul bulletList">
                  <li class="li">
                    <samp class="codeph nolang">Api</samp>—The action link calls a synchronous
                    API at the action URL. Salesforce sets the status to <samp class="codeph nolang">SuccessfulStatus</samp> or <samp class="codeph nolang">FailedStatus</samp> based on the HTTP status code returned by your
                    server.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">ApiAsync</samp>—The action link calls an
                    asynchronous API at the action URL. The action remains in a <samp class="codeph nolang">PendingStatus</samp> state until a third party makes a
                    request to <samp class="codeph nolang">/connect/action-links/<var class="keyword varname">actionLinkId</var></samp> to set the
                    status to <samp class="codeph nolang">SuccessfulStatus</samp> or <samp class="codeph nolang">FailedStatus</samp> when the asynchronous operation is
                    complete.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">Download</samp>—The action link downloads a file
                    from the action URL.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">Ui</samp>—The action link takes the user to a
                    web page at the action URL.
                  </li>

                </ul>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d74375e268" data-title="Field Name"><span class="keyword parmname">method</span></td>

              <td class="entry" headers="d74375e271" data-title="Field Type">ActionLink​HttpMethod (<a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_objects_intro.htm#enumeration_title">enumeration</a> of type
                string)</td>

              <td class="entry" headers="d74375e274" data-title="Description">Required. HTTP method for the action URL. One of these values:<ul class="ul bulletList">
                  <li class="li">
                    <samp class="codeph nolang">HttpDelete</samp>—Returns HTTP 204 on success.
                    Response body or output class is empty.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">HttpGet</samp>—Returns HTTP 200 on success.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">HttpHead</samp>—Returns HTTP 200 on success.
                    Response body or output class is empty.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">HttpPatch</samp>—Returns HTTP 200 on success or
                    HTTP 204 if the response body or output class is empty.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">HttpPost</samp>—Returns HTTP 201 on success or
                    HTTP 204 if the response body or output class is empty. Exceptions are the batch
                    posting resources and methods, which return HTTP 200 on success.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">HttpPut</samp>—Return HTTP 200 on success or
                    HTTP 204 if the response body or output class is empty.
                  </li>

                </ul>
                <p class="p"><samp class="codeph nolang">Ui</samp> and <samp class="codeph nolang">Download</samp> action links must use <samp class="codeph nolang">HttpGet</samp>.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d74375e268" data-title="Field Name"><span class="keyword parmname">position</span></td>

              <td class="entry" headers="d74375e271" data-title="Field Type">int</td>

              <td class="entry" headers="d74375e274" data-title="Description">Required. An integer specifying the position of the action link template
                relative to other action links in the group. 0 is the first position.</td>

            </tr>

            <tr>
              <td class="entry" headers="d74375e268" data-title="Field Name"><span class="keyword parmname">requestBody</span></td>

              <td class="entry" headers="d74375e271" data-title="Field Type">string</td>

              <td class="entry" headers="d74375e274" data-title="Description">Template for the HTTP request body sent when corresponding action links are
                invoked. This field can be used only for <samp class="codeph nolang">Api</samp>
                and <samp class="codeph nolang">ApiAsync</samp> action links. This field can
                contain context variables and binding variables in the form <samp class="codeph apex_code">{!Bindings.<var class="keyword varname">key</var>}</samp>.</td>

            </tr>

            <tr>
              <td class="entry" headers="d74375e268" data-title="Field Name"><span class="keyword parmname">userAlias</span></td>

              <td class="entry" headers="d74375e271" data-title="Field Type">string</td>

              <td class="entry" headers="d74375e274" data-title="Description">If you selected <samp class="codeph nolang">CustomUser</samp> or <samp class="codeph nolang">CustomExcludedUser</samp> for
                <span class="keyword parmname">UserVisibility</span>, this field is the alias for the custom user.
                Use the alias in a template binding to specify the custom user when an action link
                group is created using the template.
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d74375e268" data-title="Field Name"><span class="keyword parmname">userVisibility</span></td>

              <td class="entry" headers="d74375e271" data-title="Field Type">ActionLink​UserVisibility (<a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_objects_intro.htm#enumeration_title">enumeration</a> of type
                string)</td>

              <td class="entry" headers="d74375e274" data-title="Description">Required. Who can see the action link. This value is set per action link, not
                per action link group. Values are:<ul class="ul bulletList">
                  <li class="li">
                    <samp class="codeph nolang">Creator</samp>—Only the creator of the action
                    link can see the action link.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">Everyone</samp>—Everyone can see the action
                    link.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">EveryoneButCreator</samp>—Everyone but the
                    creator of the action link can see the action link.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">Manager</samp>—Only the manager of the creator
                    of the action link can see the action link.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">CustomUser</samp>—Only the custom user can see
                    the action link.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">CustomExcludedUser</samp>—Everyone but the
                    custom user can see the action link.
                  </li>

                </ul>
              </td>

            </tr>

          </tbody>

        </table>

## Declarative Metadata Sample Definition

The following is an example of an ActionLinkGroupTemplate component.

<?xml version="1.0" encoding="UTF-8"?>
<ActionLinkGroupTemplate xmlns="http://soap.sforce.com/2006/04/metadata">
   <actionLinkTemplates\>
      <actionUrl\>/services/data/{!Bindings.word}/chatter/feed-elements</actionUrl\>
      <headers\>Content-Type:{!Bindings.word3}</headers\>
      <isConfirmationRequired\>true</isConfirmationRequired\>
      <isGroupDefault\>true</isGroupDefault\>
      <labelKey\>Add</labelKey\>
      <linkType\>API</linkType\>
      <method\>httpPost</method\>
      <position\>0</position\>
      <requestBody\>{"body":{"messageSegments":\[{"type": "Text",
      "text": "{!Bindings.word1}"}\]},"subjectId": "{!Bindings.word2}",
      "feedElementType": "feedItem"}</requestBody\>
      <userAlias\>customExcludedUser</userAlias\>
      <userVisibility\>CustomExcludedUser</userVisibility\>
   </actionLinkTemplates\>
   <category\>Primary</category\>
   <executionsAllowed\>OncePerUser</executionsAllowed\>
   <hoursUntilExpiration\>10</hoursUntilExpiration\>
   <isPublished\>true</isPublished\>
   <name\>MyPackage</name\>
</ActionLinkGroupTemplate\>

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\>ActionLinkGroupTemplate</name\>
    </types\>
    <version\>33.0</version\>
</Package\>

## Usage

If you modify action link group templates, you overwrite the related action link templates.

If you delete a published action link group template, you delete all related action link information which includes deleting all action links that were instantiated using the template from feed items.

## 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.").