trailhead

Create Publisher Actions

Learning Objectives

After completing this unit, you’ll be able to:
  • Describe what actions are.
  • Create an action.
  • Add an action to the Chatter publisher.
  • Customize the group publisher.

Actions

Actions add functionality, like post, poll, and question, to the Chatter publisher. Actions let your users do more in Salesforce and the Salesforce app.

Actions are all about productivity. Actions let users accomplish things with fewer clicks, fewer fields, and faster results. Actions are especially useful in the Salesforce app because they make it easy to create and edit records with a simple, mobile-optimized interface. By default, the Chatter publisher includes the standard actions Post, File, Link, Poll, and Question.

Chatter publisher

In the Salesforce app, actions appear in the action bar, its associated action menu, and as list-item actions.

Salesforce app action bar
There are several categories of actions, such as standard Chatter actions, default actions, mobile smart actions, custom actions, and productivity actions.
  • Standard actions are actions that are automatically included when Chatter is enabled—such as Post, File, Link, and Poll. You can customize the order in which these actions appear, but you can’t edit their properties.
  • Nonstandard actions are actions that you create and customize yourself.
  • Default actions are Salesforce predefined actions for getting you and your users started using actions in your organization. Make default actions available to your users by adding them to publisher layouts.
  • Mobile smart actions are a set of preconfigured actions, just like default actions, and are supported on the same list of objects.
  • Custom actions invoke Lightning components, Visualforce pages, or canvas apps with functionality that you define. For example, you can create a custom action to enable users to write comments that are longer than 5,000 characters. You can create an action that integrates a video-conferencing application for face-to-face meetings between support agents and customers.
  • Productivity actions are actions that Salesforce defines. They are attached to a limited set of objects. Productivity actions aren’t editable, nor can they be deleted.

You can add actions to publisher layouts that appear on global pages, like the Home tab and the Chatter tab. You can also add actions to object-specific pages that have a feed, like the account page.

Tip

Tip

Actions on the user profile page come from the Quick Actions in the Salesforce Classic Publisher section of the global publisher layout. Only standard Chatter actions appear on the user profile page, regardless of which actions are present in the User Page Layout or the global publisher layout.

Add Actions to the Publisher

Use global actions to customize publisher layouts that appear on global pages, like the Home page and the Chatter page. Global actions also appear on publisher layouts in the Salesforce app. You can see them on the action bar and action menu on the Feed and People pages.

To add global actions to the publisher, enable the Actions in the Publisher feature in Chatter Settings.

  1. From Setup, enter Chatter Settings in the Quick Find box, then select Chatter Settings.
  2. Click Edit.
  3. In the Actions in the Publisher section, select Enable actions in the publisher.
  4. Click Save.

Next, let’s create an action and add it to the global publisher layout.

Create an Action

Let’s create an action that allows users to add a record to a group directly from the publisher.
  1. From Setup, enter Global Actions in the Quick Find box. Then select the Global Actions option listed under the Global Actions heading.
  2. On the Global Actions page, click New Action.
  3. Enter the information for the new contact action.
    • For Action Type, select Create a Record.
    • For Target Object, select Contract.
    • For Standard Label Type, select New [Record]. [Record] is a placeholder. When you add the action to the publisher, [Record] is replaced with Contract.
    • For Name, enter newContract. The API uses this name, but it’s not exposed to users.
    • Add a description for the new action, select Create Feed Item, skip the success message, and keep the standard icon.

    Create new action
  4. Click Save.

The layout of the New Contract action appears with a set of contact fields already added. Let’s add another field to the layout.

  1. From Setup, enter Global Actions in the Quick Find box. Then select the Global Actions option listed under the Global Actions heading.
  2. Next to New Contract, click Layout.
  3. Select Customer Signed Date, drag into the contract layout, then click Save.
    Add Customer Signed Date field

Add the Action to the Publisher

