Macros

Predefined actions to use recurrently

Last published at: April 8th, 2024
Delete

Macros are available for the Advanced, Premium and PDM licenses.

Define a Macro based on an existing action, to execute recurring tasks without the need to configure a new action each time.

Do you find yourself configuring the same action again and again, or do you want several users to execute identically configured actions? Set up a Macro: a predefined action that can be reused. Select an action type, define which fields and values should be used, and save it for future use. 

Delete

Macro Limits

The Advanced license allows for the creation of 5 Macros, the Premium license for 20 Macros, and with PDM you can create an unlimited number of Macros.

Once a Macro is created, it is listed in the Action Library between the other actions. Macros are easy to distinguish from standard actions by the Macro tag.

A standard Action and a Macro in the Action Library

A Macro can be used in a Job, from a List View via the Action Launcher, and in Salesforce Flows. The Macro configuration cannot be edited when the Macro is called by a user, only in the Action Library.

Restricting Action access with a Macro

As with other actions, the availability of macros is determined via profile assignment. Profile assignment for a macro is independent of the profile assignment of the standard action that the macro is based on. This means that you can deny a user access to a standard action with all its configuration options, but allow access to a macro based on that action, to allow restricted access to the action features. 

For example, create a macro based on the Mass Update action, with only two fields configured to update with predefined values. This way, a user can only bulk update specific fields with specific values, not all object fields with any value.

Creating a Macro

Create a Macro as follows:

  1. Go to DAP Setup > Action Library.
  2. At top right, click New Macro.
  3. Select an action to base the macro on. Click Next.
  4. Configure the macro. 
    • Enter a label that clearly describes what the macro does, as the macro will be listed in between all other actions.
    • Select an icon for the macro, to distinguish it from other actions and to help make clear what the macro is for.
    • For some action types you also define here for which object the macro is intended.
    • Click Next.


  5. Configure the action. Select the fields and values that will be filled when the macro is executed. In a Mass Update macro, leaving Update With Value empty will clear the field in question.
    See the knowledge articles for the different actions for more information on how to configure the actions.
    Delete

    This configuration cannot be edited when the macro is executed, only here in the Action Library.


    Click Next.
  6. Review the summary and click Create.
    The macro is created and added to the Action Library.
  7. Click Assignment to assign one or more profiles or users, to make the macro visible in the Action Launcher, and to indicate whether the macro should be available for Jobs, Scheduled Jobs, List View, Action Grid, DC Job Results (if you have Duplicate Check installed), Start an Action from an Apex Class‍, and/or Start an Action in a Flow‍.
    Click Save.


Delete

Import a Macro configuration

Another way to create a Macro is by importing‍ a macro you exported earlier, as a backup or from a different Org. Read more here.

Delete

Accounts and Person Accounts

Note that macros based on the Mass Update action will only work for the account type they were created for, even though they are available for both account types.

Direct Action, Scheduled Job, or Macro?

Direct Actions‍, Scheduled Jobs‍ and Macros are all used to execute a predefined action multiple times.

  • Use a Direct Action to apply an action to one or more records whenever they are created, updated or (un)deleted, without any user interference
  • Use a Scheduled Job to run an action on a static or dynamic selection of records repeatedly without any user interference, following a set schedule.
  • Use a Macro to run an identical action whenever you want to run it; to let several users run the same action with the exact same configuration; or to let users with limited rights perform one specific action without giving them access to the full action.