---
schema_version: "1"
id: bce16ba23bad62fb39a771365348277a3d42ebe1c2ddd7eb2ec487163ff4e7bb
title: Create Macros in Lightning Experience
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/service/264-0-0/macros_create_lightning.md
canonical_url: https://help.salesforce.com/s/articleView?id=service.macros_create_lightning.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: a4e53ec767a349203a6efc9483e0d3c9cbd993c3cc83ff7ce4923fcc697fda40
description: To create a macro in Lightning Experience, use the Macro Builder—an easy-to-use point-and-click builder.
products:
  - Service Cloud
release: "264"
---
# Create Macros in Lightning Experience

To create a macro in Lightning Experience, use the Macro Builder—an easy-to-use point-and-click builder.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;"><a href="https://help.salesforce.com/s/articleView?id=service.service_editions_reference.htm&amp;language=en_US" target="_blank">View supported editions</a>.</td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d73922e58">User Permissions
              Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d73922e58 ">To view macros:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d73922e58 ">Read on macros</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d73922e58 ">To create and edit macros:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d73922e58 ">Create AND Edit on macros</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d73922e58 ">To create and run irreversible macros:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d73922e58 ">Manage Macros That Users Can’t Undo</td>

          </tr>
        </tbody>
      </table>

![Important](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support-264-0-0-production-enus/dd14551c-a772-4db6-9a1d-d84df8df2980/images/icon_important.png)

Important Before you create a macro, make sure that your org meets the prerequisites. To create macros, your admin must add the Macro utility to your Lightning app.

In Lightning Experience, macros are supported on all standard objects except Campaign, and on custom objects that allow quick actions and have a customizable page layout.

1. In your Lightning app, open a record.
2. In the utility bar, click **Macros**.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support-264-0-0-production-enus/dd14551c-a772-4db6-9a1d-d84df8df2980/images/icon_note.png)
    
    Note If you see the message “This page doesn't support macros,” check that you’re on the record page for a supported object. You can’t run macros on list views.
3. Click **+** or **Create Macro**.
4. Enter a name, description, folder, and select the object that the macro applies to.
5. Click **Save**.
    
    <table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small "><tbody><tr class=""><td class="slds-cell-wrap">Macro Name</td><td class="slds-cell-wrap">Use a name that makes it easy to understand what this macro does. For example, for a macro that replaces the email subject with a critical update, enter “Replace Email Subject with Critical Update.”</td></tr><tr class=""><td class="slds-cell-wrap">Description</td><td class="slds-cell-wrap">Explain the purpose for this macro. This optional field helps other support reps understand what this macro does and distinguishes it from similar macros.</td></tr><tr class=""><td class="slds-cell-wrap">Apply To</td><td class="slds-cell-wrap">The Apply To value defaults to the object you were viewing before. Change this default to create a macro for a different object.</td></tr><tr class=""><td class="slds-cell-wrap">Folder</td><td class="slds-cell-wrap">Folders help you organize and share macros. You can create up to four levels of folders: one root folder and up to three subfolders. This field is visible only when <strong class="uicontrol">Share and organize macros in folders</strong> is enabled. In some orgs, the Folder field must be added to the page layout.</td></tr></tbody></table>
6. Click **Edit Instructions**.
    
    The first instruction is added based on the object you selected from the Apply To field.
    
    The Macro Builder page opens. The left side of the page displays a canvas with a sample record page for the object you selected (1). Keep in mind that all fields for the object are available, even if the sample record doesn’t include them. The right side of the page includes an Instructions tab and Details tab for your macro (2).
    
    ![Builder](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support-264-0-0-production-enus/dd14551c-a772-4db6-9a1d-d84df8df2980/support/images/macros/macros_create_lex_builder2.png)
7. Click **Add Logic**. Create logical expressions that evaluate a condition or a group of conditions. Then add the instructions that execute when the expression is true. For more information, see [Add Logic to Macros in Lightning Experience](https://help.salesforce.com/articleView?id=macros_create_lightning_add_logic.htm&language=en_US).
8. To add instructions that execute without evaluating any conditions, on the bottom of the Instructions tab, click **Add Instruction**.
    1. On the canvas, select a quick action.
        
        Selectable items are highlighted on the canvas.
        
        For example, on a case record, you can click **Log A Call** in the publisher.
    2. On the canvas, click a field to add instructions. In the Instructions tab, enter your field updates. You can insert quick text, use email templates, add email attachments, create events with relative dates, and more.
    3. Optionally, on the canvas, select a submit action to tell the macro to execute these instructions.
        
        For example, to have your macro submit your Log a Call comments, click **Save** in the publisher.
    4. Optionally, if your macro is only for records in console apps, you can add an instruction to close the record tab when the macro completes.
        
        To add the close tab instruction, click the dropdown menu next to Add Instruction, and select **Add Close Tab Instruction**.
9. When you’re done with your macro, click **Save**. To return to the app, close the Macro Builder tab.

After you create a macro, run it to make sure that it works the way you want. Open the Macro utility to execute your new macro.

- **[Add Logic to Macros in Lightning Experience](https://help.salesforce.com/s/articleView?id=service.macros_create_lightning_add_logic.htm&release=264.0.0&type=5)**  
    To control the execution of macro instructions in Lightning Experience, add logic with the Macro Builder. Create expressions with one or more conditions, and add instructions that execute when the expression is true.

#### See Also

- [Prerequisites for Macros](https://help.salesforce.com/s/articleView?id=service.macros_getting_started.htm&release=264.0.0&type=5 "Before you create and run macros, ensure that your org meets the prerequisites for using macros and then add the macros widget or utility to your app.")
- [Keyboard Shortcuts for Macros](https://help.salesforce.com/s/articleView?id=service.macros_shortcuts.htm&release=264.0.0&type=5 "Use keyboard shortcuts to work even more efficiently with macros.")
- [Macros Utility for Lightning Apps](https://help.salesforce.com/s/articleView?id=service.macros_utility.htm&type=5&language=en_US)
- [Examples of Macros in Salesforce Classic](https://help.salesforce.com/s/articleView?id=service.macros_examples.htm&release=264.0.0&type=5 "These examples show how you can create different types of macros based on your business needs. Using a macro saves support reps time because it automates repetitive and routine actions, freeing them to focus on helping customers.")
- [Considerations for Using Your Classic Email Templates in Lightning Experience](https://help.salesforce.com/s/articleView?id=sales.classic_templates_in_lightning_considerations.htm&type=5&language=en_US)