Now that you created the action, add the action to the publisher to make it available to users.
  1. From Setup, enter Publisher Layouts in the Quick Find box.
  2. Under Global Actions, select Publisher Layouts, then, next to Global Layout, click Edit.
  3. Select Quick Actions (1), then click New Contract (2), and drag it to the Quick Actions in the Salesforce Classic Publisher section (3).
    Add action

    The position of the action determines where it shows up in the publisher on the Home or Chatter tab. By default, the first three actions appear on the publisher, any additional actions appear on the More menu. To rearrange an action, drag it to the desired position. For example, drag the New Contract action to the third position.

    Tip

    Tip

    Actions on the user profile page come from the Quick Actions in the Salesforce Classic Publisher section of the global publisher layout. Only standard Chatter actions appear on the user profile page, regardless of which actions are present in the User Page Layout or the global publisher layout.

  4. Click Save.
  5. Navigate to the Chatter tab, and check out your work.

The New Contract action now appears in the publisher on the Home and Chatter tabs.

Chatter publisher with New Contact action

Customize the Groups Publisher

By default, the groups publisher inherits the global publisher layout, which doesn’t include group-specific actions like Announcement or Add Record. Group announcements let group owners and group managers highlight important messages on the group page. To show the Announcement action in the group publisher, you must first override the global publisher layout.
  1. From Setup, enter Group Layouts in the Quick Find box, then select Group Layouts.
  2. Click Edit next to Group Layout.
  3. To open the group layout to changes, click Quick Actions (1) in the Group Layout palette.
    Group layout
  4. Scroll to the Quick Actions in the Salesforce Classic Publisher section, and click override the global publisher layout (2).

    Now you see the actions that are available in the group publisher, including the Announcement action.

  5. In the Quick Actions in the Salesforce Classic Publisher section, drag Announcement to the third position.

    In the Chatter UI, the first three actions appear above the group publisher, the other actions appear on the More menu. To change the order of the actions, drag them to the desired position.

    Group action layout
  6. Click Save.
  7. Navigate to a group page, and check out your work.

When you add an announcement to a group feed, it appears in a yellow highlighted area below the group photo (1). It also appears as a post in the group feed (2). Group announcements are shown until 11:59 p.m. on the expiration date that you select. However, permitted users, like the group owner, can replace a group announcement with a new announcement before the first one expires. Users can discuss, like, and post comments on announcements in the group feed. Depending on how they’ve set up their notifications, group members receive an email notification when an announcement is posted.

Here’s an example of a group Announcement (1), announcement post (2), and the Announcement action (3) on the publisher. We moved the announcement action into the third position, so it appears above the publisher rather than on the More menu.

Group announcement
Now let’s add another useful action to the group publisher: Add Record. This action lets users add an existing record to a group directly from the publisher.
  1. In the Group Layout palette, click Quick Actions.
  2. Click Add Record and drag it to the Quick Actions in the Salesforce Classic Publisher section.
    Add Record action
  3. Click Save.

Now the Add Record action is available on the group publisher in all groups.

Add Record action in publisher

When users add a record, like an account, the record appears in the related lists section under Group Records on a group’s page. In the Salesforce app, users can access the record under Records on the group’s Related page.

Related records in the Salesforce app

You can add various other handy actions to the group publisher, like New Account, New Task, Log a Call, or Add Member. To add more actions, drag them from the palette to the Quick Actions in the Salesforce Classic Publisher section.

Records in Chatter Groups

Seed groups with relevant records, and show your users how to do it. Here are some ideas about using Chatter groups as a collaboration space for records.

  • A sales team working together on an account can track the related opportunities, contacts, and leads in one group. Team members with permissions can access records directly from the group. New team members can use the group as a one-stop reference to familiarize themselves with historical discussions about the account and its child records.
  • Customer service teams can use groups to track the cases they handle. The group can become the team’s forum to monitor cases, discuss solutions, and analyze trends in common problem areas.
  • Marketing teams can use groups to track their campaigns, plan events, and discuss the potential leads and contacts to invite to the event. Groups also make for a great space to collaborate on marketing content or campaign artifacts.

Resources

Flower icon used to indicate that the content is for Salesforce Classic

Remember, this module is meant for Salesforce Classic. When you launch your hands-on org, switch to Salesforce Classic to complete this challenge.

retargeting